From 75ec5b05378290345f1b3b1213a7bddf7fc47559 Mon Sep 17 00:00:00 2001 From: Vadim Korolik Date: Tue, 17 Nov 2026 22:10:51 +0000 Subject: [PATCH] ci: fix DevSkim SARIF upload on main (codeql-action v4 + security-events permission) The upload-sarif step has failed on every push/schedule run since 2026-03-26 with 'Resource not accessible by integration': the repo's default GITHUB_TOKEN is read-only, so uploading to code scanning needs an explicit security-events: write. It also used github/codeql-action v2, which is deprecated and now fails the step. Move to v4 (what the repo's CodeQL default setup uses) and grant contents/actions read + security-events write. Co-Authored-By: Claude Opus 5.5 Generated-by: termag --- .github/workflows/devskim.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/devskim.yml b/.github/workflows/devskim.yml index 051b0ddf2d..8c81d855b9 100644 --- a/.github/workflows/devskim.yml +++ b/.github/workflows/devskim.yml @@ -14,10 +14,18 @@ on: schedule: - cron: '26 19 * * 1' +permissions: + contents: read + jobs: lint: name: DevSkim runs-on: ubuntu-22.04-8core-32gb + permissions: + contents: read + # upload-sarif needs these; the repo default GITHUB_TOKEN is read-only + security-events: write + actions: read steps: - name: Checkout code uses: actions/checkout@v4 @@ -30,6 +38,6 @@ jobs: ignore-globs: '**/otel/samples/**' - name: Upload DevSkim scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@v2 + uses: github/codeql-action/upload-sarif@v4 with: sarif_file: devskim-results.sarif