Skip to content

Commit fa41894

Browse files
authored
Merge pull request #1274 from topcoder-platform/trivy
Trivy
2 parents 32d6734 + 595c11c commit fa41894

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/trivy.yaml

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

0 commit comments

Comments
 (0)