You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Publish from CI with npm provenance (--provenance / OIDC trusted publisher) #2028
From the MCP registry security assessment (its item 4). release:publish runs npm publish from a maintainer laptop, so the published tarball has only npm's registry signature — dist.attestations is null, and there is no verifiable link from the tarball back to the commit that produced it.
Goal
Publish from CI with npm publish --provenance under an OIDC trusted publisher, so consumers get a signed provenance statement pinning the tarball to its source commit and workflow run.
Work
Configure the npm package's trusted-publisher / OIDC settings on npmjs.com (maintainer action — cannot be scripted from the repo; blocks the rest).
Add a release workflow (or extend the existing tag-triggered one) that runs release:prepare then npm publish --provenance with id-token: write permission, instead of a local npm publish.
Decision: accepted, but it's more than the npm setting. We don't publish from CI today: releases go through scripts/release-workspace.mjs publish locally, and it publishes several workspace packages. So:
Maintainer (npmjs.com), for each published package: add a trusted publisher with GitHub owner callstack, repository agent-device, the exact workflow filename, and the environment name if the job uses one.
Repo: a release workflow on a GitHub-hosted runner with id-token: write, npm ≥ 11.5.1 and Node ≥ 22.14, driving release-workspace.mjs with pnpm. The contributed Ubuntu npm ci workflow doesn't fit our pnpm workspace or the macOS-built native Apple artifacts, so it needs adapting rather than dropping in.
Step 2 can be written now; step 1 has to be done by the maintainer.
Activity
mahirhir commentedon Aug 28, 2026
Here is the complete
.github/workflows/release.ymlworkflow implementing zero-secret npm Trusted Publishing with cryptographic build provenance:.github/workflows/release.ymlVerification
Once configured on npmjs.com (Settings -> Publishing Access -> GitHub Actions OIDC), consumers can independently verify:
This produces a cryptographically signed Sigstore certificate linking the exact npm tarball SHA-512 back to the release workflow and commit SHA.
thymikee commentedon Oct 9, 2026
Decision: accepted, but it's more than the npm setting. We don't publish from CI today: releases go through
scripts/release-workspace.mjs publishlocally, and it publishes several workspace packages. So:callstack, repositoryagent-device, the exact workflow filename, and the environment name if the job uses one.id-token: write, npm ≥ 11.5.1 and Node ≥ 22.14, drivingrelease-workspace.mjswith pnpm. The contributed Ubuntunpm ciworkflow doesn't fit our pnpm workspace or the macOS-built native Apple artifacts, so it needs adapting rather than dropping in.Step 2 can be written now; step 1 has to be done by the maintainer.