Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Trivy security scan

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

permissions:
contents: read
security-events: write

jobs:
scan:
name: Trivy filesystem scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Run Trivy filesystem scan
uses: aquasecurity/trivy-action@0.36.0
with:
scan-type: fs
scan-ref: .
severity: HIGH,CRITICAL
ignore-unfixed: true
format: sarif
output: trivy-results.sarif
exit-code: "1"

# Always upload SARIF so findings show in the Security tab even when
# the previous step fails the job (exit-code: 1 on findings).
- name: Upload Trivy results to GitHub Security tab
if: always()
uses: github/codeql-action/upload-sarif@v3.35.2
with:
sarif_file: trivy-results.sarif
category: trivy-fs