Repository navigation
ci: pin publish workflow actions, read-only token, reject non-version release tags - #641
julianrubino wants to merge 1 commit into
Conversation
|
@codex review |
|
bugbot run |
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
What
publish-npm.yaml(runs onrelease: publishedwithNPM_TOKEN):permissions: contents: read. The job only checks out and publishes to npm; today it runs with the org default token, which is write on everything.actions/checkouta37ce9120846195fa4ece8f58b268e6043cb2f26(v3),actions/setup-node49933ea5288caeca8642d1e84afbd3f7d6820020(v4),foundry-rs/foundry-toolchaindba66c27052e63476d886f22216e119ba7e615bf(v1).refs/tags/vis only letters, digits,.,+and-.Why
Part of the zeta-chain GitHub Actions hardening. The npm dist-tag comes from the release tag name and is pasted into the
yarn publishscript through${{ steps.determine-npm-tag.outputs.NPM_TAG }}, in the same step asNODE_AUTH_TOKEN. Git allows$,(,)and;in tag names, so a release published on a tag likev1.0.0-$(...)would run that text as shell with the npm token in the environment. Checking the tag in the step that builds the value closes that without touching the publish line, which #610 also edits (--access public), so the two PRs don't conflict.A tag can be moved to different code; a commit SHA cannot.
Tags that already publish keep working:
v15.0.0giveslatest,v15.0.0-rc1givesrc1, as before. A tag without thevprefix now fails at this step instead of reachingyarn publishwithrefs/tags/...as the version.How Has This Been Tested?
Not run: the workflow only triggers on a published release (the latest are v15.0.0 and v14.1.0, both 2025-10-24; their runs are past retention), and this PR doesn't trigger it. The first proof is the next release: the job log should show the three actions downloaded by SHA, the token block with
Contents: readandMetadata: readonly, and the publish step as before. A wrong SHA would fail at "Set up job" before any secret is read.