Skip to content

Commit 8ff60f5

Browse files
Add trivy vulnerability scanner build step
1 parent 7c619f8 commit 8ff60f5

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/image-build.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,22 @@ jobs:
1818
push: false
1919
tags: ghcr.io/${{ github.repository }}:latest-amd64
2020
file: Dockerfile
21+
22+
- name: Run Trivy vulnerability scanner
23+
uses: aquasecurity/[email protected]
24+
with:
25+
image-ref: ghcr.io/${{ github.repository }}:latest-amd64
26+
ignore-unfixed: true
27+
vuln-type: 'os,library'
28+
severity: 'CRITICAL,HIGH'
29+
format: 'sarif'
30+
output: 'trivy-results.sarif'
31+
32+
- name: Upload Trivy scan results to GitHub Security tab
33+
uses: github/codeql-action/upload-sarif@v3
34+
if: always()
35+
with:
36+
sarif_file: 'trivy-results.sarif'
2137

2238
build-openshift:
2339
name: Image build/openshift

0 commit comments

Comments
 (0)