Skip to content

fix(deps): apply security fixes at their first patched versions [SAP-4715] - #1277

Open
antoine-berger wants to merge 9 commits into
mainfrom
antoine-berger/SAP-4715
Open

antoine-berger wants to merge 9 commits into
mainfrom
antoine-berger/SAP-4715

Conversation

@antoine-berger

@antoine-berger antoine-berger commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Primary change type

  • Bug fix
  • Documentation
  • Feature
  • Tests
  • Dependency update
  • Maintenance or refactor

Problem and motivation

142 open Dependabot alerts on the root pnpm-lock.yaml and five package manifests have a patched release that this repository does not resolve yet. This PR closes all of them with the smallest version moves: each dependency goes to the lowest release that closes every open alert on its line, following Phase 2 of the dependency fix playbook.

The review asked for this PR to become a security-only change. The earlier "latest compatible releases" maintenance (Vite 8, @vitejs/plugin-react 6, ts-jest, floors above the patched versions) is dropped. SAP-4715's "latest compatible" maintenance is not done by this PR and needs separate tracking.

Summary and scope

Overrides (pnpm-workspace.yaml). One key per vulnerable major line, each floored at its first patched release. No parent gets a major it did not declare, except four lines that have no patched release in their own major. fast-xml-parser@4, langsmith@0.3 and uuid@9/uuid@10 sit only in @sapiom/langchain-classic's dev-only @langchain/* 0.3 test graph, and its suite passes on the new versions. toml@4 sits under effect, which calls Toml.parse(content) only in dist/unstable/cli/Primitive.js. @hono/node-server@1 moves to ^2.1.3, which @modelcontextprotocol/sdk 1.32's own range (^1.19.9 || ^2.0.5) allows. Its 1.19.18 release backports a different fix, and its tarball has no allowPercentInPath, the #532 fix.

Direct floors. undici ^7.30.1 (@sapiom/fetch, dev), axios ^1.20.0 (@sapiom/axios, dev, with the peer range unchanged), harness vite ^6.4.4, and @modelcontextprotocol/sdk ^1.32.0 (@sapiom/mcp, @sapiom/harness). The unused uuid and @types/uuid declarations leave @sapiom/agent-map and @sapiom/harness, because neither imports them.

axios suite type check (packages/axios/jest.config.js). The axios floor broke the compilation of the @sapiom/axios suite. new MockAdapter(axiosInstance) failed with TS2345 in both test files, so Jest ran no tests. axios ships one declaration file for ESM (index.d.ts) and one for CommonJS (index.d.cts). ts-jest resolves axios to index.d.ts for this package's files and to index.d.cts for axios-mock-adapter. Up to 1.18.0 the two AxiosInstance types matched structurally. axios 1.19.0 made the request methods return AxiosResponseResult<T, R, D, P>, a conditional type on a unique symbol that each file declares for itself, so an AxiosInstance from one file is no longer assignable to an AxiosInstance from the other. Every patched axios fails the same way (1.20.0, 1.21.0 and 1.21.1 tested), and axios-mock-adapter 2.1.0 is its newest release, so no version choice fixes it. The fix maps axios to index.d.cts in the suite's ts-jest options. Those declarations describe the CommonJS build that Jest loads, and the tests, the package source and the adapter are then checked against one file. No test file, source file, manifest or lockfile entry changes, and a wrong argument to MockAdapter still fails the type check. A cast at the three call sites also compiles, but it turns the check off at those sites.

Vitest ^4.1.12 in agent-map, harness, harness-desktop, mcp and opencode. The Vitest and @vitest/mocker advisories have no 3.x fix, and @vitest/mocker 4.1.12, which vitest 4.1.12 pins, is the first release that fixes #458. Vitest 4 also drops tinypool. Its own Vite copy dedupes to the harness's Vite 6.4.6, so no Vite 8 enters the lockfile. The suites need three Vitest 4 adjustments. Six harness suites type their vi.fn() handles as callable Mocks. Two mcp suites call vi.resetAllMocks() before vi.restoreAllMocks(). definition-slug-resolver.test.ts closes a test before the listVisible suite that was declared inside it. Vitest 3 skipped those 10 tests silently, and Vitest 4 fails the file ("Calling the suite function inside test function is not allowed"). That fix is its own commit and passes on both Vitest versions.

CI. Vitest 4 declares engines.node ^20.0.0 || ^22.0.0 || >=24.0.0, so agent-map-node18 stops running agent-map's unit suite, which still runs on Node 20 and 22 in the matrix job. The job keeps the mcp closure build and the packed-package checks on Node 18.

Removed overrides. baseline-browser-mapping, follow-redirects, nanoid and source-map-js need no key. The browserslist, axios and postcss releases that resolve require ^2.11.33, ^1.16.2, ^3.3.20 and ^1.2.2. Dropping each key one at a time and regenerating from main's lockfile reopens no alert.

Dropped at the reviewer's request. Vite 8 and @vitejs/plugin-react 6, along with the agent-map-authority.spec.ts edit that existed only for Vite 8's tab-indented output. The ts-jest bump in 15 packages. Floors above the first patched release, which came down: langsmith ^0.11.7 to ^0.6.0, hono ^4.13.16 to ^4.13.11, MCP SDK ^1.32.2 to ^1.32.0, axios ^1.21.0 to ^1.20.0, @hono/node-server ^2.1.6 to ^2.1.3, fast-xml-parser ^5.11.2 to ^5.7.0, browserslist ^4.29.5 to ^4.28.7, ip-address ^10.7.5 to ^10.7.4, postcss ^8.5.32 to ^8.5.23, and qs ^6.17.1 to ^6.16.1.

Out of scope. Open alerts this PR does not touch: electron, tar, app-builder-lib and builder-util-runtime (the desktop Electron upgrade), zod, @xmldom/xmldom, extract-zip and deepmerge (no patched release), effect, glob, minimatch, and every alert under examples/.

Alerts closed

The floor is the first patched version that closes every listed alert. "Resolved" is the version the lockfile picks within that floor.

Package Alerts Floor main Resolved
@hono/node-server #320, #532 2.1.3 1.19.14 2.1.6
@modelcontextprotocol/sdk #427, #438, #439, #441, #444, #525 1.32.0 1.29.0 1.32.2
@vitest/mocker #343, #458 4.1.12 3.2.6 4.1.12
axios #403 to #414 (12) 1.20.0 1.18.0 1.21.1
baseline-browser-mapping #341 2.11.0 2.10.37 2.11.35
body-parser #204, #515, #516 1.20.9, 2.4.0 1.20.5, 2.3.0 1.20.9, 2.4.0
brace-expansion #200, #201, #263, #269, #391, #394, #397, #398, #399 1.1.21, 2.1.7, 5.0.12 1.1.15, 2.1.1, 5.0.7 1.1.21, 2.1.7, 5.0.12
browserslist #326, #327 4.28.7 4.28.2 4.29.5
dompurify #314, #425, #460, #461, #462 3.4.17 3.4.12 3.4.17
fast-uri #209, #210, #271, #330, #331, #332, #377, #518, #519, #520 3.1.9 3.1.2 3.1.9
fast-xml-parser #109 5.7.0 4.5.7 5.12.0
follow-redirects #436, #437, #533 1.16.2 1.16.0 1.16.3
handlebars #429, #430, #431 4.7.10 4.7.9 4.7.10
hono #206, #207, #208, #280, #315, #316, #317, #354, #355, #356, #415, #432 4.13.11 4.12.25 4.13.17
ip-address #277, #278, #279, #362, #364, #400, #401, #459 10.7.4 10.2.0 10.7.6
js-yaml #193, #202, #203, #311, #312, #357, #358 3.15.2, 4.3.2 3.14.2, 4.2.0 3.15.2, 4.3.2
langsmith #16, #93, #101, #137 0.6.0 0.3.87 0.6.3
nanoid #319, #323 3.3.18 3.3.12 3.3.20
postcss #211, #270 8.5.23 8.5.15 8.5.32
proxy-addr #423 2.0.8 2.0.7 2.0.8
qs #143, #328, #329, #524 6.16.1 6.15.1, 6.15.2 6.17.1
source-map-js #424 1.2.2 1.2.1 1.2.2
tinypool #421, #422 removed 1.1.1 none
toml #463, #464, #465 5.0.1 4.3.0 5.0.1
undici #272 to #276, #363, #365, #383 to #390, #521 to #523, #526 to #530 (23) 7.30.1 7.28.0 7.30.2
uuid #144, #325 (harness manifest), #361 (agent-map manifest) 11.1.1, or removed 9.0.1, 10.0.0 11.1.1
vite #440, #442, #443, #455, #456 6.4.4 6.4.3 6.4.6
vitest #335, #336, #337, #344, #359, #360 4.1.11 3.2.6 4.1.12

langsmith 0.8.0 (under @langchain/core 1.x), nanoid 6.0.1 and uuid 14.0.2 also resolve on main and are not vulnerable. They do not move.

Lockfile

pnpm-lock.yaml is what git checkout origin/main -- pnpm-lock.yaml && pnpm install produces from the final manifests, byte for byte. Each commit's lockfile is regenerated the same way. One field is restored by hand: pnpm 10.34.3 drops the integrity of the git-hosted @electron/node-gyp tarball on rewrite, and the lockfile keeps main's value. 65 packages change resolved versions against main. 28 are the packages in the table above, and 37 are passengers that the patched parents pull in or drop:

  • Vitest 4's own packages: @vitest/* 4.1.12, chai 6, es-module-lexer 2, std-env 4, tinyexec 1, tinyrainbow 3 and obug are added. cac, check-error, deep-eql, js-tokens 9, loupe, pathval, strip-literal, tinyspy and vite-node are removed.
  • fast-xml-parser 5: strnum 2, anynum, @nodable/entities, fast-xml-builder, is-unsafe, path-expression-matcher and xml-naming.
  • browserslist 4.29: caniuse-lite, electron-to-chromium, node-releases and update-browserslist-db.
  • body-parser 2.4: content-type 2.1.0 and iconv-lite 0.7.3, added beside main's 2.0.0 and 0.7.2.
  • langsmith 0.6 drops 0.3's console-table-printer, simple-wcswidth and @types/uuid. Its new optional ws peer re-keys @langchain/core 0.3.80's snapshot at the same version.

Related work

Related issue or discussion: internal tracking SAP-4715 (security part only; the "latest compatible" maintenance needs its own ticket). Supersedes the single-package override PRs #1209 and #1211, and overlaps the root-workspace parts of the Dependabot PRs #1092 and #1097.

Validation

All of the following ran at 30eb44eb, the current head, on Node 22.23.4 and pnpm 10.34.3, one package at a time on 3 CPUs. No cache was in play. Build output was removed before the build, every Jest suite ran with --no-cache and an empty cache directory, and the Vitest cache directories were deleted first.

pnpm install --frozen-lockfile                              ok
pnpm clean && pnpm build                                    ok (harness web bundle: vite v6.4.6)
pnpm --filter @sapiom/tools test:executions:subprocess      ok (10 passed)
pnpm --filter @sapiom/agent-map test:package                ok
pnpm --filter @sapiom/mcp test:package                      ok
pnpm typecheck                                              ok
pnpm lint                                                   ok (0 errors, 41 warnings in untouched files)
pnpm --filter <package> test, each of the 21 packages       ok
  axios 33, in two runs; harness 3652 passed, 2 skipped (+ 9 perf); mcp 362 (+ 1 perf, 1 node);
  agent-map 28; harness-desktop 235; opencode 40; tools 1177; agent-core 311;
  analytics-core 251; agent 205; langchain-classic 183 (2 skipped); core 164;
  browser-pay 130 (9 skipped); cli 97; sandbox 58; agent-runtime 55; fetch 43; langchain 36;
  node-http 33; sandbox-preview 20; agent-studio 12
pnpm examples:check / examples:check:test (261)             ok
pnpm terminology:check / credential-header:check            ok
pnpm provider-copy:check                                    ok
pnpm pr-labeler:check (31) / pr-ci-security:check (3)       ok
pnpm changeset status --since=origin/main                   patch: mcp, harness, agent-map, agent-studio (dependent)

The axios suite is the one that the previous head broke. With --no-cache, pnpm --filter @sapiom/axios test gives these results:

origin/main (axios 1.18.0)                 33 passed, in 2 of 2 runs
ed3bcfba, the previous head (axios 1.21.1)  2 suites failed to compile (TS2345), 0 tests, in 2 of 2 runs
30eb44eb, this head (axios 1.21.1)          33 passed, in 2 of 2 runs

A run at ed3bcfba that reuses Jest's transform cache from before the lockfile change passes with 33 tests, so only a run without the cache shows the failure.

These ran at ed3bcfba and were not rerun, because the only later change is packages/axios/jest.config.js:

pnpm --filter @sapiom/opencode test:native                  ok (7 passed)
pnpm --filter @sapiom/harness test:ui --workers=2           550 passed (shards 1/2 and 2/2)
pnpm --filter @sapiom/harness test:canvas                   3 passed
node packages/harness-desktop/scripts/pack.mjs --linux      ok

An independent rerun of the two Playwright shards at ed3bcfba finished with 547 passed and 3 failed (dialog-shell.spec.ts:67, smoke.spec.ts:43 and smoke.spec.ts:1249). The traces show module requests that failed with Chromium's net::ERR_NETWORK_CHANGED. Each failed case then passed every focused repeat on this branch and on main (15 runs of the dialog case and 10 of each smoke case), and both CI shards passed. The failure was not reproduced on main, so it is not proven to predate this PR.

Alert closure was checked by a script that tests every npm range of each advisory against every version of the package resolved in the lockfile. Before this PR, main resolves a vulnerable version for all 142 alerts. After it, none do.

Flaky tests seen, not caused by this PR:

  • packages/harness/src/core/record-archive.test.ts "picks up a record written by another process after its index was built" failed once in the full harness run. Run alone 15 times under the same pinning, it fails 8 of 15 on main (Vitest 3.2.6) and 5 of 15 on this branch. The full-suite rerun passed.
  • web/e2e/agent-map-release.spec.ts (two variants) timed out once in the first shard 1/2 run. It passed in two isolated runs and in the shard 1/2 rerun.

Not verified locally:

  • The agent-map-node18 job, because this machine has no Node 18 binary. @sapiom/mcp loads the SDK's server/mcp.js, server/stdio.js and types.js. Their import graph reaches 16 files and never imports @hono/node-server, which only server/streamableHttp.js and the SDK's examples import.
  • The desktop smoke launch, because this host lacks libgtk-3.so.0. Packing succeeds.
  • pnpm examples:test, which installs each template from published npm ranges that this PR does not change.

Tests and documentation

No new tests, because this is a dependency update. The existing suites were adapted to Vitest 4 as listed above. The @sapiom/axios suite needed one ts-jest option and no test edits. The listVisible fix turns on 10 tests that never ran before. No user-facing documentation changes.

Compatibility and release impact

  • Breaking or externally visible changes: @sapiom/mcp and @sapiom/harness require @modelcontextprotocol/sdk 1.32.0 or later within 1.x. @sapiom/agent-map and @sapiom/harness drop the unused uuid dependency. The Studio web bundle stays on Vite 6 and its default browser target. Overrides shape only this repository's lockfile and are not published.
  • Changeset: Added (.changeset/mcp-sdk-floor-and-unused-uuid.md, patch for @sapiom/mcp, @sapiom/harness and @sapiom/agent-map).

Security

  • I have not included secrets, credentials, private data, or unsanitized logs.
  • This pull request does not publicly disclose a suspected vulnerability. I
    will follow the
    Security Policy for
    private reporting.

AI assistance

  • I did not use AI assistance for this change.
  • I used AI assistance and have described it below.

Claude Code (Opus) rebuilt this branch from the review. It built the alert ledger from the Dependabot API, chose each floor, regenerated every commit's lockfile from main's, tested each override key for necessity, ran the validation above, and wrote this description. The ledger, the lockfile diff and the scripts that produce them can be rerun. A later Claude Code session (Fable) found the cause of the axios suite's compile failure, which an independent verification run had reported, made the jest.config.js change, and reran the checks above with caches off. The change goes through independent review before it is marked ready.

Checklist

  • I read CONTRIBUTING.md, and this contribution follows the direct-PR or issue-first policy.
  • This pull request addresses one focused problem and contains no unrelated cleanup.
  • I added or updated tests, or explained above why tests are not applicable.
  • I ran the relevant build, typecheck, lint, and test commands, or explained
    any N/A checks above.
  • I updated documentation for user-facing changes, or marked it N/A above.
  • I added a Changeset for a published-package change, or explained why it is not applicable.
  • I can explain and maintain every submitted change, including any AI-assisted work.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Compatibility
    • MCP and Harness integrations now require version 1.32.0 or later of the Model Context Protocol SDK within the 1.x release line.
  • Maintenance
    • Updated package compatibility and security floors for supporting libraries.
    • Agent Map and Harness no longer depend on UUID.
    • Refined Node 18 package checks; unit tests continue to run in the Node.js test matrix.
    • Updated testing tools and improved test isolation.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Package dependency ranges and workspace overrides changed. Test configuration, mock typings, and cleanup changed. The Node 18 job no longer runs the agent-map unit-test command.

Changes: Dependency and test updates

Layer / File(s) Summary
Package dependency ranges
.changeset/mcp-sdk-floor-and-unused-uuid.md, packages/agent-map/package.json, packages/harness/package.json, packages/mcp/package.json, packages/axios/package.json, packages/fetch/package.json, packages/harness-desktop/package.json, packages/opencode/package.json
MCP and harness now declare @modelcontextprotocol/sdk ^1.32.0. Agent-map and harness remove uuid dependencies. Several development dependency ranges change, and the changeset declares patch releases for three packages.
Workspace overrides and test configuration
pnpm-workspace.yaml, packages/axios/jest.config.js
Version-scoped overrides are added for listed transitive dependencies. The axios Jest transform maps TypeScript resolution of axios to index.d.cts.
Test maintenance and CI selection
.github/workflows/test.yml, packages/harness/src/core/*test.ts, packages/harness/src/server/*test.ts, packages/mcp/src/*test.ts
Harness test mocks use Vitest’s Mock type, and a test suite’s delimiters are corrected. MCP tests reset mocks during cleanup. The Node 18 job no longer runs the agent-map unit-test command.

Estimated code review effort: 2 (Simple) | ~15 minutes

Change: Other

Possibly related PRs

  • sapiom/sapiom-js#1266: Adds credential-permission tests in the same MCP credentials test file that now resets mocks during cleanup.

Suggested reviewers: gwitwer

Merge Risk: Minimal · up to 30eb4

Dependency floors are updated, and Node 18 package checks remain in CI. No merge-blocking issue was established.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title clearly identifies the dependency security fixes and summarizes the main change.
Linked Issues check Passed The only directly linked issue, #458, is closed and supplies historical context only. No active directly linked issue coding requirements apply.
Out of Scope Changes check Passed The changes support the current security dependency update. The Vitest test and CI adjustments support the Vitest 4 upgrade. The Axios Jest type mapping addresses a typecheck conflict caused by the de…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Description check Passed The description follows the repository template and gives detailed motivation, scope, related work, validation results, compatibility and release impact, security attestations, AI-use details, and com…
Full details: Out of Scope Changes check

Explanation

The changes support the current security dependency update. The Vitest test and CI adjustments support the Vitest 4 upgrade. The Axios Jest type mapping addresses a typecheck conflict caused by the dependency resolution. The changeset records the published-package compatibility changes. No unrelated changes are identified in the supplied summary.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 10 files.

Full details: Description check

Explanation

The description follows the repository template and gives detailed motivation, scope, related work, validation results, compatibility and release impact, security attestations, AI-use details, and completed checklist items. It also identifies checks that were not run locally and explains why.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

packages/axios/jest.config.js

Parsing error: ESLint was configured to run on <tsconfigRootDir>/jest.config.js using parserOptions.project: /tsconfig.json
However, that TSConfig does not include this file. Either:

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit checks the package floor,
Then tidies mocks and tests once more.
New version ranges join the queue,
While Node 18 has less to do.
The changes settle, neat and small,
And carrots wait beyond them all.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f2167498-d237-4f38-937d-8f2b5326904f
Commits

Reviewing files that changed from the base of the PR and between ed3bcfb and 30eb44e.

Files selected for processing: 1

  • packages/axios/jest.config.js

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@antoine-berger

Copy link
Copy Markdown
Contributor Author

/devin review

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Starting Devin Review.

Devin Review

devin-ai-integration[bot]

This comment was marked as resolved.

@antoine-berger
antoine-berger marked this pull request as ready for review November 3, 2026 02:02

@gwitwer gwitwer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please split this PR. Keep a security PR at the lowest patched versions (docs/security/dependency-fix-playbook.md in sapiom/Sapiom, Phase 2) and drop the maintenance upgrades. The harness is not a supported target right now, so harness-only upgrades are not wanted.

  1. Vite: drop Vite 8 and @vitejs/plugin-react 6. Raise harness vite to ^6.4.4, which closes alerts #440, #442, #443, #455 and #456. Vite 8 also changes the default browser build target, and packages/harness/web/vite.config.ts sets none.
  2. Other drops: the ts-jest bump across 15 packages (no alert), and floors above the patched version: langsmith ^0.11.7 where 0.6.0 closes #137, hono ^4.13.16 where 4.13.11 is enough, and the MCP SDK ^1.32.2 where 1.32.0 is enough.
  3. Keep: the scoped overrides at their first patched versions, undici ^7.30.1, axios ^1.20.0, and the removal of the unused uuid dependency.

Track SAP-4715's "latest compatible" maintenance separately.

antoine-berger and others added 8 commits November 10, 2026 21:13
@sapiom/agent-map and @sapiom/harness declared uuid ^10.0.0 (and
@types/uuid) but import it nowhere. Dropping the declarations closes
Dependabot alerts #325 and #361 on their manifests without moving any
resolved version: uuid 10 stays in the lockfile for the @langchain/* 0.3
dev graph, which the overrides commit handles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tched releases [SAP-4715]

Add one pnpm override per vulnerable major line, each at the lowest
release that closes every open Dependabot alert on that line:
body-parser 1.20.9 and 2.4.0, brace-expansion 1.1.21, 2.1.7 and 5.0.12,
browserslist 4.28.7, dompurify 3.4.17, fast-uri 3.1.9, handlebars
4.7.10, hono 4.13.11, ip-address 10.7.4, js-yaml 3.15.2 and 4.3.2,
postcss 8.5.23, proxy-addr 2.0.8 and qs 6.16.1.

fast-xml-parser 4, langsmith 0.3, uuid 9/10 and toml 4 have no patched
release in their own major, so they move to 5.7.0, 0.6.0, 11.1.1 and
5.0.1. The first three sit only in @sapiom/langchain-classic's dev-only
@langchain/* 0.3 test graph; toml sits under effect, which uses parse()
only in its CLI module.

baseline-browser-mapping, nanoid and source-map-js need no key of their
own: the patched browserslist and postcss releases that resolve require
baseline-browser-mapping ^2.11.33, nanoid ^3.3.20 and source-map-js
^1.2.2.

The lockfile also gains the patched parents' own dependencies
(fast-xml-parser 5's strnum 2 and XML helpers, body-parser 2.4's
content-type 2.1 and iconv-lite 0.7.3, browserslist's data packages) and
drops langsmith 0.3's console-table-printer, simple-wcswidth and
@types/uuid.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eases [SAP-4715]

@sapiom/fetch tests against undici ^7.16.0 and @sapiom/axios against
axios ^1.7.9, both dev-only. undici 7.30.1 closes every open undici 7
alert and axios 1.20.0 closes every open axios alert, so the floors move
there. The axios peer range (>=1.0.0) is unchanged.

axios is follow-redirects' only parent here, and the axios release that
resolves requires follow-redirects ^1.16.2, which closes the
follow-redirects alerts without an override.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sapiom/mcp and @sapiom/harness accepted @modelcontextprotocol/sdk
^1.26.0 and the lockfile resolved 1.29.0. 1.32.0 is the first release
that closes every open SDK alert, so both floors move to ^1.32.0.

The SDK depends on @hono/node-server, whose serveStatic double-decoding
advisory has no 1.x fix (1.19.18 backports a different fix). A scoped
override moves its 1.x line to the first patched 2.1.3, which the SDK's
own range (^1.19.9 || ^2.0.5) allows. Overrides are not published:
consumers resolve the SDK's range themselves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Studio web bundle builds with vite ^6.0.0, which resolved 6.4.3.
6.4.4 is the first 6.x release that closes the open Vite and bundled
launch-editor alerts, so the floor moves there and the build stays on
Vite 6 and its default browser target. Vitest 3's own copy of Vite moves
with the Vitest commit that follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…[SAP-4715]

The createDefinitionSlugResolver.listVisible suite was declared inside
the "bounds network waits" test, so Vitest 3 collected none of its 10
tests. Vitest 4 rejects a suite declared inside a test ("Calling the
suite function inside test function is not allowed"), which would fail
the Vitest 4 upgrade that follows. Close the test before the suite so
it runs as a sibling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Vitest and @vitest/mocker advisories open on agent-map, harness,
harness-desktop, mcp and opencode have no 3.x fix: the mocker redirect
path traversal is fixed in 4.1.11 and the manual-mock registration
injection in @vitest/mocker 4.1.12, which vitest 4.1.12 pins. Vitest 4
also drops tinypool, closing its two critical advisories. Its own Vite
copy dedupes to the harness's patched Vite 6.

Vitest 4 changes two things the suites relied on:
- An untyped vi.fn() is typed as possibly constructable, so the harness
  handles that are called as functions get a callable Mock type.
- restoreAllMocks no longer clears module-mock call history, so the mcp
  auth and credentials suites reset mocks before restoring them.

Vitest 4 needs Node 20 or later (engines ^20 || ^22 || >=24), so the
agent-map-node18 job stops running agent-map's unit suite, which still
runs on Node 20 and 22 in the matrix job. The job keeps the mcp closure
build and the packed-package checks on Node 18.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…P-4715]

@sapiom/mcp and @sapiom/harness raise their @modelcontextprotocol/sdk
range and @sapiom/agent-map and @sapiom/harness drop uuid, so all three
get a patch release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@antoine-berger
antoine-berger force-pushed the antoine-berger/SAP-4715 branch from 3479033 to ed3bcfb Compare November 10, 2026 22:15
@antoine-berger antoine-berger changed the title chore(deps): move dependencies to their latest compatible releases [SAP-4715] fix(deps): apply security fixes at their first patched versions [SAP-4715] Nov 10, 2026
…AP-4715]

The @sapiom/axios suite stopped compiling when the lockfile moved axios
from 1.18.0 to 1.21.1. `new MockAdapter(axiosInstance)` fails with
TS2345 in both test files, so Jest runs no tests. A cached transform hid
the failure on the first local run.

axios ships two declaration files, index.d.ts for ESM and index.d.cts
for CommonJS. ts-jest resolves "axios" to index.d.ts for this package's
files and to index.d.cts for axios-mock-adapter. Up to 1.18.0 the two
AxiosInstance types matched structurally. axios 1.19.0 made the request
methods return AxiosResponseResult<T, R, D, P>, a conditional type on a
unique symbol that each file declares for itself, so an AxiosInstance
from one file is no longer assignable to an AxiosInstance from the
other. Every patched release (1.20.0, 1.21.0, 1.21.1) fails the same
way, and axios-mock-adapter 2.1.0 is the newest adapter, so no version
choice fixes it.

Map "axios" to index.d.cts in the ts-jest options. Those declarations
describe the CommonJS build that Jest loads, and the test files, the
package source and the adapter are then checked against the same file.
No test file, source file or dependency changes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@antoine-berger

Copy link
Copy Markdown
Contributor Author

@gwitwer this is now cut down to the security fixes at their first patched versions, as you asked. It is ready for another look.

Dropped

  • Vite 8 and @vitejs/plugin-react 6 with its spec edit, and the ts-jest bump.
  • Every floor above its first patched release: langsmith is ^0.6.0, hono ^4.13.11 and the MCP SDK ^1.32.0. fast-xml-parser, browserslist, ip-address, postcss and qs came down too.
  • Four overrides that closed no alert once their parents resolve patched releases: baseline-browser-mapping, follow-redirects, nanoid and source-map-js.

Kept

  • Harness vite ^6.4.4, undici ^7.30.1, axios ^1.20.0, the scoped overrides at their first patched versions, and the removal of the unused uuid dependency.
  • @hono/node-server@1 at ^2.1.3, because no 1.x release fixes alert 532.

Result: the PR closes 142 open Dependabot alerts, including 137 and the Vite alerts 440, 442, 443, 455 and 456. The body lists every alert by package.

Where I departed from your list

  1. Vitest stays at ^4.1.12. Alerts 335, 336, 337, 343, 344, 359, 360 and 458 have no 3.x fix, and Vitest 4 also drops tinypool (critical 421 and 422). Vitest 4 needs Node 20, so the agent-map-node18 job keeps its packed-package checks on Node 18 but no longer runs agent-map's unit suite there. Vitest 4 also rejects a suite nested inside a test in definition-slug-resolver.test.ts that Vitest 3 silently skipped, so that two-line fix is its own commit.
  2. The axios floor needed one test-config change. Since axios 1.19 its ESM and CommonJS declaration files no longer match. ts-jest gave the tests one and axios-mock-adapter the other, so the @sapiom/axios suite stopped compiling on every patched axios. packages/axios/jest.config.js now checks the suite against the CommonJS declarations. No test, source or lockfile change.

One thing for you to decide: three resolved versions are less than three days old: axios 1.21.1, vite 6.4.6 and follow-redirects 1.16.3. This repo sets no minimum release age and the playbook does not hold security fixes back, so I left them. axios 1.21.0, vite 6.4.5 and follow-redirects 1.16.2 close the same alerts if you would rather pin those.

SAP-4715's "latest compatible" maintenance is not in this PR and needs its own ticket.

@AntoineMaillard06 AntoineMaillard06 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review summary

Purpose: Fix 142 Dependabot alerts at their first patched versions.

Changes: Raises dependency floors, adds scoped pnpm overrides, upgrades Vitest where required, adjusts Axios Jest declaration resolution, and refreshes the lockfile.

Before: Multiple vulnerable transitive versions remained, with outdated Vitest/Axios dependency configurations.

After: In-scope dependency paths resolve to patched versions; published package ranges, Node 18 consumer contracts, and lockfile reproducibility remain compatible.

Validation: Codex and Claude found no concrete blockers. Frozen install passed with an unchanged lockfile hash; audit findings fell from 240 to 84, with no remaining alerts for changed packages. Builds and focused tests passed across Axios, Fetch, LangChain, Agent Map, MCP, and changed Harness files. Broader timing/native-module failures reproduced on the base or were not attributable to this PR.

Verdict: Approved.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants