Skip to content

Commit 2b6aa1e

Browse files
fix: Docker Scout authentication & CI permissions
- Add continue-on-error to all Docker Scout steps (handle free tier limits) - Fix SARIF upload to check if file exists before uploading - Add actions: read permission to security job in CI workflow Fixes: - Docker Scout 'not entitled' error won't block workflow - CI permissions error for snyk-scan job - Graceful degradation when Scout quota exceeded
1 parent e9ed7df commit 2b6aa1e

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ jobs:
2828
contents: read
2929
pull-requests: write
3030
checks: write
31-
31+
3232
test:
3333
name: Tests & Coverage
3434
uses: ./.github/workflows/test.yml
3535
permissions:
3636
contents: read
3737
pull-requests: write
38-
38+
3939
build:
4040
name: Build Validation
4141
uses: ./.github/workflows/build.yml
@@ -50,6 +50,7 @@ jobs:
5050
contents: read
5151
pull-requests: write
5252
security-events: write
53+
actions: read
5354

5455
# Final validation step
5556
ci-success:

.github/workflows/security.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232

3333
- name: Docker Scout - Quickview
3434
uses: docker/scout-action@v1
35+
continue-on-error: true
3536
with:
3637
command: quickview
3738
image: docker-reactjs-sample
@@ -41,6 +42,7 @@ jobs:
4142

4243
- name: Docker Scout - CVEs Analysis
4344
uses: docker/scout-action@v1
45+
continue-on-error: true
4446
with:
4547
command: cves
4648
image: docker-reactjs-sample
@@ -53,6 +55,7 @@ jobs:
5355

5456
- name: Docker Scout - Base Image Recommendations
5557
uses: docker/scout-action@v1
58+
continue-on-error: true
5659
with:
5760
command: recommendations
5861
image: docker-reactjs-sample
@@ -61,6 +64,7 @@ jobs:
6164

6265
- name: Docker Scout - Compare to Latest
6366
uses: docker/scout-action@v1
67+
continue-on-error: true
6468
if: github.event_name == 'pull_request'
6569
with:
6670
command: compare
@@ -73,7 +77,7 @@ jobs:
7377

7478
- name: Upload Scout SARIF results to GitHub Security
7579
uses: github/codeql-action/upload-sarif@v3
76-
if: always()
80+
if: always() && hashFiles('scout-cves.sarif') != ''
7781
with:
7882
sarif_file: scout-cves.sarif
7983
category: docker-scout

0 commit comments

Comments
 (0)