Skip to content

Commit

Permalink
Update Trivy job to use custom SARIF template and exit code
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mizutani committed Nov 2, 2024
1 parent 42154af commit f0583ca
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ jobs:
with:
scan-type: "fs"
ignore-unfixed: true
format: "sarif"
format: "template"
template: "@/contrib/sarif.tpl"
output: "trivy-results.sarif"
exit-code: 0
exit-code: 1
env:
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db

- name: Upload Trivy scan results to GitHub Security tab
if: failure() && steps.scan.outcome == 'failure'
Expand Down

0 comments on commit f0583ca

Please sign in to comment.