From bc9b97b3bdd9e22f629fc2de42bbfb1cee8c0500 Mon Sep 17 00:00:00 2001 From: andrzej3393 Date: Wed, 21 Dec 2022 10:51:49 +0100 Subject: [PATCH] JSON.stringify findings details output + minimal docs --- README.md | 1 + action.yml | 2 ++ index.js | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8b9c77e..f5420a5 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ Scan an image uploaded to ECR and fail if vulnerabilities are found. | low | Number of low vulnerabilities detected. | | informational | Number of informational vulnerabilities detected. | | unknown | Number of unknown vulnerabilities detected. | +| findingsDetails | Details of findings. | ## Required ECR permissions diff --git a/action.yml b/action.yml index 679edb0..a3181e6 100644 --- a/action.yml +++ b/action.yml @@ -28,6 +28,8 @@ outputs: description: Number of unknown severity vulnerabilities detected. total: description: Total number of vulnerabilities detected. + findingsDetails: + description: Details of findings. runs: using: "docker" image: "Dockerfile" diff --git a/index.js b/index.js index d893a5a..ab83f24 100644 --- a/index.js +++ b/index.js @@ -219,7 +219,7 @@ const main = async () => { const indeterminate = counts.UNDEFINED || 0 const ignored = ignoredFindings.length const total = critical + high + medium + low + informational + indeterminate - core.setOutput('findingsDetails', findingsDetails.toString()) + core.setOutput('findingsDetails', JSON.stringify(findingsDetails)) core.setOutput('critical', critical.toString()) core.setOutput('high', high.toString()) core.setOutput('medium', medium.toString())