Skip to content

[ci]: Update CodeQL action to v4#5

Closed
hdwhdw wants to merge 1 commit into
masterfrom
hdwhdw/update-codeql-v4
Closed

[ci]: Update CodeQL action to v4#5
hdwhdw wants to merge 1 commit into
masterfrom
hdwhdw/update-codeql-v4

Conversation

@hdwhdw

@hdwhdw hdwhdw commented Jun 16, 2026

Copy link
Copy Markdown
Owner

What

Update the CodeQL workflow (.github/workflows/codeql-analysis.yml):

  • github/codeql-action/init@v2.1.29@v4
  • github/codeql-action/analyze@v2.1.29@v4
  • actions/checkout@v3@v4 (both checkout steps in the CodeQL job)

Why

CodeQL action v2 is unsupported and v3 is deprecated. Pinning to the stale v2.1.29 meant scans ran on an outdated CodeQL engine and missed newer query packs. Bumping to v4 runs analysis on the current engine — the same modern scanning that surfaced the high-severity findings in sonic-net#694 on an updated copy of this repo — so this repo's scans can catch more types of issues.

The supporting actions/checkout steps are bumped to v4 as well because CodeQL v4 runs on the Node 24 runtime, and the old Node 16 checkout would otherwise emit deprecation warnings.

No other workflow syntax changes are required for the v4 migration; the config in .github/codeql/codeql-config.yml (security-and-quality, security-extended) is unchanged.

Fixes sonic-net#695

Notes

This PR only modernizes the scanner. The actual code vulnerabilities reported in sonic-net#694 are a separate fix effort tracked under that issue.

CodeQL action v2 is unsupported and v3 is deprecated. Bump
github/codeql-action init/analyze from v2.1.29 to v4 so scans run on
the current CodeQL engine and catch more types of issues, matching the
newer scans that surfaced sonic-net#694. Also bump the supporting
actions/checkout steps from v3 to v4 since v4 runs on Node 24.

Fixes sonic-net#695

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Dawei Huang <dwhuang9@gmail.com>
@mssonicbld

Copy link
Copy Markdown

/azp run

@hdwhdw

hdwhdw commented Jun 16, 2026

Copy link
Copy Markdown
Owner Author

Superseded by upstream PR sonic-net#704.

@hdwhdw hdwhdw closed this Jun 16, 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.

Update CodeQL version to catch more types of issues

2 participants