Skip to content

Commit 203bffc

Browse files
committed
ci: integrate Trivy vulnerability scanning into CI workflow
- Add a GitHub Actions job for vulnerability scanning using Trivy - Configure the scan to check for critical and high severity vulnerabilities and output results in SARIF format Signed-off-by: appleboy <[email protected]>
1 parent 8caa57c commit 203bffc

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/testing.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,20 @@ jobs:
8585
with:
8686
fetch-depth: 0
8787
- uses: wagoid/commitlint-github-action@v5
88+
89+
vulnerability-scanning:
90+
runs-on: ubuntu-latest
91+
steps:
92+
- uses: actions/checkout@v4
93+
with:
94+
fetch-depth: 0
95+
- name: Run Trivy vulnerability scanner in repo mode
96+
uses: aquasecurity/[email protected]
97+
with:
98+
scan-type: 'fs'
99+
ignore-unfixed: true
100+
format: 'sarif'
101+
output: 'trivy-results.sarif'
102+
exit-code: '1'
103+
severity: 'CRITICAL,HIGH'
104+

0 commit comments

Comments
 (0)