Skip to content

ci: add npm provenance attestation to release publish#18

Merged
drewstone merged 1 commit into
mainfrom
ci/npm-provenance
Jun 2, 2026
Merged

ci: add npm provenance attestation to release publish#18
drewstone merged 1 commit into
mainfrom
ci/npm-provenance

Conversation

@drewstone
Copy link
Copy Markdown
Contributor

Problem

Releases publish to npm with a token but no provenance attestation — the published versions carry no SLSA provenance, so consumers can't verify the build origin.

Change

Add --provenance to the pnpm publish command. The job already grants id-token: write and the repo is public, so this attaches a signed provenance attestation using the existing token auth — non-breaking, no secret changes.

Notes

  • This gives provenance immediately. Going fully tokenless (npm OIDC trusted publishing, no NPM_TOKEN to rotate) is a separate step: register a Trusted Publisher on npmjs.com for this package → repo + publish.yml. The workflow is already OIDC-capable (id-token: write).

@drewstone drewstone merged commit 62a822b into main Jun 2, 2026
1 check passed
drewstone added a commit that referenced this pull request Jun 2, 2026
Supersedes #18's provenance-on-token-path: pnpm signs provenance but doesn't
mint the OIDC credential, and the NPM_TOKEN is dead. npm install -g npm@latest
+ npm publish --provenance, drop NPM_TOKEN + setup-node registry-url. No
workspace deps so npm publish is safe. Needs the npmjs Trusted Publisher
(org tangle-network, repo agent-knowledge, workflow publish.yml) configured once.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant