Skip to content

Commit bde1143

Browse files
committed
[PLUTO-1411] Add trivy test
1 parent dbb4664 commit bde1143

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.github/workflows/trivy-plugin-test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
push:
88
paths:
99
- 'plugins/tools/trivy/**'
10-
- '.github/workflows/trivy-plugin-test.yml'
10+
1111

1212
jobs:
1313
test:
@@ -37,6 +37,8 @@ jobs:
3737
"$CLI_PATH" install
3838
# Run analysis
3939
"$CLI_PATH" analyze --tool trivy --format sarif --output actual.sarif
40+
# Convert absolute paths to relative paths in the output
41+
sed -i 's|file:///home/runner/work/codacy-cli-v2/codacy-cli-v2/|file:///|g' actual.sarif
4042
# Compare with expected output
4143
diff expected.sarif actual.sarif
4244
# Clean up

plugins/tools/trivy/test/expected.sarif

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"driver": {
88
"fullName": "Trivy Vulnerability Scanner",
99
"name": "Trivy",
10+
"informationUri": "https://github.com/aquasecurity/trivy",
1011
"rules": [],
1112
"version": "0.59.1"
1213
}

0 commit comments

Comments
 (0)