fix(ecr): handle non-existing findingSeverityCounts key (#4746)

This commit is contained in:
Sergio Garcia
2024-08-16 11:42:53 -04:00
committed by GitHub
parent ccb755340f
commit 98fc624010
@@ -206,7 +206,7 @@ class ECR(AWSService):
)
finding_severity_counts = image[
image_scan_findings_field_name
]["findingSeverityCounts"]
].get("findingSeverityCounts", {})
severity_counts.critical = (
finding_severity_counts.get(
"CRITICAL", 0