-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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(sca): changes on cve suppressions to match package and image scan #3502
Conversation
# Conflicts: # checkov/common/bridgecrew/integration_features/features/suppressions_integration.py
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.
🎖️
for cve in suppression['cves']) | ||
if self.bc_integration.repo_id in suppression['accountIds']: | ||
repo_name = self.bc_integration.repo_id.replace('\\', '/').split('/')[-1] # type: ignore | ||
suppression_path = suppression['cves'][0]['id'].replace('\\', '/') |
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 know you just moved it here, but do you know why we use only the index 0 of suppression['cves']
?
in some cases (specifically in the UTs) there are more than 1 items in the list
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.
true, there can be more than one cve, but each suppression represent one file, so if we have few cves that were suppressed for the same file, the 'id' which is the file path will be the same for all of them
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
New/Edited policies (Delete if not relevant)
Description
Include a description of what makes it a violation and any relevant external links.
Fix
How does someone fix the issue in code and/or in runtime?
Checklist: