Repository navigation
ci: publish to npm via Trusted Publishing (OIDC) instead of NPM_TOKEN - #255
hivecommons-hive[bot] wants to merge 1 commit into
Conversation
Signed-off-by: scanner <scanner@hive.kubestellar.io>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
hive/awaiting-ci: needs the npm-side Trusted Publisher configured by a maintainer before merge; please apply hold. CI pending. 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
|
Converted to draft deliberately: agents cannot apply 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
There was a problem hiding this comment.
Reviewed (security) — no blockers; one low-severity note.
.github/workflows/publish.yml:67— the fallbacknpm install -g npm@latestis unpinned and runs inside the job that holds the OIDC token (the same job whose comment at lines 70-71 says lifecycle scripts must not run there). Withnode-version: 24(line 58) the bundled npm is ≥ 11.5.1 so this branch is unlikely to be taken, but when it is, it pulls an uninspected latest npm into the publish job. Consider pinning (e.g.npm@11.5.1or a specific version) so the fallback is deterministic.
Verified unchanged trust boundary: permissions: id-token: write (lines 9-11) was already present at merge-base for --provenance; verify-tag (lines 30-36) still restricts publishing to tags reachable from main, which matches the exposure the previous NPM_TOKEN already had on tag pushes.
— hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Reviewed (docs-currency) — one minor in-scope gap, non-blocking.
.github/workflows/publish.yml:88— the new "Require OIDC token" step fails with…see runbooks/publish-failure.mdwhenACTIONS_ID_TOKEN_REQUEST_URLis unset (noid-token: write). Butrunbooks/publish-failure.md:32-38only describes the other OIDC failure (npm rejecting the token → check the Trusted Publisher on npmjs.com). An operator following the error message finds no guidance for the case it names. Suggest one sentence in that section: if the job failed at "Require OIDC token", theid-token: writepermission atpublish.yml:9-11was removed or is not granted in this run context (e.g. a fork/dispatch) — restore it and re-run.
Checked: runbooks/release-rollback.md, runbooks/README.md, CONTRIBUTING.md, README.md — no remaining NPM_TOKEN/NODE_AUTH_TOKEN references; Node 24 for the publish job is already in the test.yml:22 matrix.
— hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88
f8eef2a
ℹ️ Sentinel notice — informational; author is trusted (hive agent), merge is not blockedHive flagged this PR (author @hivecommons-hive[bot], head
Hive did not add the |
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Closing as superseded. OIDC Trusted Publishing is already live on
The |
What changed
Mirror of hivecommons/promptargs#223:
.github/workflows/publish.ymlnow publishes to npm via Trusted Publishing (OIDC) instead of the long-livedNPM_TOKENsecret.publishjob documenting the expected npm-side Trusted Publisher.setup-nodenode-version22 -> 24 (action SHA unchanged).ACTIONS_ID_TOKEN_REQUEST_URL.Publish to npm (Trusted Publishing), with noNODE_AUTH_TOKEN/env.runbooks/publish-failure.mdnow describes the Trusted Publisher check instead ofNPM_TOKEN.changelog.d/changed-publish-trusted-publishing.md.The repo has 0 GitHub Environments, so the Trusted Publisher environment field stays blank.
Before merging (maintainer action required)
@hivecommons/pluk, add a Trusted Publisher: GitHub Actions, ownerhivecommons, repositorypluk, workflowpublish.yml, environment blank.NPM_TOKENrepository secret.Please add
holduntil the npm-side Trusted Publisher is configured — merging first would break the next tag publish.— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88