Skip to content

Commit 9e22e3a

Browse files
committed
ci: add table output and artifact upload for scan visibility
- Add table format scan to show results in workflow logs - Upload SARIF as artifact for manual inspection - Matches coder/coder artifact upload pattern
1 parent 9f26520 commit 9e22e3a

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/security.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,14 @@ jobs:
8484
.
8585
echo "image=code-marketplace:scan" >> "$GITHUB_OUTPUT"
8686
87-
- name: Run Trivy vulnerability scanner
87+
- name: Run Trivy vulnerability scanner (table output for logs)
88+
uses: aquasecurity/trivy-action@0.28.0
89+
with:
90+
image-ref: ${{ steps.build.outputs.image }}
91+
format: "table"
92+
severity: "LOW,MEDIUM,HIGH,CRITICAL"
93+
94+
- name: Run Trivy vulnerability scanner (SARIF output for GitHub)
8895
uses: aquasecurity/trivy-action@0.28.0
8996
with:
9097
image-ref: ${{ steps.build.outputs.image }}
@@ -97,3 +104,10 @@ jobs:
97104
with:
98105
sarif_file: "trivy-results.sarif"
99106
category: "Trivy"
107+
108+
- name: Upload Trivy scan results as artifact
109+
uses: actions/upload-artifact@v4
110+
with:
111+
name: trivy-results
112+
path: trivy-results.sarif
113+
retention-days: 7

0 commit comments

Comments
 (0)