Skip to content

Commit 75df6d5

Browse files
Merge pull request #111 from githubexporter/trivy-permissions
Add trivy workflow permissions
2 parents 7ead103 + 8f6f9fa commit 75df6d5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/container-scan.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ jobs:
88
container-scan:
99
name: Container Scan
1010
runs-on: ubuntu-latest
11+
permissions:
12+
security-events: write
13+
actions: read
14+
contents: read
15+
1116
steps:
1217
- name: Checkout code
1318
uses: actions/checkout@v4
@@ -20,11 +25,12 @@ jobs:
2025
- name: Run Trivy
2126
uses: aquasecurity/trivy-action@master
2227
with:
28+
scan-type: image
2329
image-ref: 'githubexporter/github-exporter:${{ steps.get-current-version.outputs.version }}'
2430
format: 'sarif'
2531
output: 'trivy-results.sarif'
2632

2733
- name: Upload Trivy scan results to GitHub Security tab
28-
uses: github/codeql-action/upload-sarif@v2
34+
uses: github/codeql-action/upload-sarif@v3
2935
with:
3036
sarif_file: 'trivy-results.sarif'

0 commit comments

Comments
 (0)