Skip to content

Commit 72cd35f

Browse files
committed
fix: Upload scan results to security tab
1 parent 1d78bab commit 72cd35f

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

.github/workflows/security.yaml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,24 @@ jobs:
88
build:
99
name: Build
1010
runs-on: ubuntu-20.04
11+
permissions:
12+
contents: read
13+
security-events: write
1114
steps:
1215
- name: Checkout code
1316
uses: actions/checkout@v4
1417

15-
- name: Run Trivy vulnerability scanner in repo mode
18+
- name: Trivy scan
1619
uses: aquasecurity/[email protected]
1720
with:
18-
scan-type: "fs"
19-
ignore-unfixed: true
20-
format: "table"
21-
severity: "CRITICAL,HIGH,MEDIUM"
21+
scan-type: 'fs'
22+
format: 'sarif'
23+
output: 'trivy-results.sarif'
24+
severity: 'MEDIUM,HIGH,CRITICAL'
25+
exit-code: '0'
26+
ignore-unfixed: false
27+
28+
- name: Update Security tab
29+
uses: github/codeql-action/upload-sarif@v3
30+
with:
31+
sarif_file: 'trivy-results.sarif'

0 commit comments

Comments
 (0)