Skip to content

Commit 2ddd8f1

Browse files
authored
feat: add sbom to the types for v2 (#165)
- enable sbom as a scanning type for v2 - update the trivy run for both version to include all packages to fix issue where the sbom conversion doesn't have all the data Signed-off-by: Owen Rumney <[email protected]>
1 parent 5c3c466 commit 2ddd8f1

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

trivy-task/trivyV1/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ function configureScan(runner: ToolRunner, inputs: TaskInputs, output: string) {
8888
runner.arg(['--exit-code', inputs.exitCode]);
8989
runner.arg(['--format', 'json']);
9090
runner.arg(['--output', output]);
91+
runner.arg('--list-all-pkgs');
9192
runner.argIf(inputs.severities, ['--severity', inputs.severities]);
9293
runner.argIf(inputs.ignoreUnfixed, ['--ignore-unfixed']);
9394

trivy-task/trivyV2/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ function configureScan(runner: ToolRunner, inputs: TaskInputs) {
7878
runner.arg(['--exit-code', '2']);
7979
runner.arg(['--format', 'json']);
8080
runner.argIf(inputs.scanners, ['--scanners', inputs.scanners]);
81+
runner.arg('--list-all-pkgs');
8182
runner.argIf(inputs.severities, ['--severity', inputs.severities]);
8283
runner.argIf(inputs.ignoreUnfixed, ['--ignore-unfixed']);
8384
runner.arg(['--output', resultsFilePath]);

trivy-task/trivyV2/task.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@
9393
"options": {
9494
"filesystem": "filesystem",
9595
"image": "image",
96-
"repository": "repository"
96+
"repository": "repository",
97+
"sbom": "sbom"
9798
}
9899
},
99100
{

0 commit comments

Comments
 (0)