From 993b5224b60321db72379f0a33696cc25420a77d Mon Sep 17 00:00:00 2001 From: Alejandro Lazaro Date: Fri, 16 Jul 2021 00:37:43 +0200 Subject: [PATCH] fix: break switch when exit code is 0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add break to switch in scan function. The action was creating issues regardless that non-vulnerabilities were found (exit code 0). ``` Vulnerabilities were not found. Your maintenance looks good 👍 Vulnerabilities found !!! Found existing issue. Updating existing issue. ``` --- src/trivy.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/trivy.ts b/src/trivy.ts index d37b02c..9eb8a37 100644 --- a/src/trivy.ts +++ b/src/trivy.ts @@ -30,6 +30,7 @@ export function scan( case 0: core.info(`Vulnerabilities were not found. Your maintenance looks good 👍`); + break; case 255: if (result.stdout && result.stdout.length > 0) { core.info('Vulnerabilities found !!!');