From c7bb0d81ac8cae1246fe1ce4ebe3795ad38e99dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Galv=C3=A3o=20Xavier?= Date: Tue, 5 Apr 2022 15:41:20 -0700 Subject: [PATCH] always output SBOM table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jonas Galvão Xavier --- src/github/SyftGithubAction.ts | 2 +- .../__snapshots__/snapshot.test.ts.snap | 21 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/github/SyftGithubAction.ts b/src/github/SyftGithubAction.ts index 3bc59f4e..832d1b69 100644 --- a/src/github/SyftGithubAction.ts +++ b/src/github/SyftGithubAction.ts @@ -145,7 +145,7 @@ async function executeSyft({ input, format }: SyftOptions): Promise { throw new Error("Invalid input, no image or path specified"); } - args = [...args, "-o", format]; + args = [...args, "-o", format, "-o", "table"]; // Execute in a group so the syft output is collapsed in the GitHub log core.info(`[command]${cmd} ${args.join(" ")}`); diff --git a/tests/integration/__snapshots__/snapshot.test.ts.snap b/tests/integration/__snapshots__/snapshot.test.ts.snap index dce73b8c..9698049c 100644 --- a/tests/integration/__snapshots__/snapshot.test.ts.snap +++ b/tests/integration/__snapshots__/snapshot.test.ts.snap @@ -414,6 +414,20 @@ ExternalRef: SECURITY cpe23Type cpe:2.3:a:yallist:yallist:4.0.0:*:*:*:*:*:*:* ExternalRef: SECURITY cpe23Type cpe:2.3:a:*:yallist:4.0.0:*:*:*:*:*:*:* ExternalRef: PACKAGE_MANAGER purl pkg:npm/yallist@4.0.0 +NAME VERSION TYPE +chownr 2.0.0 npm +fs-minipass 2.1.0 npm +js-tokens 4.0.0 npm +loose-envify 1.4.0 npm +minipass 3.1.3 npm +minizlib 2.1.2 npm +mkdirp 1.0.4 npm +object-assign 4.1.1 npm +prop-types 15.7.2 npm +react 16.14.0 npm +react-is 16.13.1 npm +tar 6.1.0 npm +yallist 4.0.0 npm " `; @@ -536,5 +550,12 @@ ExternalRef: SECURITY cpe23Type cpe:2.3:a:trim:trim:0.0.2:*:*:*:*:*:*:* ExternalRef: SECURITY cpe23Type cpe:2.3:a:*:trim:0.0.2:*:*:*:*:*:*:* ExternalRef: PACKAGE_MANAGER purl pkg:npm/trim@0.0.2 +NAME VERSION TYPE +loose-envify 1.4.0 npm +object-assign 4.1.1 npm +prop-types 15.7.2 npm +react 16.14.0 npm +react-is 16.13.1 npm +trim 0.0.2 npm " `;