Repository navigation
fix(deps): re-lock vitest and the @vitest/* family onto 4.1.12 for the two @vitest/mocker OSV advisories - #25164
Merged
objectstack-fleet[bot] merged 1 commit intoOct 22, 2026
Conversation
…e two @vitest/mocker OSV advisories The scheduled OSV scan on main matches GHSA-qxg6-89mg-rqv8 and GHSA-xp26-3454-mjgp on @vitest/mocker 4.1.11; both are fixed in 4.1.12, the newest 4.1.x. Every declared range (vitest ^4.1.11 in 79 manifests, @vitest/coverage-v8 ^4.1.11 in one) already admits 4.1.12, so this is a re-lock only: the nine family members move 4.1.11 -> 4.1.12 together, and the four better-auth 1.7.12 snapshots rewrite their optional vitest peer suffix. No other package moves, no manifest range moves, and the lockfile's overrides section is unchanged. Claude-Session: https://claude.ai/code/session_01FM29ZqLTrnPNXxijioZwMp Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
Seat reviewACCEPT ·
This seat readies the PR and queues it with auto-merge. Generated by Claude Code |
objectstack-fleet
Bot
deleted the
claude/issue-25163-vitest-mocker-osv
branch
October 22, 2026 04:52
This was referenced Oct 22, 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.
Fixes #25163
Clause-②: no
What this does
main's scheduledValidate Dependenciesrun 39714768704 (job 119614140669,mainat6b44efa7b4) is red at its OSV step on two Medium advisories in@vitest/mocker4.1.11, and both name 4.1.12 as the fix. 4.1.12 is the newest 4.1.x on npm (published 2026-10-15). Every declared range on every path already admits it, so this is a re-lock only.pnpm-lock.yamlis the whole diff: no override, noosv-scanner.tomlexemption, and nopackage.jsonrange.vitest5.x is not touched.pnpm why -r)@vitest/mocker4.1.11ofvitest@4.1.11, 2 peer variationsvitest^4.1.11in 79 importers: 78 under one peer variation,@objectstack/accountunder the other. Also the optional peer^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0ofbetter-auth,@better-auth/oauth-provider,@better-auth/scimand@better-auth/sso1.7.12@vitest/coverage-v8vitestexactly, so it moves with it)^4.1.11in@objectstack/spec@vitest/expect,@vitest/pretty-format,@vitest/runner,@vitest/snapshot,@vitest/spy,@vitest/utils4.1.11ofvitest@4.1.11No
@vitest/uior any other@vitest/*package is in the lockfile.The two
~4.0.0declarations are both inpackages/create-objectstack/src/templates/blank/package.json(devDependencies.vitestandoverrides.vitest). That file is a scaffold template, not a workspace importer: it matches nopnpm-workspace.yamlglob, the lockfile has no importer for it, and no 4.0.xvitest/@vitest/*entry is in the lockfile. They are left alone. What they resolve to in a scaffolded project is in Acceptance notes.The advisories, read from the OSV npm database
api.osv.dev,api.github.com/advisoriesand thegithub.com/advisoriespages all answer 403 from this container. The two records were read instead from the OSV npm database archive (osv-vulnerabilities.storage.googleapis.com/npm/all.zip, fetched 2026-10-22 03:17 UTC):interceptorPluginacceptsvitest:interceptor:registerevents on Vite's dev-server WebSocket without authentication, andcreateManualModuleSourceinterpolates the mock's URL into generated module source without escaping. Affected: from 2.1.0-beta.7 up to the fix in 4.1.12, and from 5.0.0-beta.1 up to the fix in 5.0.3.What 4.1.12 changes. I diffed the published 4.1.11 and 4.1.12 tarballs of all nine family members:
@vitest/mocker'sdist.createManualModuleSourcenow usesJSON.stringifyfor the URL and the export names, and the redirect join now applies a backslash-to-slashslash()to the pathname.vitestchanges only its version string and two chunk-hash renames.@vitest/coverage-v8changes only its version string.runner,expect,snapshot,spy,utilsandpretty-formathave 0 non-manifest diff lines.vitest:@vitest/browser-webdriveriogoes from4.1.11to^4.1.11. That is the self-contradictory peerd795719926measured against npm 10. It is optional and not installed in this workspace, and pnpm prints no warning for it.How the lockfile was moved, and the route rejected first
pnpm update. I measuredpnpm update -r --no-save vitest @vitest/coverage-v8. It did reach 4.1.12 for all nine members and moved nopackage.json. It also touched 29 package names outside the family inpackages:(24 replaced, 5 added), at +317/−284 lines:@inquirer/ansi/confirm/core/type,seroval1.6.8 → 1.7.0,seroval-plugins1.6.8 → 1.6.12, andchai6.2.2 → 6.3.0;rolldownand its 15 bindings 1.2.14 → 1.2.15, and@oxc-project/types0.154.0 → 0.155.0;@babel/runtime,ip-address,nanoid,postcssandset-cookie-parser;snapshots:, rewrittenknex,tsup,postcss-load-configandfumadocs-mdxkeys, and changed bodies on 7 same-key snapshots (@tanstack/router-core,@testing-library/dom,headers-polyfill,msw,socksand bothvite8.3.4 variations).pnpm updatein this workspace, plus therolldown,@oxc-project/typesandchaimoves.vitest: '4.1.12','@vitest/coverage-v8': '4.1.12') to theoverridesblock ofpnpm-workspace.yaml, under an EXIT trap that restores the file, and ranpnpm install.pnpm installagain. The second install keeps the resolutions, because every declared range admits them.git hash-object pnpm-workspace.yamlequals the HEAD blobd9b99fcddf13011318845269277987410889b7c0, andgit diff HEAD -- pnpm-workspace.yamlis empty.Lockfile diff scope
pnpm-lock.yamlonly, +159/−159. I compared the parsed lockfiles, base6b44efa7b4against head9ada86315f:packages:1340 → 1340 keys: 9 removed, 9 added, which are exactly the nine family members 4.1.11 → 4.1.12. No same-key entry changed.snapshots:1347 → 1347 keys: 15 removed, 15 added.vitestand@vitest/mockereach have two peer variations, which differ only invite'sesbuild0.28.1 / 0.28.2 peer.better-auth,@better-auth/oauth-provider,@better-auth/scimand@better-auth/sso1.7.12. They rewrite only theirvitestpeer suffix:better-auth1.7.12 declaresvitestas an optional peer, and pnpm binds it to the workspace's copy.importers:85 → 85, 0 specifier moves.vitestand 1@vitest/coverage-v8version strings move to 4.1.12.better-authversion strings in@objectstack/plugin-authchange only their peer suffix.lockfileVersion(9.0),settings,overridesandpatchedDependencies.chaistays at 6.2.2.Local proofs, at
9ada86315fpnpm install --frozen-lockfile --prefer-offline(the workflow's lockfile step)node scripts/check-changeset-fixed.mjs"fixed" group is in sync with 73 public workspace packagespnpm check:override-consistency(the published-manifest override check)9 published-manifest declaration(s) covered by pnpm-workspace.yaml overrides all resolve to their override targetspnpm check:vendor-export-contract-resolveVERDICT: PASS — vendor export contract (registry resolution, installed with npm@11.21.0), 3 edge(s) verifiednode scripts/check-osv-exemptions.mjs --self-testand the bare run1 OSV exemption(s) … all carry an unexpired ignoreUntil within 90 days and a reason with an advisory linknode scripts/osv-base-relative.mjs --self-test23 case(s), all held (floor 23)pnpm --filter @objectstack/spec build(shared verify lock)VERDICT command-exit 0pnpm --filter @objectstack/formula test(shared verify lock)RUN v4.1.12, 51 files / 1367 tests passed. Includessrc/cel-env-reuse.test.ts, which module-mocks@marcbachmann/cel-jswithvi.mock(…, async (importOriginal) =>):@vitest/mocker's path. Resolved from the package:vitest4.1.12,@vitest/mocker4.1.12pnpm --filter @objectstack/types test(shared verify lock)RUN v4.1.12, 29 files / 774 tests passed@objectstack/spec's sixvi.mocktest files with--coverage(provider v8, shared verify lock)RUN v4.1.12,Coverage enabled with v8, 6 files / 101 tests passed. This loads@vitest/coverage-v84.1.12 against its exactvitest4.1.12 peerpnpm installprintsioredis-mock 8.13.1: unmet peer ioredis@^5: found 6.0.0. That warning is already onmainand is not caused by this diff.OSV reading
I measured with OSV-Scanner 2.5.0, the binary the workflow's pinned action image ships. Its sha256
edcfc41d…524e0cmatches the release'sSHA256SUMS.api.osv.devis refused by this container's egress proxy, so the scans ran offline (--offline-vulnerabilities --download-offline-databases) against the npm database downloaded 2026-10-22 03:24 UTC. Each side ran under its ownosv-scanner.toml, with the identical invocation.6b44efa7b4: exit 1. The 2 rows are the scheduled run's: 1340 packages,@vitest/mocker4.1.11, fixed in 4.1.12, CVSS 4.7 and 5.9. The sprintf-js exemption is filtered.9ada86315f: exit 0,No issues found. The sprintf-js exemption is filtered here too. That is the control that shows the database loaded and matched.--lockfile=pnpm-lock.yamlfrom the worktree root, ledger auto-loaded): exit 0,No issues found, withLoaded npm local dband the exemption filtered.scripts/osv-base-relative.mjsover both JSON results: exit 0,0 introduced, 0 inherited, 2 resolved.--download-offline-databases, printedNo issues foundat exit 0. It printed noLoaded npm local dbline and no filtered exemption, so it had loaded no database. It is not counted.What closes the card's last clause is the next scheduled (or a
workflow_dispatch)Validate Dependenciesrun onmain. This PR's own run takes the base-relative path.Changeset:
skip-changeset, measuredNothing publishes.
pnpm-lock.yamlalone. Nopackage.jsonchanged, so every published package's declared ranges are byte-identical, and a downstream install resolves exactly as before.vitestor any@vitest/*package as adependency,peerDependencyoroptionalDependency(0 hits over every trackedpackage.json).tsupconfig namesvitestinnoExternal(0 hits).@objectstack/specdisthas 0 files naming@vitest/orcreateManualModuleSource. The positive control is 7 files in@vitest/mocker4.1.12's owndist..changeset/*.mdfile is touched.Gates
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackat9ada86315fderived 19 commands from 1 path. I ran all 19, each exit captured before any pipe.--ranreconciliation:19 derived, 17 run, 2 NOT-MEASURED, 0 UNRUN.nodegatescheck-changeset-fixed,check-closing-keyword-parity(+--self-test),check-comment-mask-corpus,check-dts-emitted --self-test,check-osv-exemptions(+--self-test) andosv-base-relative --self-test;pnpmgatescheck:driver-memory-census,check:dts-closure,check:gitlink-declared,check:nul-bytes,check:override-consistency,check:refd-timer-probe,check:sourcemap-no-sources-content,check:vendor-export-contract-resolveandcheck:watch-hint-literal.check:dts-closureandcheck:sourcemap-no-sources-contentswept only the one built package,@objectstack/spec.pnpm check:dual-build-cjs-loadsandpnpm check:lean-entry-closureeach exit 3 (PREREQUISITE NOT MET, built output absent; both need a fullpnpm build). CI'sBuild CoreandLint & Repo Gatesmeasure them on the built tree.git merge-tree --write-tree origin/main HEAD(origin/main=06900c9c23): exit 0, clean.pnpm-lock.yamlis not routed to theos-regendriver, so this local reading answers GitHub's question. The 1 commitmaingained since the base touches none ofpnpm-lock.yaml,pnpm-workspace.yaml, anypackage.jsonorosv-scanner.toml.Acceptance notes
@vitest/mocker.create-objectstackcopiessrc/templatesintodist/templates, andfilesshipsdist. So the blank template'svitest: ~4.0.0, held by its matching npmoverrides, ships.~4.0.0resolves tovitest4.0.18 today, which depends on@vitest/mocker4.0.18 exactly. That is inside GHSA-qxg6-89mg-rqv8's affected range, and the advisory names no 4.0.x fix. GHSA-xp26-3454-mjgp does not reach 4.0.x.d795719926):vitest4.1.12's self-contradictory@vitest/browser-webdriverio ^4.1.11peer crashes npm 10's arborist withedgesOut. Lifting it is a trade-off and outside this card's file surface.packages/spec/vitest.config.ts,packages/cli/vitest.config.ts, and the@vitest/runner@4.1.11withTimeoutnotes inpackages/clienttests). After this re-lock they name the previous patch. The tarball diff above shows@vitest/runnerand thevitestCLI are byte-identical apart from the version string, so the recorded behaviour still holds on 4.1.12. CI'sTest Coreruns the suites that spawn a real vitest child to pin it. Class: none; carrier: none.pnpm updatere-resolves a fixed set of unrelated packages even when it is targeted. The temporary-override re-lock is the route that keeps a lockfile refresh narrow. Class: none (tooling behaviour, not a defect of this repo); carrier: none.git pushprinted GitHub's notice of "3 vulnerabilities on the default branch (1 critical, 2 moderate)". The two moderate match this card. The OSV scan ofmainmatches nothing else outside the exempted sprintf-js advisory. Dependabot alerts are not readable from this session (Resource not accessible by integration, 403), so the critical one is not identified here. Class: none; carrier: none.Generated by Claude Code