Skip to content

fix: pin pnpm to 11.18.0 so pnpm trusted publishing works - #64

Merged
nimrodkor merged 2 commits into
mainfrom
ci/pnpm-oidc
Jul 29, 2026
Merged

fix: pin pnpm to 11.18.0 so pnpm trusted publishing works#64
nimrodkor merged 2 commits into
mainfrom
ci/pnpm-oidc

Conversation

@nimrodkor

Copy link
Copy Markdown
Contributor

No description provided.

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>
@baz-reviewer

baz-reviewer Bot commented Jul 29, 2026

Copy link
Copy Markdown

Generated description

Pin pnpm to 11.18.0 in packageManager and remove the workflow-specific version override from the release and PR test jobs so npm trusted publishing uses the expected installer version. Allow esbuild in the workspace config so dependency installs keep working under the new pnpm setup.

Topics
TopicDetails
Workspace builds Allow esbuild to build during workspace installs to keep dependency installation working with the new pnpm setup.
Modified files (1)
  • pnpm-workspace.yaml
Latest Contributors(1)
UserCommitDate
nimrod@baz.cofix: allow esbuild bui...July 29, 2026
Trusted publishing Pin pnpm for the release and PR test flows so GitHub Actions and npm trusted publishing use the same version.
Modified files (3)
  • .github/workflows/pr-tests.yaml
  • .github/workflows/release.yml
  • package.json
Latest Contributors(2)
UserCommitDate
nimrod@baz.cofix: pin pnpm to 11.18...July 29, 2026
internal-baz-ci-app[bot]chore(main): release 0...July 29, 2026

Review this PR on Baz | Customize your next review

@baz-reviewer

baz-reviewer Bot commented Jul 29, 2026

Copy link
Copy Markdown

⚠️ Advanced Security cannot run on this PR.

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.

@nimrodkor
nimrodkor requested a review from gruebel July 29, 2026 15:53
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>
@nimrodkor nimrodkor changed the title fix: pin pnpm to 11.18.0 so npm trusted publishing works fix: pin pnpm to 11.18.0 so pnpm trusted publishing works Jul 29, 2026
@nimrodkor
nimrodkor merged commit e128cf3 into main Jul 29, 2026
4 checks passed
@nimrodkor
nimrodkor deleted the ci/pnpm-oidc branch July 29, 2026 16:00
Comment on lines 34 to 37
- name: install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: install dependencies
run: pnpm install

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Severity web_search

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants