Skip to content

feat(publish): enable npm provenance for public packages - #244

Merged
Shinrai merged 2 commits into
nextfrom
feat/sign-release-artifacts
Sep 1, 2026
Merged

Shinrai merged 2 commits into
nextfrom
feat/sign-release-artifacts

Conversation

@cldmv-bot

@cldmv-bot cldmv-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

🚀 What's Changed

💥 Breaking Changes

No breaking changes

✨ Features

  • feat(publish): enable npm provenance for public packages (0a746ba)
  • feat(publish): sign release artifacts with GPG and attach .asc assets (f44553d)

🐛 Bug Fixes

No bug fixes

📦 Dependencies

No dependency updates

🔧 Other Changes

No other changes

👥 Contributors

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.
@cldmv-bot cldmv-bot Bot added ! feature → next v4 flow: contributor PR targeting the next integration branch type: feature Implements new functionality — a PR or issue that adds a feature area: core Touches core library / runtime source code labels Sep 1, 2026
@Shinrai
Shinrai merged commit 39dc065 into next Sep 1, 2026
16 checks passed
@cldmv-bot
cldmv-bot Bot deleted the feat/sign-release-artifacts branch September 1, 2026 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Touches core library / runtime source code ! feature → next v4 flow: contributor PR targeting the next integration branch type: feature Implements new functionality — a PR or issue that adds a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant