chore(ci): switch publish to OIDC trusted publishing#1839
chore(ci): switch publish to OIDC trusted publishing#1839felixweinberger wants to merge 1 commit intov1.xfrom
Conversation
|
commit: |
There was a problem hiding this comment.
LGTM — straightforward CI change removing token-based auth in favor of OIDC trusted publishing.
Extended reasoning...
Overview
Single-file CI change to .github/workflows/main.yml (v1.x branch). Removes registry-url from actions/setup-node and drops the NODE_AUTH_TOKEN env var from the npm publish step. The id-token: write permission was already present, so OIDC will work without additional changes.
Security risks
This change improves the security posture by eliminating the need for a long-lived NPM_TOKEN secret. OIDC trusted publishing is the recommended modern approach. No new attack surface is introduced.
Level of scrutiny
Low — this is a mechanical two-line deletion in a CI workflow. The companion PR (#1838) made the identical change to the main branch workflow.
Other factors
No bugs found. No changeset needed (CI-only change). The environment: release gate and id-token: write permission already provide the necessary constraints for OIDC to function correctly.
bhosmer-ant
left a comment
There was a problem hiding this comment.
Clean backport — v1.x already had id-token: write job-scoped, --provenance, and environment: release, so dropping registry-url + NODE_AUTH_TOKEN is the whole change.
One parity gap with #1838: that PR adds npm install -g npm@11.5.1 before publish (OIDC needs npm ≥11.5.1; the rationale is not depending on which Node 24 patch setup-node resolves to). This backport omits it. Fails closed if it's ever a problem, so low risk — but for consistency:
- name: Ensure npm CLI supports OIDC trusted publishing
run: npm install -g npm@11.5.1Also noting: the npm trusted-publisher config needs a second entry for v1.x (main.yml / release — different workflow filename than main's release.yml).
Review by Claude, checked by Basil.
v1.x companion to #1838. Drops
NODE_AUTH_TOKENandregistry-url— npm CLI auto-detects GitHub Actions OIDC.id-token: writewas already present.Requires a trusted publisher configured for
@modelcontextprotocol/sdkon npmjs.com (workflowmain.yml, environmentrelease).