Repository navigation
feat(publish): enable npm provenance for public packages - #244
Merged
Merged
Conversation
Add a detached ASCII-armored PGP signature (.asc) for every package asset attached to a GitHub Release, satisfying OpenSSF Scorecard's Signed-Releases check (signature tier -> 8) and letting consumers verify release tarballs. The step lives in the create-release composite, which both the core release and each satellite release run through, so all releases in a multi-package publish are covered from one place. It is gated on a GPG key being provided (inputs.gpg_private_key) rather than on gpg_enabled (which governs tag signing on manual dispatch), so real releases are signed on every publish. It reuses the exact assets expression from the release-create step so it signs precisely what was attached, and uploads each .asc via the same release-assets API the SBOM attach step uses. Best-effort by design: a missing key, signing error, or upload failure emits a warning and leaves the already-created release intact rather than failing the publish. Repos that supply no GPG key skip cleanly. SLSA provenance (.intoto.jsonl) for the Scorecard 10 tier is tracked separately in #243.
Append `--provenance` to the auto-detected `npm publish` command so public packages published to the npm registry carry SLSA build provenance and a sigstore publish attestation, letting consumers verify build origin via `npm audit signatures` / the npm site. Gated to avoid breakage: only when the repository is public (provenance is public-only; private packages error) and only for the npm CLI (`yarn publish` has no equivalent flag). A caller-supplied custom publish command is left untouched, so a repo can opt out. Requires id-token: write on the publish job, already granted, and applies to the npm-registry publish only — the GitHub Packages command is derived separately and unchanged. Covers the core package and every satellite, which share this command builder. The authoritative builder (utilities/repo-detection) and its rarely-hit fallback (publish-npm/generate-command) are kept in sync. Note: npm registry provenance is not credited by OpenSSF Scorecard's Signed-Releases check (which inspects GitHub Release assets); this is a real supply-chain improvement for npm consumers, independent of that metric.
Shinrai
approved these changes
Sep 1, 2026
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.
🚀 What's Changed
💥 Breaking Changes
No breaking changes
✨ Features
🐛 Bug Fixes
No bug fixes
📦 Dependencies
No dependency updates
🔧 Other Changes
No other changes
👥 Contributors