fix: pin pnpm to 11.18.0 so pnpm trusted publishing works - #64
Conversation
pnpm < 11.1.3 passed setup-node's unresolved
`_authToken=${NODE_AUTH_TOKEN}` placeholder through as a bearer token
instead of falling back to OIDC, so `pnpm publish` failed with a 404.
See pnpm/pnpm#11513
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Generated descriptionPin Topics
|
|
Your organization's Advanced Security usage limit has been reached. To continue using Advanced Security reviews, please upgrade your plan or increase your usage limits in your account settings. |
pnpm 11 fails the install outright on ignored build scripts (ERR_PNPM_IGNORED_BUILDS), which would break the release job. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
| - name: install pnpm | ||
| uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: 10 | ||
| - name: install dependencies | ||
| run: pnpm install |
There was a problem hiding this comment.
pnpm/action-setup@v4 omits with.version, so it falls back to the packageManager field in the PR's package.json — an unreviewed PR can inject an arbitrary pnpm version/binary into CI before pnpm install runs. Should we pin the version explicitly with with: { version: '11.18.0' } so installation doesn't depend on PR-controlled content?
Want Baz to fix this for you? Activate Fixer
Prompt for AI Agents
Before applying, verify this suggestion against the current code. In
.github/workflows/pr-tests.yaml around lines 34-37 in the "install pnpm" step using
pnpm/action-setup@v4, the workflow currently omits the required with.version, so pnpm
version selection is influenced by the PR-controlled package.json "packageManager"
field, letting an attacker inject an arbitrary pnpm version/binary into CI before pnpm
install runs. Fix by reintroducing an explicit pinned pnpm version in that step (e.g.,
with: { version: '11.18.0' }, matching the version currently used by the project) so CI
always installs the expected pnpm binary regardless of PR content. If pnpm/action-setup
supports an option to ignore/override the package.json packageManager field, enable it
as well to prevent future bypasses.
No description provided.