Skip to content

Commit 5a95c69

Browse files
author
Gonzalo Diaz
committed
[CONFIG] [Github Actions] Docker flow, ACTIONS_RUNTIME_TOKEN env added.
aquasecurity/trivy-action#389 (comment)
1 parent ad2ef14 commit 5a95c69

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

.github/workflows/docker-image.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
32
name: Docker Image CI
43

54
on: # yamllint disable-line rule:truthy
@@ -15,7 +14,6 @@ env:
1514
ARTIFACT_NAME: algorithm-exercises-csharp_${{ github.sha }}
1615

1716
jobs:
18-
1917
build:
2018
name: "Build Docker images"
2119
runs-on: ubuntu-latest
@@ -157,7 +155,7 @@ jobs:
157155
- name: Upload result to GitHub Code Scanning
158156
uses: github/codeql-action/upload-sarif@v3
159157
with:
160-
sarif_file: 'snyk.sarif'
158+
sarif_file: "snyk.sarif"
161159
scan:
162160
name: "Trivy (sarif)"
163161
runs-on: ubuntu-latest
@@ -182,13 +180,15 @@ jobs:
182180
uses: aquasecurity/[email protected]
183181
with:
184182
image-ref: ${{ env.IMAGE_NAME }}:${{ github.sha }}
185-
format: 'sarif'
186-
output: 'trivy-results.sarif'
183+
format: "sarif"
184+
output: "trivy-results.sarif"
187185

188186
- name: Upload Trivy scan results to GitHub Security tab
189187
uses: github/codeql-action/upload-sarif@v3
190188
with:
191-
sarif_file: 'trivy-results.sarif'
189+
sarif_file: "trivy-results.sarif"
190+
env:
191+
ACTIONS_RUNTIME_TOKEN: ${{ secrets.GITHUB_TOKEN }}
192192

193193
report:
194194
name: "Trivy (report)"
@@ -210,4 +210,6 @@ jobs:
210210
uses: aquasecurity/[email protected]
211211
with:
212212
image-ref: ${{ env.IMAGE_NAME }}:${{ github.sha }}
213-
format: 'table'
213+
format: "table"
214+
env:
215+
ACTIONS_RUNTIME_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)