Skip to content

Grant CodeQL workflow permissions required for C# analyze SARIF upload#14

Merged
alminveh merged 2 commits into
mainfrom
copilot/fix-analyze-job-failure
Jun 16, 2026
Merged

Grant CodeQL workflow permissions required for C# analyze SARIF upload#14
alminveh merged 2 commits into
mainfrom
copilot/fix-analyze-job-failure

Conversation

Copilot AI commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

The analyze (csharp, autobuild) GitHub Actions job failed at the CodeQL upload stage with Resource not accessible by integration. The workflow did not explicitly grant the token scopes required for CodeQL API/SARIF upload operations.

  • Root cause

    • codeql-action/analyze attempted to upload results without sufficient workflow token permissions.
  • Change

    • Added explicit top-level permissions in .github/workflows/codeql.yml:
      • actions: read
      • contents: read
      • security-events: write
  • Why this resolves the failure

    • security-events: write enables SARIF/code scanning result upload.
    • actions: read and contents: read align the workflow token with CodeQL action API/repo access expectations.
permissions:
  actions: read
  contents: read
  security-events: write

Copilot AI changed the title [WIP] Fix failing GitHub Actions job analyze (csharp, autobuild) Grant CodeQL workflow permissions required for C# analyze SARIF upload Jun 16, 2026
Copilot AI requested a review from alminveh June 16, 2026 14:15
@alminveh
alminveh marked this pull request as ready for review June 16, 2026 14:47
@alminveh
alminveh merged commit f4878a6 into main Jun 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants