Skip to content

Commit

Permalink
fix(sca): Fix suppression integration crashing if licenseTypes is mis…
Browse files Browse the repository at this point in the history
…sing (#6117)

Fix suppression integration crashing if licenseTypes is missing

Co-authored-by: ci-build <[email protected]>
  • Loading branch information
Saarett and ci-build authored Mar 24, 2024
1 parent 75928ea commit a866452
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def _check_suppression(self, record: Record, suppression: dict[str, Any]) -> boo

elif type == 'LicenseType':
return any(record.vulnerability_details and record.vulnerability_details['license'] == license_type
for license_type in suppression['licenseTypes'])
for license_type in suppression.get('licenseTypes', []))

return False

Expand Down

0 comments on commit a866452

Please sign in to comment.