Skip to content

Commit

Permalink
Fix CodeQL pipeline failure (#2032)
Browse files Browse the repository at this point in the history
CodeQL Analyze job fails with:`Resource not accessible by integration`,
and logs show the following help:

This run of the CodeQL Action does not have permission to access Code
Scanning API endpoints.
As a result, it will not be opted into any experimental features.
This could be because the Action is running on a pull request from a fork.
If not, please ensure the Action has the 'security-events: write' permission.
Details: Resource not accessible by integration

Add `security-events: write`, along with default `contents` and
`packages` read permissions.

Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
  • Loading branch information
helsaawy authored Feb 15, 2024
1 parent c56a09c commit 5f9910a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ on:
env:
GO_VERSION: "1.19.x"

permissions:
contents: read
packages: read
security-events: write

jobs:
CodeQL-Build:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 5f9910a

Please sign in to comment.