ci(publish): add --provenance to npm publish commands#6
Open
Nexory wants to merge 1 commit into
Open
Conversation
The workflow grants 'id-token: write' for Trusted Publishing (line 16) but the actual 'npm publish' invocations omit the --provenance flag, so the elevated permission is held without generating any attestation. Adding --provenance to both invocations turns on npm provenance statements (sigstore-backed attestations) at publish time. The node version is already pinned to 22.18.0 (well above the 11.5.1 minimum required for Trusted Publishing as the existing comment notes).
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.
Summary
The publish workflow grants
id-token: writepermission for npm Trusted Publishing (line 16) but thenpm publishinvocations omit the--provenanceflag, so the elevated permission is held without generating any attestation.What changed
Added
--provenanceto bothnpm publishcalls in.github/workflows/publish.yml:```diff
```
Impact
With this change, every published version gets a sigstore-backed provenance statement linking the package to the source commit and the GitHub Actions run that built it. Consumers who run
npm installwith attestation verification (npm install --foreground-scripts --strict-ssl --integrity --provenanceor sigstore-aware tooling) can verify the package came from this repo.The node version is already pinned to 22.18.0 (well above the 11.5.1 minimum required for Trusted Publishing, as the existing comment notes), so no toolchain changes are needed.
References
Notes
This issue was found during an audit of the across-protocol SDK ecosystem.