Skip to content

chore(deps): cross-spawn 7.1.2 in both lockfiles - #191

Merged
alejoamiras merged 2 commits into
mainfrom
deps/cross-spawn-7-1-2
Dec 6, 2026
Merged

alejoamiras merged 2 commits into
mainfrom
deps/cross-spawn-7-1-2

Conversation

@alejoamiras

Copy link
Copy Markdown
Collaborator

What

Lockfile-only refresh of cross-spawn from 7.1.0 to 7.1.2. No package.json changes; one entry changes in each lockfile (6 lines in total).

Lockfile Before After Reached through
yarn.lock 7.1.0 7.1.2 eslint 8.53.0 and 8.57.0, lint-staged > execa 8.0.1, glob > foreground-child 3.3.0
services/network-smoke/toolchain/package-lock.json 7.1.0 7.1.2 jest > execa 5.1.1, glob > foreground-child 3.3.1

Why

  • Fixes GHSA-w3gc-668g-rf8f (high, Windows only, patched in 7.1.1): command quoting through cmd.exe. Closes the two open alerts for it (one per lockfile).
  • 7.1.2 also fixes a Windows regression that 7.1.0 introduced in how a batch file's path is passed.
  • cross-spawn is development tooling here (lint, the commit hook, tests), and CI and the images run on Linux only, so the flaw was not reachable; this clears the alerts.

7.1.2 is the newest 7.x release and has passed the 7-day npmMinimalAgeGate (published 2026-11-29T03:57Z). The gate was not bypassed: yarn up -R cross-spawn picked 7.1.2 itself, and the npm lock was produced with npm update --package-lock-only --ignore-scripts --before=<7 days ago> cross-spawn.

What 7.1.1 and 7.1.2 contain

Checked against the published tarballs (7.1.0, 7.1.1, 7.1.2):

  • 7.1.1: the command is always quoted for cmd.exe, double quotes are stripped from it first, trailing whitespace is trimmed, and the command is looked up with the child's PATHEXT (lib/parse.js, lib/util/escape.js, lib/util/resolveCommand.js).
  • 7.1.2: one line in lib/parse.js, the resolved batch file path is passed to the escaping.
  • No new runtime dependency, no install script, no new network or file-system access, no encoded or minified code. package.json gains "prepare": "husky", which neither Yarn nor npm ci runs for a registry dependency (and this repository runs no third-party install scripts).
  • Every changed runtime path sits behind the process.platform === 'win32' check: spawn and spawn.sync behave on Linux as before.
  • The npm lock's integrity equals the registry's.

How it was tested

  • yarn install --immutable, yarn build, yarn lint, yarn test: all exit 0 (936 tests passed, 3 skipped; the skips are environment-gated).
  • Toolchain lock: npm ci --ignore-scripts --dry-run exits 0.
  • Not run locally: a full toolchain install and the network smoke; the smoke workflow on this PR covers them.

Review

One round, both reviewers approve: the diff touches only the two entries, every dependent resolves to 7.1.2, the npm integrity and the Yarn checksum match the registry tarball, the published files match the v7.1.2 tag byte for byte, prepare is never run for a registry dependency, and no Linux code path changes. Noted, not blocking: the upstream git tag is unsigned (the npm tarball carries the registry signature).

🤖 Generated with Claude Code

alejoamiras and others added 2 commits December 6, 2026 16:48
Lockfile only: no package.json changes. The one cross-spawn entry
(^7.0.2 from eslint 8.53.0 and 8.57.0, ^7.0.3 from lint-staged's execa
8.0.1, ^7.0.0 from glob's foreground-child 3.3.0) moves 7.1.0 -> 7.1.2,
the newest 7.x release, published more than 7 days ago
(npmMinimalAgeGate). Only its version, resolution and checksum change,
with the same dependencies.

Fixes GHSA-w3gc-668g-rf8f (high; command injection on Windows when the
command is not a plain program name or path, fixed in 7.1.1). 7.1.2 also
runs batch files by their resolved path on Windows, fixing batch files
that find their own files through %~dp0, broken since 7.1.0 quoted
batch file names. Every runtime
change between 7.1.0 and 7.1.2 sits behind the `process.platform ===
'win32'` check in lib/parse.js; on Linux and macOS the package behaves
as before.

7.1.1 adds a `"prepare": "husky"` script to the package. Yarn runs only
preinstall, install and postinstall for a registry dependency, and
`enableScripts: false` disables even those here.

  yarn up -R cross-spawn

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lockfile only: the toolchain's package.json, its overrides and the Aztec
6.0.0 pins are unchanged. cross-spawn (^7.0.3 from jest's execa 5.1.1,
^7.0.6 from glob's foreground-child 3.3.1) moves 7.1.0 -> 7.1.2, the
newest 7.x release, published more than 7 days ago; only its version,
tarball URL and integrity change, with the same dependencies. Fixes
GHSA-w3gc-668g-rf8f (high; command injection on Windows when the command
is not a plain program name or path); on Linux the package behaves as
before.

The smoke installs with `npm ci --ignore-scripts`. The `prepare` script
7.1.1 adds would not run regardless: npm runs `prepare` only for linked
or git dependencies, never for a registry tarball. Produced with npm
11.19.1:

  npm update --prefix services/network-smoke/toolchain --package-lock-only \
    --ignore-scripts --no-audit --no-fund \
    --before=2026-11-29T16:35:53.000Z cross-spawn

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alejoamiras
alejoamiras merged commit 096acba into main Dec 6, 2026
30 checks passed
@alejoamiras
alejoamiras deleted the deps/cross-spawn-7-1-2 branch December 6, 2026 16:59
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.

1 participant