-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GCP - filter - scc findings #6630
GCP - filter - scc findings #6630
Conversation
filters: | ||
- type: scc-findings | ||
org: 11111111111111 | ||
key: "[].finding.severity" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it feels like we should be processing per finding instead of doing so on the set to make matching a little easier, else every key has to be prefixed [].. doing that means we can also annotate the matched finding onto the resource.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was debating whether I should do that or not since the api call also returns a resource section in addition to the finding, but I agree it makes it much cleaner to have it just on the findings, which is the use case we want anyway.
"finding":{
...
},
"resource": {
"name": "//storage.googleapis.com/gcf-sources-2222222222222-us-east1",
"projectName": "//cloudresourcemanager.googleapis.com/projects/2222222222222",
"projectDisplayName": "cloud-custodian",
"parentName": "//cloudresourcemanager.googleapis.com/projects/2222222222222",
"parentDisplayName": "cloud-custodian"
}
updated filter now filters the findings directly. subsequent scc-findings filters in a policy would filter on the previous findings.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! lgtm
Allows GCP resources to be filtered on Security Command Center (SCC) findings. So they can be filtered on just if they have findings or further filtered on the findings themselves.