Skip to content

Commit 976c4f3

Browse files
committed
adds Trivy action
1 parent 32d6734 commit 976c4f3

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/trivy.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Trivy Scanner
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- dev
7+
- trivy
8+
pull_request:
9+
jobs:
10+
trivy-scan:
11+
name: Use Trivy
12+
runs-on: ubuntu-24.04
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Run Trivy scanner in repo mode
18+
uses: aquasecurity/[email protected]
19+
with:
20+
scan-type: 'fs'
21+
ignore-unfixed: true
22+
format: 'sarif'
23+
output: 'trivy-results.sarif'
24+
severity: 'CRITICAL,HIGH,UNKNOWN'
25+
scanners: vuln,secret,misconfig,license
26+
github-pat: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- name: Upload Trivy scan results to GitHub Security tab
29+
uses: github/codeql-action/upload-sarif@v3
30+
with:
31+
sarif_file: 'trivy-results.sarif'

0 commit comments

Comments
 (0)