Repository navigation
chore(deps-dev): bump vitest from 4.1.0 to 4.1.11 in /mcp-server - #234
Conversation
Closes GHSA-82fw-gwwq-j7x9, a path traversal in @vitest/mocker's redirect mock that lets a test read files outside the project root. The declared range ^4.0.18 already admitted the patched 4.1.11, so only the lockfile changes. The upgrade re-resolves vitest's whole subtree: vite 8.0.16 -> 8.3.4, rolldown 1.0.3 -> 1.2.13 and lightningcss 1.32.0 -> 1.33.0 all move with it, which is why this needs a human to decide rather than landing on sight. npm 10.9.4 cannot resolve vitest 4.1.11 - arborist crashes on its new optional peers. The lockfile was regenerated with npm 11; `npm ci` reads it on any npm 7+. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GVCFkRWb2LY9DCPdeFkofo
|
| Topic | Details | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Build toolchain refresh | Refresh the transitive Vite build stack, including rolldown, platform bindings, lightningcss, and related packages required by the updated test tooling.Modified files (1)
Latest Contributors(2)
| |||||||||
| Test security update | Upgrade vitest and its supporting packages to patched versions, removing the development-only @vitest/mocker vulnerability and preserving the existing test workflow.Modified files (1)
Latest Contributors(2)
|
Triage verdict: Tier B — needs a decisionCI has now run for head
This is not auto-merged, and the reason is a single line of the rubric: the lockfile diff is 42 stanzas against a Tier A ceiling of 3. Everything else qualifies — same minor, The 42 stanzas are not incidental: moving vitest to 4.1.11 re-resolves its whole subtree, carrying No SLA pressure: Vanta files no finding for this advisory, so nothing is counting down. It is safe to sit on this if the toolchain move wants more thought than a dependency bump deserves. Generated by Claude Code |
What and why
vitestdevDependencies@vitest/mockervitest > @vitest/mockerBoth are the same advisory, GHSA-82fw-gwwq-j7x9 — "Vitest: Path Traversal / Arbitrary File Read via @vitest/mocker Redirect Mock", CWE-22,
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N. Affected range>=2.1.0 <4.1.11.No Vanta finding and therefore no SLA deadline. This is in the lockfile but not in Vanta —
npm auditraises it, Vanta files nothing for this repository. It is reported as a gap in today's triage digest rather than left to surface on its own.Exposure
development.npm ls vitest --omit=devis empty: vitest is reachable only throughdevDependencies, and nothing it pulls in reaches the published@currents/mcpartifact. The advisory needs a test run that loads an attacker-supplied redirect mock, so in this repository the practical exposure is a contributor running the suite on a hostile branch.The fix
lockfile-upgrade. The declared range is alreadyvitest: ^4.0.18, which admits the patched 4.1.11, so no manifest edit and no override — onlymcp-server/package-lock.jsonchanges.Breaking-change check
Same major and same minor; 4.1.0 to 4.1.11 is a patch series. No breaking-change or removal section applies. The upgrade does re-resolve vitest's whole subtree, which is the part worth a reviewer's attention:
viterolldown(+ 13 platform binaries)lightningcss(+ 11 platform binaries)chaipostcsspicomatchnanoid42 stanzas change in total, one added (
@rolldown/binding-android-arm-eabi) and one removed (vite/node_modules/@rolldown/binding-wasm32-wasi). Every one of those moves within its existing declared range — none is a major, and none was pinned.npm version note
npm 10.9.4 cannot resolve vitest 4.1.11: arborist crashes with
Cannot read properties of null (reading 'edgesOut')in#loadPeerSetwhile walking the optional peers that 4.1.11 adds (@vitest/coverage-v8,@vitest/coverage-istanbul). The lockfile here was regenerated with npm 11, which resolves it cleanly.This does not affect CI:
npm ciinstalls exactly what the lockfile names and works on any npm 7+. It does mean a contributor on npm 10 who runs a barenpm installmay hit that crash — a pre-existing npm bug this upgrade makes reachable.To confirm the churn is the upgrade and not the npm switch:
npx npm@11 install --package-lock-onlyon the unmodified tree produces a zero-line diff.Verification
Everything below was run in this sandbox against this commit.
npm cimain(0 warnings)git diff --name-onlymcp-server/package-lock.jsonalonenpm run formatnpm run sync-readme:checknpx tsc --noEmitnpm run buildnpm run test:runnpm auditvitestand@vitest/mockerboth goneThe 6 remaining high advisories are the
basic-ftpchain underrelease-it, untouched by this PR and not fixable without abasic-ftpmajor —get-uripinsbasic-ftp@^5.3.1andrelease-itpins the chain above it exactly.CI coverage
A
mcp-server/package-lock.jsondiff triggers Unit Tests (test.yml), which runs on everypull_requesttomainwith nopathsfilter, across Node 20.x / 22.x / 24.x —npm ci,npm run build,npm run test:run.It does not trigger
publish.yaml,promote.yaml,release.yaml(allworkflow_dispatch),linear-release.yamlorpost-release.yaml(push/merge tomain), orsync-from-monorepo.yaml.What a human should still check
This is Tier B on the triage rubric, for one reason: the lockfile diff is 42 stanzas, well over the 3-stanza Tier A ceiling, because the upgrade carries vite, rolldown and lightningcss with it. Everything else about it is Tier A — same minor, dev-only, no manifest edit, no patch file, no majors collapsed, no new peer warnings, full suite green.
So the decision is whether moving the build toolchain (vite 8.0.16 → 8.3.4, rolldown 1.0.3 → 1.2.13) is acceptable for a moderate, dev-only path traversal.
tsdownbuilds on rolldown, so that is the piece to look at — the build and the full 1195-test suite both pass here on the new versions.It is not eligible for automatic merge, and was not merged.
Needs release
None.
vitestis adevDependency; the published@currents/mcppackage is unchanged. The commit is typedchore(deps-dev)so it does not trigger a release-it version bump.🤖 Generated with Claude Code
https://claude.ai/code/session_01GVCFkRWb2LY9DCPdeFkofo
Generated by Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.