Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(): update pnpm to v9.15.0 [security] #1437

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 11, 2024

This PR contains the following updates:

Package Type Update Change OpenSSF
pnpm (source) packageManager minor 9.12.2 -> 9.15.0 OpenSSF Scorecard
pnpm (source) engines minor ^9.0.0 -> ^9.15.0 OpenSSF Scorecard

pnpm no-script global cache poisoning via overrides / ignore-scripts evasion

CVE-2024-53866 / GHSA-vm32-9rqf-rh3r

More information

Details

Summary

pnpm seems to mishandle overrides and global cache:

  1. Overrides from one workspace leak into npm metadata saved in global cache
  2. npm metadata from global cache affects other workspaces
  3. installs by default don't revalidate the data (including on first lockfile generation)

This can make workspace A (even running with ignore-scripts=true) posion global cache and execute scripts in workspace B

Users generally expect ignore-scripts to be sufficient to prevent immediate code execution on install (e.g. when the tree is just repacked/bundled without executing it).

Here, that expectation is broken

Details

See PoC.

In it, overrides from a single run of A get leaked into e.g. ~/Library/Caches/pnpm/metadata/registry.npmjs.org/rimraf.json and persistently affect all other projects using the cache

PoC

Postinstall code used in PoC is benign and can be inspected in https://www.npmjs.com/package/ponyhooves?activeTab=code, it's just a console.log

  1. Remove store and cache
    On mac: rm -rf ~/Library/Caches/pnpm ~/Library/pnpm/store
    This step is not required in general, but we'll be using a popular package for PoC that's likely cached
  2. Create A/package.json:
    {
      "name": "A",
      "pnpm": { "overrides": { "rimraf>glob": "npm:ponyhooves@1" } },
      "dependencies": { "rimraf": "6.0.1" }
    }
    Install it with pnpm i --ignore-scripts (the flag is not required, but the point of the demo is to show that it doesn't help)
  3. Create B/package.json:
    {
      "name": "B",
      "dependencies": { "rimraf": "6.0.1" }
    }
    Install it with pnpm i

Result:

Packages: +3
+++
Progress: resolved 3, reused 3, downloaded 0, added 3, done
node_modules/.pnpm/[email protected]/node_modules/ponyhooves: Running postinstall script, done in 51ms

dependencies:
+ rimraf 6.0.1

Done in 1.4s

Also, that code got leaked into another project and it's lockfile now!

Impact

Global state integrity is lost via operations that one would expect to be secure, enabling subsequently running arbitrary code execution on installs

As a work-around, use separate cache and store dirs in each workspace

Severity

  • CVSS Score: Unknown
  • Vector String: CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:N/VI:L/VA:N/SC:H/SI:H/SA:H

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).


Release Notes

pnpm/pnpm (pnpm)

v9.15.0

Compare Source

v9.14.4

Compare Source

v9.14.3

Compare Source

v9.14.2

Compare Source

Patch Changes

  • pnpm publish --json should work #​8788.

Platinum Sponsors

Bit Bit Figma

Gold Sponsors

Discord Prisma
u|screen JetBrains
Nx CodeRabbit
Route4Me

v9.14.1

Compare Source

Minor Changes

  • Added support for pnpm pack --json to print packed tarball and contents in JSON format #​8765.

Patch Changes

  • pnpm exec should print a meaningful error message when no command is provided #​8752.
  • pnpm setup should remove the CLI from the target location before moving the new binary #​8173.
  • Fix ERR_PNPM_TARBALL_EXTRACT error while installing a dependency from GitHub having a slash in branch name #​7697.
  • Don't crash if the use-node-version setting is used and the system has no Node.js installed #​8769.
  • Convert settings in local .npmrc files to their correct types. For instance, child-concurrency should be a number, not a string #​5075.
  • pnpm should fail if a project requires a different package manager even if manage-package-manager-versions is set to true.
  • pnpm init should respect the --dir option #​8768.

Platinum Sponsors

Bit Bit Figma

Gold Sponsors

Discord Prisma
u|screen JetBrains
Nx CodeRabbit
Route4Me

v9.14.0

Compare Source

v9.13.2: pnpm 9.13.2

Compare Source

Patch Changes

  • Detection of circular peer dependencies should not crash with aliased dependencies #​8759. Fixes a regression introduced in the previous version.
  • Fix race condition of symlink creations caused by multiple parallel dlx processes.

Platinum Sponsors

Bit Bit Figma

Gold Sponsors

Discord Prisma
u|screen JetBrains
Nx CodeRabbit
Route4Me

Silver Sponsors

Leniolabs_ Vercel
Depot moonrepo
devowl.io Cerbos
vlt Vite

v9.13.1: pnpm 9.13.1

Compare Source

Patch Changes

  • Fixed some edge cases where resolving circular peer dependencies caused a dead lock #​8720.

Platinum Sponsors

Bit Bit Figma

Gold Sponsors

Discord Prisma
u|screen JetBrains
Nx CodeRabbit
Route4Me

Silver Sponsors

Leniolabs_ Vercel
Depot moonrepo
devowl.io Cerbos
vlt Vite

v9.13.0: pnpm 9.13

Compare Source

Minor Changes

  • The self-update now accepts a version specifier to install a specific version of pnpm. E.g.:

    pnpm self-update 9.5.0
    

    or

    pnpm self-update next-10
    

Patch Changes

  • Fix Cannot read properties of undefined (reading 'name') that is printed while trying to render the missing peer dependencies warning message #​8538.

Platinum Sponsors

Bit Figma

Gold Sponsors

Discord Prisma
u|screen JetBrains
Nx CodeRabbit
Route4Me

Silver Sponsors

Leniolabs_ Vercel
Depot moonrepo
devowl.io Cerbos
vlt Vite

v9.12.3

Compare Source

Patch Changes
  • Don't purge node_modules, when typing "n" in the prompt that asks whether to remove node_modules before installation #​8655.
  • Fix a bug causing pnpm to infinitely spawn itself when manage-package-manager-versions=true is set and the .tools directory is corrupt.
  • Use crypto.hash, when available, for improved performance #​8629.
  • Fixed a race condition in temporary file creation in the store by including worker thread ID in filename. Previously, multiple worker threads could attempt to use the same temporary file. Temporary files now include both process ID and thread ID for uniqueness #​8703.
  • All commands should read settings from the package.json at the root of the workspace #​8667.
  • When manage-package-manager-versions is set to true, errors spawning a self-managed version of pnpm will now be shown (instead of being silent).
  • Pass the find command to npm, it is an alias for npm search

Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link

vercel bot commented Dec 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
inreach-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2025 9:03pm

@renovate renovate bot requested a review from JoeKarow as a code owner December 11, 2024 07:20
@renovate renovate bot added automerge Enable Kodiak auto-merge dependencies Change in project dependencies. kodiak: merge.method = 'squash' Kodiak will squash merge this PR. security Addressing a vulnerability or security risk in this project. labels Dec 11, 2024
Copy link
Contributor

coderabbitai bot commented Dec 11, 2024

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary or <!-- #coderabbitai summary --> to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

relativeci bot commented Dec 11, 2024

#2142 Bundle Size — 5.64MiB (0%).

63f8609(current) vs 64b2b9c dev#2099(baseline)

Warning

Bundle contains 5 duplicate packages – View duplicate packages

Bundle metrics  Change 1 change
                 Current
#2142
     Baseline
#2099
No change  Initial JS 3.05MiB 3.05MiB
No change  Initial CSS 9.7KiB 9.7KiB
Change  Cache Invalidation 20.13% 24.05%
No change  Chunks 67 67
No change  Assets 80 80
No change  Modules 2016 2016
No change  Duplicate Modules 361 361
No change  Duplicate Code 10.01% 10.01%
No change  Packages 159 159
No change  Duplicate Packages 5 5
Bundle size by type  no changes
                 Current
#2142
     Baseline
#2099
No change  JS 4.4MiB 4.4MiB
No change  Other 1.13MiB 1.13MiB
No change  Fonts 94.54KiB 94.54KiB
No change  CSS 9.7KiB 9.7KiB
No change  IMG 8.57KiB 8.57KiB

Bundle analysis reportBranch renovate/npm-pnpm-vulnerabilityProject dashboard


Generated by RelativeCIDocumentationReport issue

Copy link
Contributor

github-actions bot commented Dec 11, 2024

📦 Next.js Bundle Analysis for @weareinreach/app

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

Copy link

alwaysmeticulous bot commented Dec 11, 2024

🤖 No test run has been triggered as your Meticulous project has been deactivated (since you haven't viewed any test results in a while). Click here to reactivate.

Last updated for commit 63f8609. This comment will update as new commits are pushed.

@renovate renovate bot force-pushed the renovate/npm-pnpm-vulnerability branch from 6750125 to bfc362a Compare December 23, 2024 18:39
@renovate renovate bot force-pushed the renovate/npm-pnpm-vulnerability branch from bfc362a to 28e0adc Compare December 23, 2024 18:59
@renovate renovate bot force-pushed the renovate/npm-pnpm-vulnerability branch from 28e0adc to aa92107 Compare December 23, 2024 21:48
@renovate renovate bot force-pushed the renovate/npm-pnpm-vulnerability branch from aa92107 to f629d74 Compare January 11, 2025 08:20
@renovate renovate bot force-pushed the renovate/npm-pnpm-vulnerability branch from f629d74 to adee2ac Compare January 12, 2025 07:06
@renovate renovate bot force-pushed the renovate/npm-pnpm-vulnerability branch from adee2ac to d63a9fb Compare January 12, 2025 07:41
@renovate renovate bot force-pushed the renovate/npm-pnpm-vulnerability branch from d63a9fb to 9b6db37 Compare January 15, 2025 20:32
@renovate renovate bot force-pushed the renovate/npm-pnpm-vulnerability branch from 9b6db37 to 83037a5 Compare January 15, 2025 23:53
@renovate renovate bot force-pushed the renovate/npm-pnpm-vulnerability branch from 83037a5 to 222969c Compare January 16, 2025 00:38
@renovate renovate bot force-pushed the renovate/npm-pnpm-vulnerability branch from 222969c to dc36742 Compare January 16, 2025 05:12
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@renovate renovate bot force-pushed the renovate/npm-pnpm-vulnerability branch from a824921 to 63f8609 Compare January 23, 2025 20:59
Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@next/[email protected] None 0 3.38 kB vercel-release-bot
npm/@next/[email protected] filesystem 0 78.7 kB vercel-release-bot
npm/@next/[email protected] None 0 14.2 kB vercel-release-bot
npm/@octokit/[email protected] Transitive: network +7 4.78 MB octokitbot
npm/@opentelemetry/[email protected] None 0 1.22 MB pichlermarc
npm/@opentelemetry/[email protected] environment, unsafe 0 909 kB dyladan
npm/@opentelemetry/[email protected] Transitive: environment, network +5 9.59 MB dyladan
npm/@opentelemetry/[email protected] filesystem +2 636 kB dyladan
npm/@opentelemetry/[email protected] environment, filesystem, shell 0 558 kB dyladan
npm/@opentelemetry/[email protected] environment Transitive: filesystem, network +15 12.6 MB dyladan
npm/@opentelemetry/[email protected] None 0 788 kB dyladan
npm/@opentelemetry/[email protected] Transitive: unsafe +3 321 kB dyladan
npm/@opentelemetry/[email protected] None 0 5.34 MB pichlermarc
npm/@playwright/[email protected] None 0 25.5 kB yurys
npm/@prisma/[email protected] environment, filesystem, shell 0 8.49 MB prismabot
npm/@prisma/[email protected] environment Transitive: filesystem +3 637 kB prismabot
npm/@prisma/[email protected] filesystem 0 18.2 kB prismabot
npm/@relative-ci/[email protected] environment, filesystem, shell +2 73 kB relativeci-bot
npm/@sentry/[email protected] network +7 10.1 MB sentry-bot
npm/@sentry/[email protected] environment, filesystem, network Transitive: shell, unsafe +80 38.2 MB sentry-bot
npm/@sentry/[email protected] environment, unsafe Transitive: filesystem, network +40 12.3 MB sentry-bot
npm/@sentry/[email protected] Transitive: filesystem, network +6 5.06 MB sentry-bot
npm/@sentry/[email protected] environment, filesystem, shell Transitive: network +3 6.61 MB sentry-bot
npm/@snaplet/[email protected] None 0 1.89 MB justinvdm
npm/@snaplet/[email protected] Transitive: environment, eval, filesystem, network, shell +36 14.8 MB jgoux
npm/@storybook/[email protected] None +2 57.4 kB shilman
npm/@storybook/[email protected] None +2 70 kB shilman
npm/@storybook/[email protected] None +3 629 kB yannbf
npm/@storybook/[email protected] Transitive: eval, filesystem +16 5.09 MB shilman
npm/@storybook/[email protected] Transitive: environment +4 550 kB shilman
npm/@storybook/[email protected] None +2 71 kB shilman
npm/@storybook/[email protected] None 0 4.08 kB shilman
npm/@storybook/[email protected] None 0 20.6 kB shilman
npm/@storybook/[email protected] None 0 3.3 MB valentinpalkovic
npm/@storybook/[email protected] None 0 1.24 kB shilman
npm/@storybook/[email protected] None 0 3.82 kB shilman
npm/@storybook/[email protected] None 0 1.22 kB shilman
npm/@storybook/[email protected] environment Transitive: filesystem, unsafe +111 13.2 MB shilman
npm/@storybook/[email protected] None 0 1.24 kB shilman
npm/@storybook/[email protected] None +8 3.76 MB shilman
npm/@storybook/[email protected] environment, eval, filesystem, shell, unsafe +34 11.9 MB shilman
npm/@storybook/[email protected] environment, eval +20 6.43 MB shilman
npm/@storybook/[email protected] None 0 1.53 kB shilman
npm/@storybook/[email protected] None 0 1.19 kB shilman
npm/@swc/[email protected] environment, filesystem, shell +2 208 kB kdy1
npm/@swc/[email protected] None 0 231 kB kdy1
npm/@t3-oss/[email protected] None +1 27.6 kB juliusmarminge
npm/@tanstack/[email protected] environment 0 369 kB tannerlinsley
npm/@tanstack/[email protected] environment +1 1.86 MB tannerlinsley
npm/@tanstack/[email protected] environment +1 3.6 MB tannerlinsley
npm/@tanstack/[email protected] None 0 443 kB tannerlinsley
npm/@tanstack/[email protected] Transitive: environment +1 4.05 MB tannerlinsley
npm/@terraformer/[email protected] None 0 92.6 kB jgravois
npm/@textea/[email protected] environment +38 25.8 MB pionxzh
npm/@tomfreudenberg/[email protected] None 0 34 kB tom-freudenberg
npm/@total-typescript/[email protected] None 0 183 kB mpocock
npm/@trpc/[email protected] network 0 253 kB katt
npm/@trpc/[email protected] None 0 111 kB katt
npm/@trpc/[email protected] None 0 285 kB katt
npm/@trpc/[email protected] environment 0 713 kB katt
npm/@turbo/[email protected] Transitive: environment, eval, filesystem +1 935 kB turbobot
npm/@turf/[email protected] None +1 151 kB mdfedderly
npm/@tweenjs/[email protected] None 0 161 kB trusktr
npm/@types/[email protected] None 0 166 kB types
npm/@types/[email protected] None 0 2.77 kB types
npm/@types/[email protected] None +2 250 kB types
npm/@types/[email protected] None 0 647 kB types
npm/@types/[email protected] None 0 9.1 kB types
npm/@types/[email protected] None 0 6.31 kB types
npm/@types/[email protected] None +1 77 kB types
npm/@types/[email protected] None 0 3.58 kB types
npm/@types/[email protected] None 0 120 kB types
npm/@types/[email protected] None 0 3.2 kB types
npm/@types/[email protected] None 0 2.21 MB types
npm/@types/[email protected] None 0 24.1 kB types
npm/@types/[email protected] None 0 16.5 kB types
npm/@types/[email protected] None +1 21.9 kB types
npm/@types/[email protected] None 0 0 B
npm/@types/[email protected] None +1 446 kB types
npm/@types/[email protected] None +1 11.1 kB types
npm/@types/[email protected] None +1 69.1 kB types
npm/@typescript-eslint/[email protected] None +8 5.43 MB jameshenry
npm/@typescript-eslint/[email protected] None +4 1.4 MB jameshenry
npm/@vercel/[email protected] None 0 199 kB vercel-release-bot
npm/@vercel/[email protected] environment, network +1 167 kB vercel-release-bot
npm/@vercel/[email protected] environment Transitive: network +1 789 kB vercel-release-bot
npm/@vercel/[email protected] filesystem, unsafe 0 16.6 MB vercel-release-bot
npm/@vercel/[email protected] Transitive: environment, network +3 468 kB vercel-release-bot
npm/@vercel/[email protected] None 0 282 kB vercel-release-bot
npm/@welldone-software/[email protected] None 0 332 kB vzaidman
npm/[email protected] None +1 836 kB taoweng
npm/[email protected] None 0 53.2 kB esp
npm/[email protected] eval 0 1.03 MB esp
npm/[email protected] None +3 64.5 kB wooorm

🚮 Removed packages: npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected]

View full report↗︎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Enable Kodiak auto-merge dependencies Change in project dependencies. kodiak: merge.method = 'squash' Kodiak will squash merge this PR. security Addressing a vulnerability or security risk in this project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants