Skip to content

Commit 8705b4c

Browse files
committed
ci: integrate Trivy vulnerability scanning into CI workflow
- Add a GitHub Actions workflow to run Trivy vulnerability scans on all branches for push and pull request events - Configure the workflow to scan the repository, ignore unfixed issues, output a table, and fail on findings with medium or higher severity Signed-off-by: appleboy <[email protected]>
1 parent d097a21 commit 8705b4c

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/trivy.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Trivy Vulnerability Scan
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
pull_request:
8+
branches:
9+
- '**'
10+
11+
jobs:
12+
trivy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Run Trivy vulnerability scanner in repo mode
19+
uses: aquasecurity/[email protected]
20+
with:
21+
scan-type: 'fs'
22+
ignore-unfixed: true
23+
format: 'table'
24+
exit-code: '1'
25+
severity: 'CRITICAL,HIGH,MEDIUM'

0 commit comments

Comments
 (0)