fix(security): bump toml 3.0.0 → 4.3.0 (root lockfile) — closes 4 Dependabot alerts - #40
Conversation
Closes Dependabot alerts #46 #47 #48 #49. - GHSA-v5mp-jgw5-2x6j / CVE-2026-63376 (high) - prototype pollution via a crafted TOML string; patched in 4.1.2. - GHSA-82x6-q7mm-w9cf (high) - stack-overflow DoS via deeply nested arrays / inline tables; patched in 4.2.0. toml is a direct dependency of the root package.json and the only requester, so this is a direct bump (^3.0.0 -> ^4.2.0, resolving to 4.3.0). No override needed. Lockfile regenerated with `npm install --package-lock-only`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CI triage —
|
| Check | On Dependabot's #39 | On this branch |
|---|---|---|
Secret Detection |
❌ fail (no GITLEAKS_LICENSE) |
✅ pass |
Tests (TS) |
❌ fail — never ran a test (Error: VECTORIZE_API_KEY must be set) |
❌ fail — tests execute, 6 fail against the live dev API |
Tests (Python) |
❌ fail — same missing-secret error | (long-running live suite) |
The Secret Detection flip from fail to pass is the point of moving this to a human-authored branch: secrets.* reach chore/* branches and do not reach dependabot/* ones. The TS job likewise now gets far enough to actually run tests, which #39 never did.
The 6 TS failures
No variant of CreateSourceConnectorRequest exists with 'type=FILE_UPLOAD'
No variant of CreateSourceConnectorRequest exists with 'type=WEB_CRAWLER'
No variant of CreateDestinationConnectorRequest exists with 'type=PINECONE'
No variant of CreateAIPlatformConnectorRequest exists with 'type=OPENAI'
Test timed out in 120000ms (tests/extraction.test.ts:13)
Cannot read properties of undefined (reading 'text') (tests/pipelines.test.ts:150)
The first four are thrown from inside the generated client (src/ts/dist/models/Create*ConnectorRequest.js) — the discriminator mapping in the generated code no longer matches what the tests send, i.e. drift between vectorize_api.json / the generated src/ts and the live dev API.
The last one is a bug in the test's own error handler, and it is masking whatever the real failure was:
// tests/pipelines.test.ts:149-150
console.error(error?.response);
console.error(await error?.response.text()); // <- `?.` then an unguarded `.`When error.response is undefined the first line prints undefined and the second throws TypeError, replacing the original error. Worth a separate fix (error?.response?.text()), unrelated to this PR.
Why none of it can be this diff
-
Path-level. This PR changes exactly two files, both at the repo root:
$ git diff origin/main..chore/security-daily-20260904-vectorize-clients-npm-root --name-only package-lock.json package.json $ git diff origin/main..chore/security-daily-20260904-vectorize-clients-npm-root -- src/ts tests/ts (empty)The
Tests (TS)job runs onlycd src/ts && npm install && npm run build, thencd tests/ts && npm i && npm run test.tests/tsdepends onfile:../../src/tsand neither directory references the root manifest, so the job's entire dependency closure is byte-identical tomain. The roottomldependency is reachable only fromscripts/readToml.js/scripts/editToml.js, which CI never invokes. -
Historical control. There is no green baseline to diff against —
ci.ymltriggers onpull_requestonly, so it never runs onmain, and all 100 recordedci.ymlruns arefailure. The most recent human-authored branch run, where secrets were available (develop, 2025-07-18, run 16379415802), was likewiseTests (TS)failure /Tests (Python)success. TS has been red on human branches for roughly 14 months. -
Local verification of the part that this diff can affect is in the PR description: identical
read-tomloutput, byte-identicaledit-tomlround-trip, JSON-identical parse of every.tomlin the repo, and a behavioural demonstration that the DoS advisory is actually fixed — all against an unmodifiedmaincontrol worktree.
One gap, stated plainly: I wanted a same-day control (a no-op branch off today's main, to show these exact 6 failures reproduce on unmodified code right now). Pushing that control branch was blocked by a permission policy on my side, so the freshest same-branch-type control I can point to is the 2025-07-18 develop run above. Points 1 and 3 do not depend on it.
Suggested follow-ups (tracked in #41, not in this PR)
- Add
VECTORIZE_TOKEN/VECTORIZE_ORG/GITLEAKS_LICENSEas Dependabot secrets so Dependabot's own security PRs become self-verifying, or make the integration tests skip cleanly without credentials. - Regenerate the TS client against the current spec to clear the
No variant of …drift. - Fix
error?.response.text()→error?.response?.text()so real failures stop being masked. - Rename one of the two workflows —
ci.ymlanddocs.ymlare bothname: CI, which makesgh run listoutput ambiguous.
|
Recreates Dependabot's
tomlsecurity fix on a human-authored branch so it actually gets CI. Dependabot's own PR (#39) cannot pass: its branches don't receivesecrets.VECTORIZE_TOKEN/VECTORIZE_ORG/GITLEAKS_LICENSE, soTests (TS)fails withError: VECTORIZE_API_KEY must be setandSecret Detectionfails on the missing licence — no dependency signal at all.Alerts closed
Object.prototypepollution from a crafted TOML string(Two alerts per advisory: GitHub raises one against
package.jsonand one againstpackage-lock.json.)Change
tomlis a direct dependency of the rootpackage.jsonand the only requester in the tree, so this is a plain direct bump — nooverridesentry needed.Lockfile regenerated with
npm install --package-lock-only. Diff is 2 files / 9 insertions / 6 deletions and touches nothing buttoml.3.x → 4.x. The patched versions exist only on the 4.x line, so there is no in-range fix. What that major carries:
enginesnow declaresnode >=20. CI pinsnode-version: "20.x", so this is satisfied — but it is a new constraint on anyone running the release scripts locally.toml@4.3.0has zero deps).Verification
The root
package.jsonhas nobuild/test/lintscripts, and CI'sTests (TS)/Tests (Python)jobs buildsrc/tsandsrc/python— neither touches the root lockfile. The roottomldependency is consumed only byscripts/readToml.jsandscripts/editToml.js(both use exactly one API,toml.parse), which backnpm run read-toml/npm run edit-tomland are called fromscripts/release-python.shandscripts/generate-python.sh.So verification was derived from that actual consumer surface, against an unmodified
maincontrol worktree:npm ciclean on both sides; resolved version confirmed4.3.0.npm run read-tomlonsrc/python/pyproject.tomlandtests/python/pyproject.toml— output identical to the toml@3 baseline (0.4.0,0.1.0).npm run edit-tomlround-trip (scalarversion, plus alist-modekeywordsrewrite through@iarna/tomlstringify) — emitted file is byte-identical to the toml@3 baseline (md569abb882…on both)..tomlin the repo (src/python/pyproject.toml,tests/python/pyproject.toml,tests/python/poetry.toml) — parsed objects JSON-identical under 3.0.0 and 4.3.0.RangeError: Maximum call stack size exceeded, while 4.3.0 raises an ordinary, catchable parse error (Maximum nesting depth of 500 exceeded). The bound is configurable viatoml.parse(input, { maxDepth })if any real document ever needs it.Notes
yaml@2.7.0(dev-only, viatypedoc), GHSA-48c2-rrv3-qjmp, moderate, fixed in 2.8.3. Recorded in the sweep backlog issue rather than mixed into this PR.