fix: bump vitest to ^4.1.11 to resolve GHSA-82fw-gwwq-j7x9 - #484
Merged
Merged
Conversation
Fixes Dependabot alert #44 — path traversal / arbitrary file read via @vitest/mocker's redirect mock in the dev server interceptor plugin. Vulnerable range was >= 2.1.0, < 4.1.11; fixed upstream in 4.1.11.
joe-yeager
requested review from
ashleighliu,
brandenrodgers and
camden11
as code owners
September 16, 2026 16:10
camden11
previously approved these changes
Sep 16, 2026
Vitest 4 tightens `new`-call semantics for mocks: mockReturnValue can no longer stand in for a constructor, and mockImplementation requires a real (non-arrow) function so Reflect.construct can use it. - http/__tests__/index.test.ts: switch http/https Agent mocks from mockReturnValue to mockImplementation with a regular function. - lib/__tests__/uploadFolder.test.ts: convert the FieldsJs mock implementation from an arrow function to a function expression. - config/__tests__/config.test.ts: drop a dead mockGetHsSettingsFile mockReturnValueOnce call in the getAllConfigAccounts() test — getAllConfigAccounts() never reads hs settings, so the queued value went unconsumed and leaked into the next describe block, which now goes uncleared between tests under vitest 4.
camden11
approved these changes
Sep 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description and Context
vitestfrom^3.2.6to^4.1.11(dev dependency) to resolve Dependabot alert #44GHSA-82fw-gwwq-j7x9(CVE-2026-84373): path traversal / arbitrary file read via@vitest/mocker's redirect-mockloadhook on the dev server's unauthenticated HMR socket>= 2.1.0, < 4.1.11; fixed upstream in4.1.11.yarnrcsets--install.no-lockfile true), so thispackage.jsonrange bump is the only change neededPre-review checklist
yarn buildsucceedsyarn test— same pre-existing failures as on^3.2.6baseline (env-dependent URL assertions unrelated to this change), no new failuresyarn eslint --max-warnings=0 .is cleanScreenshots
N/A — dependency version bump, no CLI output or visible behavior change.
TODO
None.
Who to Notify
N/A