From a86645244f7b88d0a37f295cd70a095c46e26893 Mon Sep 17 00:00:00 2001 From: Saar Ettinger Date: Sun, 24 Mar 2024 15:02:58 +0200 Subject: [PATCH] fix(sca): Fix suppression integration crashing if licenseTypes is missing (#6117) Fix suppression integration crashing if licenseTypes is missing Co-authored-by: ci-build --- .../integration_features/features/suppressions_integration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/checkov/common/bridgecrew/integration_features/features/suppressions_integration.py b/checkov/common/bridgecrew/integration_features/features/suppressions_integration.py index 95642b69c33..24b2158e515 100644 --- a/checkov/common/bridgecrew/integration_features/features/suppressions_integration.py +++ b/checkov/common/bridgecrew/integration_features/features/suppressions_integration.py @@ -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