Conversation
|
| ssm_parameter_pairs: | | ||
| /production/common/launchpad-ui/gh-pat-token = CUSTOM_GITHUB_TOKEN, | ||
| /production/common/releasing/npm/token = NODE_AUTH_TOKEN | ||
| /production/common/launchpad-ui/gh-pat-token = CUSTOM_GITHUB_TOKEN |
There was a problem hiding this comment.
Missing registry-url breaks npm OIDC authentication
High Severity
The migration to OIDC trusted publishing removes NPM_TOKEN but doesn't add registry-url: 'https://registry.npmjs.org' to the actions/setup-node step. npm's OIDC authentication requires setup-node to be configured with registry-url so it generates the correct .npmrc file. Without it, changeset publish will fail to authenticate with npm, and no packages will be published.
There was a problem hiding this comment.
The issue described is incorrect — do not add registry-url here.
Here's why:
actions/setup-node with registry-url generates a .npmrc containing //registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}. That is the token-based auth mechanism, which is exactly what we're moving away from.
npm's OIDC trusted publisher flow works differently: when id-token: write is granted and the package has a trusted publisher configured on npmjs.com, the npm CLI automatically requests a short-lived OIDC token from GitHub's token endpoint at publish time — no .npmrc auth entry needed.
Adding registry-url without also providing NODE_AUTH_TOKEN would actually write a broken .npmrc with an unresolved ${NODE_AUTH_TOKEN} variable, which could cause auth failures rather than fix them.
The current state of the workflow (no registry-url, no NPM_TOKEN, id-token: write present) is the correct configuration for trusted publishers. No change needed.
7a593be to
8584046
Compare
8584046 to
010f6cc
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| ssm_parameter_pairs: | | ||
| /production/common/launchpad-ui/gh-pat-token = CUSTOM_GITHUB_TOKEN, | ||
| /production/common/releasing/npm/token = NODE_AUTH_TOKEN | ||
| /production/common/launchpad-ui/gh-pat-token = CUSTOM_GITHUB_TOKEN |
There was a problem hiding this comment.
npm version too old for OIDC trusted publishing
High Severity
npm OIDC trusted publishing requires npm >= 11.5.1, but Node.js 22 only bundles npm 10.9.7. Since NPM_TOKEN was removed and no step upgrades npm to a compatible version, the workflow has no working authentication mechanism. Publishing via changeset publish will fail with an auth error. A step like npm install -g npm@latest is needed, and setup-node likely needs a registry-url configured for the OIDC flow.


Summary
releases are failing because the npm tokens expired, but the recommended way is to use trusted publishers anyways
Screenshots (if appropriate):
Testing approaches
Note
Medium Risk
Changes the release GitHub Actions workflow permissions and npm publishing authentication (removing the stored npm token), which can break releases or inadvertently broaden workflow write access if misconfigured.
Overview
Updates the
ReleaseGitHub Actions workflow to stop fetching/using anNPM_TOKENfrom SSM and rely on provenance-based publishing (NPM_CONFIG_PROVENANCE: true) instead.Also expands workflow permissions from
contents: readto write access and addspull-requests: writeandissues: writeso the Changesets action can create/update release PRs and related metadata using the provided PAT.Written by Cursor Bugbot for commit 010f6cc. This will update automatically on new commits. Configure here.