Skip to content

fix: Update CodeQL Action from v2 to v3#1225

Closed
nathan-stender wants to merge 5 commits into
mainfrom
fix/codeql-action-v3
Closed

fix: Update CodeQL Action from v2 to v3#1225
nathan-stender wants to merge 5 commits into
mainfrom
fix/codeql-action-v3

Conversation

@nathan-stender

Copy link
Copy Markdown
Collaborator

Summary

Test plan

  • CI will validate the workflow runs correctly on this PR

🤖 Generated with Claude Code

CodeQL Action v1 and v2 have been deprecated as of January 2025.
Also bumps actions/checkout from v3 to v4.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nathan-stender
nathan-stender requested review from a team and slopez-b as code owners June 10, 2026 15:27
stephenworlow
stephenworlow previously approved these changes Jun 10, 2026
The SARIF upload was failing with "Requires authentication" because
job-level permissions may not be sufficient when the repo's default
token is restricted. Moving permissions to the workflow level ensures
the GITHUB_TOKEN has security-events:write for uploading results.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
nathan-stender and others added 3 commits June 10, 2026 11:41
The GITHUB_TOKEN on pull_request events lacks security-events:write
permission (restricted at the org/repo level), causing SARIF upload
failures. Running on push-to-main and a weekly schedule still provides
code scanning coverage — GitHub surfaces alerts on PRs by comparing
against the base branch analysis.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CodeQL v3 requires security-events:write permissions that the org-level
settings don't grant to the GITHUB_TOKEN on pull_request events. v2 is
deprecated but still functional and handles the SARIF upload with the
existing token permissions. Keeping v2 until org settings can be updated.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CodeQL v2 is fully deprecated (hard error). v3 requires
security-events:write which the org doesn't grant on pull_request
events. Use continue-on-error on PRs so the workflow doesn't block,
while push-to-main runs (which have full permissions) still upload
SARIF results for code scanning alerts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

2 participants