Repository navigation
ci(release): publish to npm via trusted publishing with provenance - #83
Merged
Merged
Conversation
Signed-off-by: Joe Blau <im@joeblau.com>
Signed-off-by: Joe Blau <im@joeblau.com>
Signed-off-by: Joe Blau <im@joeblau.com>
Merged
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.
Fixes the Medium finding from the Oct 27 security check:
@bloxwap/chartwas published from the self-hosted Mac minis with the long-livedNPM_TOKEN, no GitHub environment approval, and no npm provenance.Changes
publishjob inpublish_npm.ymlnow runs on GitHub-hostedubuntu-24.04. npm trusted publishing (OIDC) and provenance only work on GitHub-hosted runners (npm docs). That job is the only exception; every other job stays on the minis.environment: npm-release,permissions: contents: read, id-token: write, npm 11.6.1,npm publish --provenance.needs:on the security release gate (bloxwap/.github v1.1.0,2a70724) is unchanged.NODE_AUTH_TOKENis now scoped to the steps that need it and kept only as a transitional fallback. npm tries OIDC first and falls back to the token, so releases keep working before the npm Trusted Publisher is configured.NPM_TOKENcan be deleted later without breaking releases. It still fails closed when neither is available.Setup (owner)
@bloxwap/chart→ Settings → Trusted publishing → GitHub Actions: organizationbloxwap, repositorychart, workflowpublish_npm.yml, environmentnpm-release, allownpm publish.npm-release: add required reviewer(s). The job creates the environment with no protection the first time if it doesn't exist yet.Validation
A temporary PR-only workflow ran the same publish path on
ubuntu-24.04up tonpm publish --dry-run, with no secrets. It was removed before merge. actionlint and zizmor pass. Nothing was published.