Skip to content

Commit cb000f5

Browse files
authored
ci: integrate Trivy vulnerability scanning into CI workflow (#4359)
- Add a GitHub Actions job for vulnerability scanning using Trivy - Configure Trivy to scan the repository for vulnerabilities of severity critical, high, and medium - Ensure the workflow fails if vulnerabilities are found Signed-off-by: appleboy <[email protected]>
1 parent 2119046 commit cb000f5

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/gin.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,19 @@ jobs:
8181
uses: codecov/codecov-action@v4
8282
with:
8383
flags: ${{ matrix.os }},go-${{ matrix.go }},${{ matrix.test-tags }}
84+
85+
vulnerability-scanning:
86+
runs-on: ubuntu-latest
87+
steps:
88+
- uses: actions/checkout@v5
89+
with:
90+
fetch-depth: 0
91+
92+
- name: Run Trivy vulnerability scanner in repo mode
93+
uses: aquasecurity/[email protected]
94+
with:
95+
scan-type: 'fs'
96+
ignore-unfixed: true
97+
format: 'table'
98+
exit-code: '1'
99+
severity: 'CRITICAL,HIGH,MEDIUM'

0 commit comments

Comments
 (0)