Repository navigation
fix(security): patch vitest, vite and launch-editor dev tooling - #2141
Conversation
Clears 10 Dependabot alerts, all dev-only (never in the published CLI): - @vitest/mocker GHSA-qxg6-89mg-rqv8, GHSA-xp26-3454-mjgp: bump vitest and @vitest/ui to ^4.1.12, which pins @vitest/mocker 4.1.12. - vite GHSA-587h-7wmj-h5pm, GHSA-698v-4r3x-3vcv, GHSA-r825-w8mm-5pxw, GHSA-rq7h-c2jc-7f22, GHSA-9jrq-w75r-8gcw: vite is a peer of vitest, so pnpm auto-installed it and the lockfile froze it at 7.3.6 where Dependabot cannot bump it. Declare it as a direct devDependency (^7.3.7) so its version is owned here. An override does not work: it rewrites vitest's peer range and leaves 7.3.6 in place. - launch-editor (same three GHSAs): transitive via @changesets/cli; override floor >=2.14.2, following the shell-quote precedent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
No PR-relevant drift confirmed.
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Local verification on a7245bc:
|
alfred-openspec
left a comment
There was a problem hiding this comment.
Reviewed a7245bc. The security floors match the advisories, and the lockfile resolves one patched copy each of vite 7.3.7, launch-editor 2.14.2, and @vitest/mocker 4.1.12. Independent frozen install/build, low-level audit, and dependency-path checks pass; required CI including Nix validation is green. This is dev-only, and declaring Vite directly gives Dependabot durable ownership of the peer version.
Status: LGTM once Nix Flake Validation is green (the flake hash refresh follows in a second commit). Clears 10 of the 16 open Dependabot alerts (#116–#125). Everything here is dev-only and never ships in the published CLI.
What was wrong:
@vitest/mockervitelaunch-editorRoot cause for vite: vite is a peer dependency of vitest. pnpm auto-installed it, so the lockfile froze it at 7.3.6, which nothing in
package.jsondeclared. Dependabot can't bump a version nobody declares. That's why vite kept getting alerts. An override doesn't fix it either: I triedvite@>=7.0.0 <7.3.7, and it rewrote vitest's peer range while leaving 7.3.6 installed (unmet peer vite@">=7.3.7 <8": found 7.3.6).How it was fixed:
vitestand@vitest/uigo to^4.1.12, which pins@vitest/mocker4.1.12.vitebecomes a direct devDependency,^7.3.7. This repo now owns its version, and Dependabot's development group will keep it patched. It stays on the 7 line, which is what was installed; vite 8 is a separate, deliberate upgrade.launch-editor@<2.14.2: '>=2.14.2 <3'is added as a floor inpnpm-workspace.yaml, with the usual GHSA comment and removal check. This follows theshell-quoteprecedent from fix(security): override shell-quote to clear critical advisory #2085, which uses the same parent.flake.nixpnpmDeps hash is refreshed for the new lockfile.Proof:
pnpm audit --audit-level low: before, 5 advisories (1 high, 3 moderate, 1 low); after,No known vulnerabilities found.pnpm why: exactly one copy each ofvite@7.3.7,launch-editor@2.14.2and@vitest/mocker@4.1.12.Notes: no changeset, since nothing reaches users. The website
nextalerts are fixed separately in #2140.🤖 Generated with Claude Code
Summary by CodeRabbit