Prepare first npm prerelease - #11
Conversation
Technical reviewThis is the highest-consequence change in the series, since it ends with bytes on a public registry under a name nobody has claimed yet. I went through the workflow line by line. The hardening holds up
Re-running the verification inside the The reasoning in the inline comment is right too:
The workflow that executes comes from the tagged commit either way, so this cannot defend against a hostile workflow. What it does defend against is a hostile repository script running in the job that holds the token, and it keeps every check visible in the file the environment reviewer is reading before approving. The residual risk lands on tag protection and human approval, which is where it belongs and where the body puts it. Finding: nothing enforces that
|
Lesson:
|
Separate repository readiness from the irreversible tag that publishes the first public alpha. Pin registry and provenance metadata, verify the exact tagged main state without credentials, and require environment approval before the one-time bootstrap token can publish under next.
c590b67 to
cd4fb3a
Compare
|
Addressed the hosted finding in The two intentionally inline source-check blocks now have explicit markers, and
The publish job still executes no tagged repository helper script while the bootstrap secret is available. Focused verification:
Hosted CI is rerunning on the exact pushed commit. |
Follow-up on
|
Summary
firstdraft@0.1.0-alpha.1as a public prerelease under thenextdist-tag with npm provenancemainstate before publicationnpmenvironment and document the one-time bootstrap-token to trusted-publishing transitionRelease boundary
This pull request does not publish a package, create or push a release tag, create an npm token, or change GitHub repository protections. Publication remains a separate manual action after merge.
Before the first
v*tag, an administrator must protectmainand release tags, configure the reviewednpmenvironment and fail-closed variable, and add the one-day bootstrap token as an environment secret. The environment reviewer must verify the exact tag, commit, workflow, and completed unprivileged checks before approval.The first successful publication must be followed by npm organization access and trusted-publisher configuration, then a cleanup pull request that removes
NODE_AUTH_TOKENentirely before another tag.Verification
npm trust githubandnpm trust listcommands