Skip to content

Commit 569fa25

Browse files
committed
ci: fix secscan permissions for CodeQL upload-sarif
The CodeQL upload-sarif action failed with "Resource not accessible by integration" because the workflow had no explicit permissions block, so the GITHUB_TOKEN lacked security-events access. Add a top-level permissions block granting contents:read and security-events:write, and set continue-on-error on the upload step so a fork/PR context can no longer fail the whole run. Assisted-by: opencode:glm-5.2 [bash] [edit]
1 parent a3a4f2a commit 569fa25

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/secscan.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
schedule:
88
- cron: '0 0 * * 0'
99

10+
permissions:
11+
contents: read
12+
security-events: write
13+
1014
jobs:
1115
tests:
1216
runs-on: ubuntu-latest
@@ -27,6 +31,7 @@ jobs:
2731
args: '-no-fail -exclude-dir=backend/go/supertonic -fmt sarif -out results.sarif ./...'
2832
- name: Upload SARIF file
2933
if: ${{ github.actor != 'dependabot[bot]' }}
34+
continue-on-error: true
3035
uses: github/codeql-action/upload-sarif@v4
3136
with:
3237
# Path to SARIF file relative to the root of the repository

0 commit comments

Comments
 (0)