Skip to content

Commit

Permalink
fix: reduce syft debug level (#446)
Browse files Browse the repository at this point in the history
* fix: reduce syft debug level

Signed-off-by: Keith Zantow <kzantow@gmail.com>

* chore: update tests

Signed-off-by: Keith Zantow <kzantow@gmail.com>

---------

Signed-off-by: Keith Zantow <kzantow@gmail.com>
  • Loading branch information
kzantow committed Mar 5, 2024
1 parent f3355df commit 9fece9e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 10 deletions.
5 changes: 4 additions & 1 deletion dist/attachReleaseAssets/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion dist/downloadSyft/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion dist/runSyftAction/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion src/github/SyftGithubAction.ts
Expand Up @@ -127,7 +127,11 @@ async function executeSyft({
}

// https://github.com/anchore/syft#configuration
let args = ["packages", "-vv"];
let args = ["scan"];

if (core.isDebug()) {
args = [...args, "-vv"];
}

if ("image" in input && input.image) {
if (registryUser) {
Expand Down
12 changes: 6 additions & 6 deletions tests/SyftGithubAction.test.ts
Expand Up @@ -65,8 +65,8 @@ describe("Action", () => {
const { args } = data.execArgs;

expect(args).toBeDefined()
expect(args.length > 2).toBeTruthy();
expect(args[2]).toBe("some-image:latest")
expect(args.length > 1).toBeTruthy();
expect(args[1]).toBe("some-image:latest")
});

it("runs with path input", async () => {
Expand All @@ -81,8 +81,8 @@ describe("Action", () => {
const { args } = data.execArgs;

expect(args).toBeDefined()
expect(args.length > 2).toBeTruthy();
expect(args[2]).toBe("dir:some-path")
expect(args.length > 1).toBeTruthy();
expect(args[1]).toBe("dir:some-path")
});

it("runs with file input", async () => {
Expand All @@ -97,8 +97,8 @@ describe("Action", () => {
const { args } = data.execArgs;

expect(args).toBeDefined()
expect(args.length > 2).toBeTruthy();
expect(args[2]).toBe("file:some-file.jar")
expect(args.length > 1).toBeTruthy();
expect(args[1]).toBe("file:some-file.jar")
});

it("runs with release uploads inputs", async () => {
Expand Down

0 comments on commit 9fece9e

Please sign in to comment.