Skip to content

Commit efd80ab

Browse files
JAORMXclaude
andcommitted
Fix security scan: use table format instead of SARIF
SARIF upload to GitHub Security tab requires security-events: write permission which isn't available on private repos. Use table format to output results to CI logs instead. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 19e7811 commit efd80ab

File tree

1 file changed

+4
-23
lines changed

1 file changed

+4
-23
lines changed

.github/workflows/security.yml

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ on:
66
schedule:
77
- cron: '0 0 * * 0' # Run weekly on Sundays at midnight
88

9-
# TODO: Add security-events: write permission when repo is public
10-
# to enable uploading SARIF results to GitHub Security tab
119
permissions:
1210
contents: read
1311

@@ -23,35 +21,18 @@ jobs:
2321
- name: Checkout code
2422
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
2523

26-
- name: Run Trivy vulnerability scanner in repo mode
24+
- name: Run Trivy vulnerability scanner
2725
uses: aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8 # 0.33.1
2826
with:
2927
scan-type: 'fs'
3028
ignore-unfixed: true
31-
format: 'sarif'
32-
output: 'trivy-results.sarif'
29+
format: 'table'
3330
severity: 'CRITICAL,HIGH'
3431

35-
- name: Upload Trivy scan results to GitHub Security tab
36-
uses: github/codeql-action/upload-sarif@19b2f06db2b6f5108140aeb04014ef02b648f789 # v4
37-
if: always()
38-
with:
39-
sarif_file: 'trivy-results.sarif'
40-
category: 'trivy-fs'
41-
42-
- name: Run Trivy vulnerability scanner in IaC mode
32+
- name: Run Trivy IaC scanner
4333
uses: aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8 # 0.33.1
4434
with:
4535
scan-type: 'config'
46-
hide-progress: false
47-
format: 'sarif'
48-
output: 'trivy-config-results.sarif'
36+
format: 'table'
4937
exit-code: '1'
5038
severity: 'CRITICAL,HIGH'
51-
52-
- name: Upload Trivy IaC scan results to GitHub Security tab
53-
uses: github/codeql-action/upload-sarif@19b2f06db2b6f5108140aeb04014ef02b648f789 # v4
54-
if: always()
55-
with:
56-
sarif_file: 'trivy-config-results.sarif'
57-
category: 'trivy-config'

0 commit comments

Comments
 (0)