Skip to content

ci(publish): add --provenance to npm publish commands#6

Open
Nexory wants to merge 1 commit into
across-protocol:masterfrom
Nexory:ci/add-provenance-to-publish
Open

ci(publish): add --provenance to npm publish commands#6
Nexory wants to merge 1 commit into
across-protocol:masterfrom
Nexory:ci/add-provenance-to-publish

Conversation

@Nexory
Copy link
Copy Markdown

@Nexory Nexory commented May 29, 2026

Summary

The publish workflow grants id-token: write permission for npm Trusted Publishing (line 16) but the npm publish invocations omit the --provenance flag, so the elevated permission is held without generating any attestation.

What changed

Added --provenance to both npm publish calls in .github/workflows/publish.yml:

```diff

  • run: npm publish
  • run: npm publish --provenance
  • run: npm publish --tag ${{ steps.release.outputs.tag }}
  • run: npm publish --provenance --tag ${{ steps.release.outputs.tag }}
    ```

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 install with attestation verification (npm install --foreground-scripts --strict-ssl --integrity --provenance or 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.

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).
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