Repository navigation
ci: pin credential-holding third-party actions by sha and default ci.yml and check-links.yml to a read-only token - #13430
Merged
Merged
Conversation
…yml/check-links.yml to a read-only token - changesets/action, lycheeverse/lychee-action, dependabot/fetch-metadata and orhun/git-cliff-action now name a commit sha with a trailing version comment; each is a declared exception in check-action-ref-convention.mjs. The changesets ref-pin test now holds the v1.9.0 sha. - ci.yml and check-links.yml declare a top-level `permissions: contents: read`. - Dependabot's github-actions updates run weekly, minor/patch grouped. Claude-Session: https://claude.ai/code/session_01W9H2WdXx3kPkf6moDnRdRE Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W9H2WdXx3kPkf6moDnRdRE Co-authored-by: Claude <noreply@anthropic.com>
os-tesla
marked this pull request as ready for review
October 24, 2026 01:45
os-tesla
enabled auto-merge
October 24, 2026 01:45
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 24, 2026
os-zhuang
approved these changes
Oct 24, 2026
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.
Requested by Tesla · project thread
CI supply-chain hardening: every third-party action that runs holding a credential now names a commit sha, and the two workflows that had no
permissions:block default the job token to read-only.What changed
Third-party actions pinned by commit sha (each with a trailing
# vX.Y.Zcomment). Each one was the commit its floating ref resolved to when this was written, read withgit ls-remoteagainst the upstream repository:changeset-release.yml(2 steps)changesets/action@v1(a branch)a45c4d594aa4e2c509dc14a9f2b3b67ba3780d0d# v1.9.0NPM_TOKEN,GITHUB_TOKENcheck-links.ymllycheeverse/lychee-action@v2e7477775783ea5526144ba13e8db5eec57747ce8# v2.9.0GITHUB_TOKENdependabot-auto-merge.ymldependabot/fetch-metadata@v325dd0e34f4fe68f24cc83900b1fe3fe149efef98# v3.1.0github-tokeninputchangelog.ymlorhun/git-cliff-action@v4a9a95522b26fe6403f7bb24031f21fb573d0f5ff# v4.9.1contents: writejob)changesets/actionmoves from thev1branch to the v1.9.0 commit, which is the commit the workflow's own git-surface reading was already taken at, so the two properties the release lane depends on are unchanged.scripts/__tests__/changeset-release-action-ref-pin.test.tsnow holds the sha, and gains one non-vacuity case: a step that goes back to the movingv1reds.scripts/check-action-ref-convention.mjs(the gate's mechanism for a deliberate off-convention ref), with one shared reason. Theissuefield names this pull request. First-partyactions/*refs stay on the floating-tag default; the repo-wide pinning posture is not changed here.half-state-patrol.ymlwas already sha-pinned and is untouched.Least-privilege job token.
ci.yml: top-levelpermissions: contents: read. The seven jobs without their own block (changeset-check, type-check, test, test-dist-pins, test-coverage, e2e, docs) were measured for token use: no step passesGITHUB_TOKEN,github.token,gh, orgithub-scriptin any of them;actions/cacheandactions/upload-artifactuse the runner's own token.test-aggregateandcoverage-reportkeep their existingcontents: read+actions: readblocks. No job was widened.check-links.yml: top-levelpermissions: contents: read; lychee's token is a read for API rate limits.Dependabot. The
github-actionsecosystem now runs weekly and groups minor/patch updates into one pull request, so the pinned shas get their updates. Majors stay separate, so a declined major (the deliberatechangesets/actionv1 hold) does not block the group. Thenpmentry is unchanged.Verification
node scripts/check-action-ref-convention.mjs→ exit 0: 141 refs in 28 workflow files, 13 distinct, 0 undeclared, 0 stale.node scripts/check-changeset-presence.mjs→ exit 0: no released package's source or contract changed, so no changeset is owed.changeset-release-action-ref-pin.test.ts,check-action-ref-convention.test.ts,check-links-workflow.test.ts: 33/33 passed once the exception entries name this PR.pnpm run setupbuild of the objectstack pin); CI'spnpm testis the authoritative run.Governed surface
The diff touches
.github/workflows/**, so this stays a draft until an authorized approval. Security change: the maintainer approves before merge.Session:
https://claude.ai/code/session_01W9H2WdXx3kPkf6moDnRdRE🤖 Generated with Claude Code
https://claude.ai/code/session_01W9H2WdXx3kPkf6moDnRdRE