fix(security): bump vitest 4.1.8 → 4.1.11 in tests/ts — closes alerts #50, #51 (GHSA-82fw-gwwq-j7x9) - #43
Conversation
… #50, #51 Recreates Dependabot PR #42's fix on a human-authored branch so it gets CI secrets. Closes GHSA-82fw-gwwq-j7x9 (@vitest/mocker path traversal), and incidentally clears GHSA-2v37-7h3g-55p8 (nanoid 3.3.16 → 3.3.19). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CI results — differential against baseline
The 5 remaining failures are the pre-existing discriminator drift between the generated TS client and the dev API, unchanged and unrelated to all thrown inside Worth noting separately: |
|
| #40 (2026-09-04) | #43 (today) | |
|---|---|---|
test_get_pipelines |
FAILED (402) | FAILED (402) |
test_delete_system_connectors |
FAILED (402) | FAILED (402) |
test_upload_create_pipeline |
FAILED (402) | FAILED (402) |
test_extraction |
polled not ready 15:13 → 18:43, died on 502 |
passed |
| job wall time | 3h31m | 2m23s |
So test_extraction completed on both sides today (27s in TS, ~8s in Python). The 3h31m burn on #40 was the dev API being unresponsive that day, not a permanent state — but the underlying defect from #41 is unchanged: that test polls a ready-flag with no timeout and no failure ceiling, so the next unresponsive day costs another multi-hour run and another 17 MB log.
Net across both jobs: every failure on this PR is pre-existing and reproduces identically on unmodified main; extraction is the only test whose status changed, and it changed from red to green. No failure here is attributable to vitest 4.1.11.
Recreates Dependabot's
@vitest/mockersecurity fix (PR #42) on a human-authored branch so it actually receivessecrets.VECTORIZE_TOKEN/VECTORIZE_ORG. Dependabot's own branch gets empty secrets, so both its jobs die atError: VECTORIZE_API_KEY must be setbefore any dependency signal is produced.Alerts closed
@vitest/mockervitest(ancestor)Path traversal / arbitrary file read via
@vitest/mockerredirect mocks; 4.1.11 restricts redirect mocks to the fs allowlist.Bonus, not alerted: the re-lock also carries
nanoid3.3.16 → 3.3.19, clearing GHSA-2v37-7h3g-55p8 (high, dev-only). That advisory is alert #44, which this repo's policy auto-dismissed on 2026-08-16, and it was previously recorded in #41 as unverifiable locally. It is fixed here as a side effect ofvitest's dependency graph moving forward — no separate change was made for it.npm auditintests/tsgoes 3 vulnerabilities (1 high, 2 moderate) → 0.Change
vitestis a direct devDependency oftests/ts. The patched version is in range of the existing^4.1.8, so a lockfile-only update would have sufficed; the manifest floor is raised to^4.1.11anyway so the vulnerable range is unreachable from the manifest, not just pinned away by the lockfile. This matches Dependabot #42 exactly, so that PR can be closed once this merges.Lockfile churn beyond the
@vitest/*family isvitest4.1.11 pulling its build stack forward and is unavoidable:vite8.0.16 → 8.3.0,rolldown1.0.3 → 1.2.8 (+ all@rolldown/binding-*),lightningcss1.32.0 → 1.33.0 (+ bindings),postcss8.5.25 → 8.5.28,picomatch,nanoid,tinyrainbow,@oxc-project/types,@jridgewell/sourcemap-codec. The@rolldown/binding-wasm32-wasientry and its@emnapi/*/@napi-rs/wasm-runtime/@tybys/wasm-util/tslibsupport tree drop out;@rolldown/binding-android-arm-eabiis added. Nothing outside that set changed.Lockfile provenance
Re-locked with
npm install --package-lock-only --ignore-scriptsfrom the committed lockfile — no--force, no--legacy-peer-deps, no regeneration from scratch. Two things worth flagging for review:npm install/npm updateontests/tswith the bumped manifest dies withTypeError: Cannot read properties of null (reading 'edgesOut')in arborist's#loadPeerSet, while walkingvitest@4.1.11's optional peer set (@vitest/browser-playwright,@vitejs/devtools-vitest). Reproduced on npm 10.9.8 and on 10.8.2 (the version CI'snode-version: 20.xships). npm 11 resolves the same tree cleanly, so the lockfile here was produced with npm 11. This does not affect CI: CI only ever runsnpm iagainst a lockfile that already matches the manifest, which needs no re-resolution — verified below. It does mean the next person to re-locktests/tson npm 10 will hit this.libcmarkers. The lockfile carries 10"libc": ["glibc"|"musl"]keys on the newlightningcss-linux-*/@rolldown/binding-linux-*entries — byte-for-byte the same set Dependabot produced in Bump @vitest/mocker and vitest in /tests/ts #42. npm 10 silently strips these on any write (npm ion this branch removes all 10). They are kept deliberately; do not re-lock on npm 10 and commit the result.Verification
ci.ymlhas never been green in this repo — all 23 recorded runs of that workflow are failures, because both jobs end in live integration tests againstapi-dev.vectorize.io. A true-green verify is not obtainable, so this was verified differentially against an unmodifiedmaincontrol worktree at the same commit (62a4e1c), running CI's exact command chain on both sides.main, vitest 4.1.8)cd src/ts && npm installcd src/ts && npm run build(tsc)cd tests/ts && npm icd tests/ts && npm ci(strict lockfile check)cd tests/ts && npm run test(vitest run)npm auditTest failure sets are identical — same 4 files, same 6 tests, one root cause on both sides:
Banners confirm the runner actually changed (
RUN v4.1.8vsRUN v4.1.11), so 4.1.11 loads, transforms and executes the suite. The bump introduces no new failure. Any red check on this PR should be read against that baseline.Expected CI outcome, and what it will tell us
This branch does get secrets, so it will authenticate and reach the dev API — which is where the repo's two standing environment problems live. Both are pre-existing and unrelated to this change:
UPGRADE_REQUIRED—{"error":"Upgrade Required","message":"API access is available on paid plans only","code":"UPGRADE_REQUIRED"}. Last seen on fix(security): bump toml 3.0.0 → 4.3.0 (root lockfile) — closes 4 Dependabot alerts #40's run on 2026-09-04, and the same signature hitintegrations-pythonon 2026-09-02. The CI credential or its org appears to have lost paid API access. Note the diagnostic: on fix(security): bump toml 3.0.0 → 4.3.0 (root lockfile) — closes 4 Dependabot alerts #40 the packaging-adjacent steps (Install client→npm install && npm run build; PythonBuild→poetry install && poetry build) all passed, and only the live-API test steps failed. Same shape on Bump @vitest/mocker and vitest in /tests/ts #42.test_extractionhas no timeout and no failure ceiling — on fix(security): bump toml 3.0.0 → 4.3.0 (root lockfile) — closes 4 Dependabot alerts #40 it pollednot ready ready=Falsefrom 15:13 to 18:43 (3h31m) before dying on a 502, producing a 17.5 MB job log. Tracked in Daily security sweep — backlog #41. A multi-hour red here is that, not a hang caused by a dependency bump.If this PR's
Tests (Python)job shows 402 again, that is a fresh data point that the paid-API access problem is still live 10 days on, and it needs an owner independent of this bundle.Notes
toml3.0.0 → 4.3.0, root lockfile, alerts #46–#49). Different lockfile, no conflict with this PR.