From c396700c5421d57e8911cab8f64717e025c0c724 Mon Sep 17 00:00:00 2001 From: Jeff DeWitt Date: Fri, 23 Feb 2024 09:20:38 -0500 Subject: [PATCH] fix: no findings bug --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index fdb23b8..a7ac7a4 100644 --- a/index.js +++ b/index.js @@ -259,7 +259,7 @@ const main = async () => { const ignoredCounts = countIgnoredFindings(ignoredFindings) const findingsDetails = findingsList || [] - const counts = findings.imageScanFindings.findingSeverityCounts + const counts = findings.imageScanFindings.findingSeverityCounts || {} // If no findings, default to empty object instead of undefined const critical = counts.CRITICAL || 0 const high = counts.HIGH || 0 const medium = counts.MEDIUM || 0