Skip to content

Commit

Permalink
support case where there are no cve suppressions
Browse files Browse the repository at this point in the history
  • Loading branch information
adam varsano committed Oct 11, 2023
1 parent c469868 commit 33a7d80
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ def _check_suppression(self, record: Record, suppression: dict[str, Any]) -> boo
elif type == 'Cves':
if 'accountIds' not in suppression:
return False
if self.bc_integration.repo_id and self.bc_integration.source_id and self.bc_integration.source_id in suppression['accountIds']:
if self.bc_integration.repo_id and self.bc_integration.source_id and self.bc_integration.source_id in suppression['accountIds']\
and suppression['cves']:
repo_name = self.bc_integration.repo_id.replace('\\', '/').split('/')[-1]
suppression_path = suppression['cves'][0]['id'].replace('\\', '/')
file_abs_path = record.file_abs_path.replace('\\', '/')
Expand Down

0 comments on commit 33a7d80

Please sign in to comment.