Skip to content

Commit 36d1e3e

Browse files
committed
Feat: Add trivy vulnerability scan and upload report via github workflow
1 parent 60ac1ac commit 36d1e3e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/docker-build.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,16 @@ jobs:
3131
push: true
3232
tags: ghcr.io/nginx/nginx-utils:latest
3333

34+
# Step 5: Install Trivy for Vulnerability Scanning
35+
- name: Install Trivy
36+
uses: aquasecurity/[email protected]
37+
with:
38+
image-ref: ghcr.io/${{ github.repository_owner }}/nginx-utils:latest
39+
format: json
40+
output: vuln-report.json
3441

35-
42+
- name: Upload Vulnerability Report
43+
uses: actions/upload-artifact@v3
44+
with:
45+
name: vuln-report
46+
path: vuln-report.json

0 commit comments

Comments
 (0)