Skip to content

Commit 3527e7e

Browse files
Add trivy vulnerability scanner in build step
1 parent d5883bd commit 3527e7e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/image-build.yml

+16
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,22 @@ jobs:
5353
tags: ghcr.io/${{ github.repository }}:latest-amd64-thick
5454
file: images/Dockerfile.thick
5555

56+
- name: Run Trivy vulnerability scanner
57+
uses: aquasecurity/[email protected]
58+
with:
59+
image-ref: ghcr.io/${{ github.repository }}:latest-amd64-thick
60+
ignore-unfixed: true
61+
vuln-type: 'os,library'
62+
severity: 'CRITICAL,HIGH'
63+
format: 'sarif'
64+
output: 'trivy-results.sarif'
65+
66+
- name: Upload Trivy scan results to GitHub Security tab
67+
uses: github/codeql-action/upload-sarif@v3
68+
if: always()
69+
with:
70+
sarif_file: 'trivy-results.sarif'
71+
5672
build-origin:
5773
name: Image build/origin
5874
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)