Skip to content

ci: upgrade CodeQL Action v2 -> v4 (deprecation maintenance) - #1431

Open
Rishabh Jain (MrRishabhJain) wants to merge 2 commits into
mainfrom
users/rishjain/codeql-action-v3
Open

ci: upgrade CodeQL Action v2 -> v4 (deprecation maintenance)#1431
Rishabh Jain (MrRishabhJain) wants to merge 2 commits into
mainfrom
users/rishjain/codeql-action-v3

Conversation

@MrRishabhJain

@MrRishabhJain Rishabh Jain (MrRishabhJain) commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Upgrades github/codeql-action/init and github/codeql-action/analyze from v2 to v4 in .github/workflows/codeql.yml. Two-line change, isolated from any product code.

Why

CodeQL Action v1/v2 were deprecated in January 2025. Every CodeQL run on this repo currently logs:

##[error]CodeQL Action major versions v1 and v2 have been deprecated.
Please update all occurrences of the CodeQL Action in your workflow files to v3.

This is not currently fatal - the Analyze job still succeeds - but it is emitted as an error on every run, and will hard-fail once GitHub completes enforcement. This PR gets ahead of that. The repo is currently two major versions behind.

Correction to the earlier description

An earlier version of this description claimed CodeQL Action v2 was causing CodeQL checks to fail on #1430. That was incorrect.

Attempts 1 and 2 of the CodeQL run on #1430 both failed at the Install npm dependencies step with npm E401 on GPR_ACCESS_TOKEN - the same root cause as the build job failures. After that secret was rotated, attempt 3 passed on codeql-action@v2 with no workflow change.

So this PR is pre-emptive maintenance, not a fix for a live failure. It is not blocking anything and can be merged whenever convenient.

Validation

  • All github/codeql-action references in codeql.yml now use @v4
  • Workflow YAML diff passes git diff --check
  • Hosted runner accepted @v4 and ran the workflow through to the dependency step

Note on remaining deprecations

codeql.yml also still uses actions/checkout@v3 and actions/setup-node@v3, which emit Node 20 deprecation warnings. Those are left untouched here to keep this diff minimal, but are worth a follow-up.

Related: #1430

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 5a0fd990-27f4-4a2a-8df7-3b81302917c1
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 5a0fd990-27f4-4a2a-8df7-3b81302917c1
@MrRishabhJain Rishabh Jain (MrRishabhJain) changed the title ci: upgrade CodeQL Action to v3 ci: upgrade CodeQL Action to v4 Jul 28, 2026
@MrRishabhJain Rishabh Jain (MrRishabhJain) changed the title ci: upgrade CodeQL Action to v4 ci: upgrade CodeQL Action v2 -> v4 (deprecation maintenance) Jul 29, 2026
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