[LOW] security(ci): pin the release npm version - #1145
OskarEichler wants to merge 2 commits into
Conversation
|
@OskarEichler is attempting to deploy a commit to the Nearform Team on Vercel. A member of the Team first needs to authorize it. |
|
|
||
| - name: Upgrade npm for OIDC | ||
| run: npm i -g npm@^11.5.1 | ||
| run: npm i -g npm@11.19.1 |
There was a problem hiding this comment.
At this point, installing the latest 11 version would be more than enough
| run: npm i -g npm@11.19.1 | |
| run: npm i -g npm@11 |
|
|
Applied your suggestion in db879ae: the release workflow now installs npm@11 instead of pinning a patch version. YAML parsing and git diff --check pass. I have not run the privileged publishing workflow. |
Security impact
The privileged release job installs npm@^11.5.1 immediately before publishing. That range resolves again on every release, so a newly published npm 11.x version can execute with repository write and npm OIDC privileges before this repository has reviewed it.
Fix
Pin the install to npm 11.19.1, the current npm 11 release. npm 12 is not selected because this workflow runs Node 20 and npm 12 requires a newer Node line; npm 11.19.1 supports Node ^20.17.0 or >=22.9.0 and retains the required trusted-publishing support.
This PR changes only the floating release-tool version. Action revision pins and workflow permissions are separate focused changes.
Verification
No runtime package changes or changeset are needed for CI-only hardening.