Skip to content

[BF-7514]: Update dependencies to resolve CVE in shell-quote - #21

Merged
ThomasTrepanier merged 3 commits into
mainfrom
thomtrep/bf-7514-shell-quote
Jun 25, 2026
Merged

ThomasTrepanier merged 3 commits into
mainfrom
thomtrep/bf-7514-shell-quote

Conversation

@ThomasTrepanier

@ThomasTrepanier ThomasTrepanier commented Jun 23, 2026 •

Copy link
Copy Markdown

Summary

  • Updated shell-quote from 1.8.1 to 1.8.4 in the lockfile to address a critical command injection vulnerability (CVE-2026-9277 / GHSA-w7jw-789q-3m8p).
  • Switched the repo from Yarn Plug'n'Play (default PnP linker) to nodeLinker: node-modules so CI can stay on node-version: lts/* (Node 24).

Why

Shell-quote (Dependabot mhassan1#55): The vulnerable version is transitive via @yarnpkg/builder → @yarnpkg/cli → ink → react-devtools-core. No upstream bump pulls in 1.8.4 reliably, so the lockfile was updated with yarn up -R shell-quote.

Node linker: On Node 24.15+ (lts/* in GitHub Actions), yarn test fails before any tests run. jest-resolve calls require.resolve.paths('/') at module load time; under Yarn PnP, CJS dependencies are loaded through the zip loader and Node no longer exposes require.resolve.paths on that synthesized require (Node 24.15+ / PnP regression). Pinning CI to Node 22 avoided the crash but is not desirable long term. Bumping jest does not fix it (the same call exists in current jest-resolve). Using nodeLinker: node-modules avoids the PnP loader so jest loads as normal CommonJS and works on Node 24 while keeping lts/*.

How was it tested

  • yarn up -R shell-quote updated lockfile to 1.8.4
  • yarn why shell-quote confirms resolved version is 1.8.4
  • yarn test — 39/39 passed locally on Node 24.15
  • CI test job green on lts/* (Node 24)

GitHub Actions lts/* now resolves to Node 24, where jest-resolve fails under Yarn PnP because require.resolve.paths is unavailable in the ESM loader path.
@ThomasTrepanier
ThomasTrepanier marked this pull request as ready for review June 25, 2026 13:48
@ThomasTrepanier
ThomasTrepanier enabled auto-merge (squash) June 25, 2026 13:48
@ThomasTrepanier
ThomasTrepanier disabled auto-merge June 25, 2026 19:05
Node 24.15+ broke require.resolve.paths on the require synthesized for
CJS files loaded via the Yarn PnP zip loader, crashing jest-resolve at
load time. Switching to nodeLinker: node-modules avoids the PnP loader
entirely, so CI can stay on node-version: lts/*. Reverts the Node 22 pin.
@ThomasTrepanier
ThomasTrepanier enabled auto-merge (squash) June 25, 2026 19:42
@ThomasTrepanier
ThomasTrepanier merged commit 9983aa8 into main Jun 25, 2026
2 checks passed
@ThomasTrepanier
ThomasTrepanier deleted the thomtrep/bf-7514-shell-quote branch June 25, 2026 20:02
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