Skip to content

chore: bump the vitest trio to 4.1.11 past GHSA-82fw-gwwq-j7x9 (dev-only moderate) #2301

Closed

Description

@cliffhall

Summary

npm audit at 2.6.0 release time reported a moderate, dev-only advisory against the vitest stack, in the root and clients/web installs:

GHSA-82fw-gwwq-j7x9 — Vitest: Path Traversal / Arbitrary File Read via @vitest/mocker Redirect Mock
Affects @vitest/mocker 2.1.0 – 4.1.10, and everything depending on it (vitest, @vitest/coverage-v8, @vitest/browser, @vitest/browser-playwright).

The fix is the 4.1.11 patch. It did not gate the 2.6.0 release — npm audit --audit-level=high exits 0 in all five installs — so it was deliberately deferred out of #2300 rather than forced on release day.

Why it is not a one-line bump

Per AGENTS.md, vitest, @vitest/coverage-v8 and web's @vitest/browser-playwright are pinned exactly and must move together. Editing all three to 4.1.11 bumps the root install cleanly, but clients/web then fails to resolve:

npm error Conflicting peer dependency: [email protected]
npm error   peer vitest@"4.1.11" from @vitest/[email protected]

@vitest/browser-playwright declares an exact peer on vitest, and web does not declare vitest itself — its copy is the peer shadow described in AGENTS.md. Web's lockfile pins that copy at 4.1.10, and neither npm install nor npm update will move it: the exact peer plus the lockfile form a knot npm resolves by refusing.

Deleting clients/web/package-lock.json does clear it — but regenerating re-resolves every caret range in web's tree at once:

  • 298 "version" lines changed
  • package count 649 → 657

That is an uncontrolled dependency update, not a security patch, and it is far too broad to review inside a release-prep PR. Hence this issue.

What to try

  1. An overrides entry in clients/web/package.json pinning vitest to 4.1.11, leaving the rest of the lockfile untouched — the approach AGENTS.md already prescribes for a transitive that will not move (clients/cli pins @types/node this way).
  2. Failing that, a surgical hand-edit of the vitest constellation's entries in web's lockfile (vitest, @vitest/browser, @vitest/browser-playwright, @vitest/mocker, @vitest/runner, @vitest/snapshot, @vitest/spy, @vitest/utils, @vitest/pretty-format), followed by npm install to verify integrity.
  3. If neither is clean, consider whether the 5.0.0 major is the better target — but that is its own issue, not this one.

Whichever lands, the acceptance below is what matters: the three pins move together, and the churn stays confined to the vitest packages.

Acceptance

  • vitest, @vitest/coverage-v8 (root) and @vitest/browser-playwright (web) all read 4.1.11
  • npm audit reports no @vitest/mocker advisory in the root or web installs
  • Lockfile churn is confined to the vitest constellation — no unrelated transitive re-resolution
  • npm run verify:dep-lockstep passes
  • npm run local:gate passes

Context

Found during the 2.6.0 release audit (#2300). The hono advisories reported in the same sweep were fixed there, since hono is a runtime dependency of core/.

Activity

  1. added this to the v2.7.0 milestone on Sep 9, 2026
  2. added
    v2
    chore
    on Sep 9, 2026
  3. self-assigned this
    on Sep 11, 2026
  4. cliffhall commented on Sep 11, 2026

    @cliffhall
    MemberAuthor

    Shipped in #2315 (merged as b0b5060).

    All five acceptance criteria met:

    • ✅ vitest, @vitest/coverage-v8 (root) and @vitest/browser-playwright (web) all read 4.1.11
    • ✅ npm audit reports no @vitest/mocker advisory — 0 vulnerabilities in all five installs
    • ✅ Lockfile churn confined to the vitest constellation (11 version lines at root, 13 in web; clients/{cli,tui,launcher} untouched)
    • ✅ npm run verify:dep-lockstep passes
    • ✅ npm run local:gate passes, Storybook included (RUN v4.1.11)

    Took option 1 from the issue body — a vitest overrides entry in clients/web/package.json — so neither the lockfile regeneration nor the hand-edit was needed. AGENTS.md now records that a vitest bump is four edits rather than three, since the three-pin rule as written does not resolve.

  5. added
    dependencies
    on Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

choredependenciesv2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions