Repository navigation
ci: pin GitHub Actions by commit SHA and refresh msal-node and basic-ftp past advisories - #831
Merged
Merged
Conversation
Pin the 278 tag-referenced `uses:` lines under .github/ to the commit their tag points at, with the tag in a trailing comment. Lines for pnpm/action-setup and create-github-app-token reuse the SHAs already pinned and reviewed elsewhere (v6.1.0, v3.2.0), so each action has one SHA. Dependabot now also scans .github/actions/*, and the new workflow_action_pins validator rejects a tag or branch reference. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017pjjQdqk1kqBV42Y1fCNcx
Refresh the lockfile within the declared ranges: @azure/identity 4.14.1 brings @azure/msal-node 7.2.3 (GHSA-xcx6-jx8p-x3h5), and proxy-agent 8.0.3 brings get-uri 8.0.2 and basic-ftp 6.2.6 (GHSA-c475-qrg2-pj4r, GHSA-5pm8-86m8-9m6r, GHSA-r4jh-29pc-gfqr). No override is needed. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017pjjQdqk1kqBV42Y1fCNcx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(Opus 5.5)
What changed and why
1. Every GitHub Action is pinned to a full commit SHA. A tag such as
actions/checkout@v7can be moved, or rewritten by whoever controls the action's repository, and the next run would execute that code with this repository's tokens and secrets. A commit SHA always names the same code.uses:lines across 30 files under.github/(workflows and the composite actioncitry-core-wheel) now readowner/repo@<sha> # <tag>. Each tag was resolved today withgh api repos/<owner>/<repo>/git/ref/tags/<tag>, following annotated tags to their commit.actions/checkoutv7,setup-pythonv7,upload-artifactv7,download-artifactv8,setup-nodev7,cache(incl.restore/save) v6,attest-build-provenancev4,upload-pages-artifactv5,deploy-pagesv5,setup-javav6,github/codeql-action(init/analyze) v4,Swatinem/rust-cachev2,taiki-e/install-actionv2,lycheeverse/lychee-actionv2,pnpm/action-setup,actions/create-github-app-token.pnpm/action-setup(8 tag lines) andcreate-github-app-token(1 tag line), today'sv6/v3tags point at v6.1.1 and v3.4.0 (released 2026-11-18), while the release workflows already pinned reviewed commits for v6.1.0 and v3.2.0. The tag lines reuse those reviewed SHAs rather than moving release jobs to new code, and their comments now name the exact version (# v6.1.0,# v3.2.0). Dependabot will propose the newer versions as an ordinary update.workflow_action_pinsvalidator fails the gate on auses:value that names a tag or branch, or a SHA pin without its# <tag>comment. It walks the parsed YAML, so flow mappings, quoted keys and wrapped values are covered; local./actions anddocker://images are skipped. Cost: it parses about 35 YAML files in milliseconds inside the existing validator phase ofscripts/check.py, with no new CI job, and it protects the one contract that matters here, that no workflow runs code a tag move could change. Two tests that compareduses:with an exact@v7/@v6string now match the action name.docs/codebase.mdand a bullet inCLAUDE.mdcode conventions.2.
@azure/msal-node6.0.1 -> 7.2.3 (GHSA-xcx6-jx8p-x3h5).@vscode/vsce4.1.0 declares@azure/identity ^4.13.2, and@azure/identity4.14.1 declares@azure/msal-node ^7.1.0, so a lockfile refresh within the declared ranges fixes it. No override or vsce bump is needed.3.
basic-ftp5.3.1 -> 6.2.6 (GHSA-c475-qrg2-pj4r, GHSA-5pm8-86m8-9m6r, GHSA-r4jh-29pc-gfqr).@lhci/cli0.16.1 declaresproxy-agent ^8.0.2; proxy-agent 8.0.3 pins pac-proxy-agent 9.1.1, which pins get-uri 8.0.2, which declaresbasic-ftp ^6.2.4. Again a refresh within ranges, no override.Lockfile entries that moved, all inside those two chains:
@azure/identity4.14.0 -> 4.14.1,@azure/msal-common16.14.1 -> 16.17.0,semver7.8.6 -> 7.8.5 underjsonwebtoken(deduplicated, still within^7.5.4),proxy-agent8.0.2 -> 8.0.3,pac-proxy-agent9.1.0 -> 9.1.1,get-uri8.0.1 -> 8.0.2,pac-resolver9.0.1 -> 9.0.2,degenerator7.0.1 -> 7.0.2,netmask2.1.1 -> 2.1.2,quickjs-wasi2.2.0 -> 3.7.0 (required by the new pac-resolver), and theproxy-agentpeer suffix on@lhci/utils,lighthouse,puppeteer-coreand@puppeteer/browsers.How Dependabot keeps the pins current
Dependabot's
github-actionsentry reads the trailing# <tag>comment and opens a pull request that moves the SHA and the comment together. The entry now usesdirectories: ["/", "/.github/actions/*"], because/alone does not reach composite actions under.github/actions/. Two cases still need a manual step, both documented:scripts/validators/toolchain.pynames the SHAs of seven actions (maturin, rust-toolchain, PyPI publish, setup-uv, sccache, rust-cache, pnpm setup), so a Dependabot pull request that moves one of them must update that constant too; anddtolnay/rust-toolchaincarries a date comment, not a tag. Worth watching on the first monthly run: whether thegithub-actionsgroup opens one pull request across both directories or one per directory.Not in scope: the example projects' own workflows (
examples/*/*/.github/workflows/check.yml) still useactions/checkout@v7. Users copy those into their repositories, Dependabot does not scan them here, and the validator skips them; the docs say so.Checks run
actionlint: same 5 pre-existing shellcheck style notes before and after, nothing new.workflow_action_pins,workflow_run_expressions,release_caches,release_security,toolchainanddependabotpass.pytestontest_workflow_action_pins_validator.py,test_ci_workflows.py,test_release_dependency_wheels.py,test_release_caches_validator.py: 68 passed. ruff, ruff format and mypy clean on the new files.pnpm install --lockfile-onlyis a no-op on the committed lockfile.pnpm audit(dev and prod): before, the three basic-ftp advisories and GHSA-xcx6-jx8p-x3h5 were reported; after, none of them. One unrelated high remains in the dev audit (GHSA-g84c-rxfj-3j2c,webpack-dev-middlewarevia Storybook).pnpm audit --prodreports only the already-ignored minimatch advisory, before and after.gh api, tried to bypass the validator, and reviewed the prose; its findings are folded in.Versioning
CI configuration, a repository validator, tests, contributor docs and the dev-tooling lockfile only. Nothing the 1.x promise covers changes, no contract version is involved, and no changelog entry is needed.
🤖 Generated with Claude Code
https://claude.ai/code/session_017pjjQdqk1kqBV42Y1fCNcx