8000 quint: override tar to 8.1.2 and cross-spawn to 7.1.2 (clears 21 Dependabot alerts) by bryan-minimal · Pull Request #1848 · gominimal/pkgs · GitHub
[go: up one dir, main page]

Skip to content

quint: override tar to 8.1.2 and cross-spawn to 7.1.2 (clears 21 Dependabot alerts) - #1848

Open
bryan-minimal wants to merge 2 commits into
mainfrom
quint-tar8-overrides
Open

bryan-minimal wants to merge 2 commits into
mainfrom
quint-tar8-overrides

Conversation

@bryan-minimal
@bryan-minimal bryan-minimal commented Dec 4, 2026 •
Copy link
Copy Markdown
Member

Clears the 21 open Dependabot alerts on packages/quint/package-lock.json (1 critical, 19 high, 1 medium, all opened 2026-12-02/03).

What

  • tar 7.5.23 → 8.1.2: 20 node-tar advisories (symlink containment bypasses, PAX parsing, memory and CPU amplification). Nearly all are fixed only in 8.0.0; tar has no maintained 7.x line, and quint 0.35.0 asks for ^7.5.13. So an npm overrides entry in package.json forces 8.1.2. It has no dependencies, so @isaacs/fs-minipass, chownr, minipass, minizlib and yallist leave the tree.
  • cross-spawn 7.0.6 → 7.1.2: GHSA-ghv9-86vm-4v8m (the critical; command injection when spawning batch files, Windows only). 7.1.x is within quint's own range; pinned by the same overrides block.
  • The lock is regenerated with npm install --package-lock-only (npm 11.21.3); no other package moves.

Exposure, and the one call tar 8 changes

quint uses tar in one place: dist/src/download.js's downloadAndUnpack.

  • Unreachable in our build: the evaluator download (the patched getRustEvaluatorPath() returns the packaged evaluator), and quint verify's default Apalache (quint: run quint verify on the packaged apalache, never a download #1627 points it at the packaged one).
  • Still reachable: quint verify --apalache-version <other>, and the veil (Lean) setup, which downloads elan.

tar 8's extract() reads the archive itself and returns a promise instead of a stream (quint-co/quint#2110 notes this), so quint's pipeline(createReadStream(archive), tar.extract(...)) would fail under the override. build.sh rewrites that one call to tar 8's form, await tar.extract({ file: archive, cwd: unpackDir, strict: true }), which is what #2110 asks upstream to do. It fails the build if the call has moved, so a quint that has switched to tar 8 makes us drop the override and the rewrite.

Guard

After npm ci, build.sh:

  • checks the installed tar is 8.x;
  • rewrites the call (exactly one match, verified after);
  • runs the real downloadAndUnpack end to end, with a stubbed fetch() serving a .tar.gz made in the build: the sha256 check passes and the entry lands with the right contents.

Upstream quint-co/quint#2110 (open, 2026-12-02) asks for tar >=8.0.2; once quint ships that, the override and the rewrite go.

Updates keep it

pkgmgr's lockfile-flavor bump rewrites only the @informalsystems/quint pin in package.json (rewrite_package_json_pin, a literal replace) and reruns npm install --package-lock-only, so the overrides block survives future quint bumps.

Tested in a min session (pkgbuild loadout)

  • min package build --rebuild quint succeeds with the guard.
  • min check --packages quint passes, including the standalone tests: version_check, and simulate (typecheck, plus both simulator backends with QUINT_HOME left empty).
  • Negative controls:
    • With the rewrite removed, the build fails in quint's own unpack under tar 8: Error unpacking …: TypeError [ERR_MISSING_ARGS]: The "streams" argument must be specified. Without the end-to-end check, this PR would have broken --apalache-version and the veil setup.
    • With the version check changed to require 9.x, the build fails with "tar is 8.1.2, not the 8.x override".

🤖 Generated with Claude Code

…alerts)

node-tar's 2026-12-02/03 advisories are fixed only in tar 8, outside
quint 0.35.0's ^7 range; cross-spawn 7.1.2 fixes the Windows-only
GHSA-ghv9-86vm-4v8m. npm overrides in package.json, lock regenerated.
build.sh checks the overridden tar loads, has extract(), and is 8.x.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bryan-minimal
bryan-minimal requested a review from a team as a code owner December 4, 2026 01:04
@coderabbitai
coderabbitai Bot commented Dec 4, 2026 •
Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Quint pins tar and cross-spawn versions in its npm package configuration. After installing dependencies, the build script checks for tar.extract, verifies the installed tar version is 8.x, and confirms that Quint’s download.js loads.

Changes: Quint dependency validation

Layer / File(s) Summary
Dependency pins and build checks
packages/quint/package.json, packages/quint/build.sh
The package overrides pin tar to 8.1.2 and cross-spawn to 7.1.2. The build script checks that tar.extract exists, download.js loads, and the installed tar version is 8.x. Each failed check exits with an error.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

  • Issue 755: The overrides pin two transitive dependency versions, which relates to the issue’s objective of reducing dependency drift. This change does not establish that installs use a committed lockfile with frozen installs.

Suggested reviewers: norrietaylor

Merge Risk: Minimal · up to 7f5c4 · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: overriding tar to 8.1.2 and cross-spawn to 7.1.2 in packages/quint. The objectives state the goal of clearing 21 Dependabot alerts, which the title also states. The ti…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title names the main change: overriding tar to 8.1.2 and cross-spawn to 7.1.2 in packages/quint. The objectives state the goal of clearing 21 Dependabot alerts, which the title also states. The title is specific and matches the package.json override and the build.sh guard. It does not cover the build.sh version guard, but that detail is secondary.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 19a4a88 and 7f5c454.

Files ignored due to path filters: 1

  • packages/quint/package-lock.json is excluded by !**/package-lock.json
Files selected for processing: 2

  • packages/quint/build.sh
  • packages/quint/package.json

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

…to end

tar 8's extract() reads the archive and returns a promise, not a stream,
so quint's pipeline(createReadStream(archive), tar.extract(...)) fails
under the override (quint-co/quint#2110). That path is still reachable via
`quint verify --apalache-version <other>` and veil's elan setup. Rewrite
the one call to tar 8's form and exercise downloadAndUnpack in the build
with a stubbed fetch. Control: without the rewrite the build fails with
ERR_MISSING_ARGS in quint's unpack.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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

0