-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
fix(k8s): skip resources without misconfigs #7797
Conversation
if misconfigsResource(m) { | ||
res, ok := index[m.fullname()] | ||
index[m.fullname()] = m | ||
if ok { | ||
index[m.fullname()].Results[0].Misconfigurations = append(index[m.fullname()].Results[0].Misconfigurations, res.Results[0].Misconfigurations...) | ||
} |
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.
Could you add a test in report_test.go
to cover this case?
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.
good catch! thanks!
done 4bc5434
@simar7 could you take a look again? thanks! |
lgtm @afdesk we just need to resolve merge conflicts prior to merge. Could you update and push that? |
@simar7 thanks! sure, I'll fix the conflict |
…misconfigs # Conflicts: # pkg/k8s/report/report_test.go
Description
This PR fixes overriding of existed misconfigurations found in image scan.
before
after:
Related issues
Checklist