Skip to content

ci(codeql): scan without npm install; codeql-action v2 -> v4 - #1490

Merged
Jayanth Reddy Bujula (jbujula) merged 2 commits into
mainfrom
users/jbujula/codeql-build-mode-none
Oct 6, 2026
Merged

Jayanth Reddy Bujula (jbujula) merged 2 commits into
mainfrom
users/jbujula/codeql-build-mode-none

Conversation

@jbujula

Copy link
Copy Markdown
Collaborator

Why

CodeQL on main has not completed since 2026-09-12. Every run since 2026-09-15 (scheduled, push and PR) fails at npm install, before the analysis step:

npm ERR! code E401
npm ERR! 401 Unauthorized - GET https://npm.pkg.github.com/download/@microsoft/powerplatform-cli-wrapper/0.1.135/... - unauthenticated: User cannot be authenticated with the token provided.

GPR_ACCESS_TOKEN has expired, so the repo currently has no fresh CodeQL results, which is now raised as a Continuous SDL (S360) compliance item.

Change

  • Remove Setup Node, Configure npm, the npm@8/npm@9 installs, npm install and npm run build from codeql.yml. CodeQL extracts JavaScript/TypeScript straight from source (build-mode: none), and .github/codeql/codeql-config.yml already limits analysis to src/ and ignores out/dist/build/node_modules, so the install/build output was never part of the scan.
  • github/codeql-action/init + analyze: v2 -> v4. v1/v2 are deprecated and already emit an error annotation on every run.
  • actions/checkout: v3 -> v4, matching the repo's other workflows.
  • Drop the os matrix entry; it only chose between npm@8 and npm@9. The check is now named Analyze (javascript) (not a required check).

With no secret involved, the scan also works on Dependabot and fork PRs.

Validation

  • This PR's own CodeQL run exercises the new workflow (pull_request trigger).
  • After merge, the push to main produces a fresh analysis.

Notes

The CodeQL workflow has failed on every run since 2026-09-15 at `npm install`
(E401 fetching @microsoft/powerplatform-cli-wrapper from GitHub Packages)
because GPR_ACCESS_TOKEN expired, so main has had no CodeQL analysis since
2026-09-12.

JavaScript/TypeScript is extracted directly from source (build-mode: none)
and codeql-config.yml already limits analysis to src/, so the install and
build steps contributed nothing to the scan. Drop them and the os matrix
entry that only selected the npm version, and move to codeql-action v4
since v2 is deprecated. Bump checkout to v4 to match the other workflows.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jbujula
Jayanth Reddy Bujula (jbujula) merged commit 2062548 into main Oct 6, 2026
5 checks passed
@jbujula
Jayanth Reddy Bujula (jbujula) deleted the users/jbujula/codeql-build-mode-none branch October 6, 2026 21:37
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