Skip to content

Commit 02901f4

Browse files
authored
Merge pull request #20 from Homebrew/fix/ci/trivy_sarif
fix: use sarif for trivy
2 parents 7f9bc01 + 5e05b54 commit 02901f4

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -66,24 +66,13 @@ jobs:
6666
uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # v0.29.0
6767
with:
6868
scan-type: config
69-
format: table
69+
format: sarif
70+
output: trivy-results.sarif
7071
hide-progress: true
71-
ignore-unfixed: true
7272
severity: 'CRITICAL,HIGH'
73-
output: trivy.txt
7473
exit-code: '1'
7574

76-
- name: Publish Trivy Output to Summary
77-
if: always()
78-
run: |
79-
if [[ -s trivy.txt ]]; then
80-
{
81-
echo "### Security Output"
82-
echo "<details><summary>Click to expand</summary>"
83-
echo ""
84-
echo '```terraform'
85-
cat trivy.txt
86-
echo '```'
87-
echo "</details>"
88-
} >> $GITHUB_STEP_SUMMARY
89-
fi
75+
- name: Upload Trivy scan results to GitHub Security tab
76+
uses: github/codeql-action/upload-sarif@v3
77+
with:
78+
sarif_file: trivy-results.sarif

0 commit comments

Comments
 (0)