diff --git a/docs/README.md b/docs/README.md index 75c24834..6d2eaf99 100644 --- a/docs/README.md +++ b/docs/README.md @@ -25,6 +25,7 @@ main [`README.md`](../README.md); this index only describes document structure. - [Release SOP](operations/RELEASE.md) — npm packages, desktop matrix, release assets - [Desktop release](operations/DESKTOP_RELEASE.md) — runtime packaging, asset names, unsigned installs +- [Dependency overrides](operations/DEPENDENCY_OVERRIDES.md) — transitive advisories and when to remove each override - [Changelog](../CHANGELOG.md) - [Third-party notices](../THIRD-PARTY.md) diff --git a/docs/operations/DEPENDENCY_OVERRIDES.md b/docs/operations/DEPENDENCY_OVERRIDES.md new file mode 100644 index 00000000..2adbc907 --- /dev/null +++ b/docs/operations/DEPENDENCY_OVERRIDES.md @@ -0,0 +1,64 @@ +# Dependency overrides + +This document records every `overrides` entry in the root `package.json`, why it +exists, and when it can be removed. Overrides are a containment measure for +transitive advisories that upstream packages have not yet fixed; they are not a +substitute for upgrading the owning dependency. + +## Scope + +All entries below only affect the **development/CI install of this repository** +(the root npm workspace). They exist because `packages/dsh-plugin` declares +`@deepseek-ai/dsh-mcp-client` as a peer dependency, so npm installs the DSH peer +tree at the repository root for contract tests. + +They are **not shipped**: + +- `@mebular/core` publishes only the dependencies in its own `dependencies` / + `optionalDependencies` lists; `@deepseek-ai/*` is not among them. +- The Electron desktop artifact installs `apps/desktop` separately and does not + include the root workspace. +- A consumer of `@mebular/dsh-plugin` resolves `@deepseek-ai/dsh-mcp-client` + from its DSH host. npm ignores `overrides` declared by installed packages, so + these entries cannot change a host's resolution. Fixing host installs requires + an upstream DSH release that raises the pins below. + +## Entries + +| Override | Target | Vulnerable path (as installed) | Advisory | +| --- | --- | --- | --- | +| `@deepseek-ai/dsh-llm` → `zod` | `4.6.7` | `@deepseek-ai/dsh-mcp-client@0.2.1-rc.3` → `@deepseek-ai/dsh-llm@0.2.1-rc.3` → `zod@4.4.3` | GHSA-mrhx-c7xc-m3w5 | +| `@deepseek-ai/dsh-sandbox-policy` → `zod` | `4.6.7` | `…/dsh-mcp-client` → `dsh-tools` → `dsh-sandbox-policy@0.2.1-rc.3` → `zod@4.4.3` | GHSA-mrhx-c7xc-m3w5 | +| `@deepseek-ai/dsh-session-projection` → `zod` | `4.6.7` | `…/dsh-mcp-client` → `dsh-tools` → `dsh-agent` → `dsh-session-projection@0.2.1-rc.3` → `zod@4.4.3` | GHSA-mrhx-c7xc-m3w5 | +| `@deepseek-ai/dsh-http-proxy` → `undici` | `8.12.3` | `…/dsh-mcp-client` → `dsh-subprocess` → `dsh-http-proxy@0.2.1-rc.3` → `undici@8.11.2` | GHSA-xjj6-f33q-929c, GHSA-4qv8-2p9j-2685, GHSA-f72v-6w45-q472 | +| `@deepseek-ai/dsh-mcp-client` → `@modelcontextprotocol/client` | `2.4.0` | `@deepseek-ai/dsh-mcp-client@0.2.1-rc.3` → `@modelcontextprotocol/client@2.2.0` | GHSA-6prh-2h8m-c8cw | + +The chosen targets are the versions already used elsewhere in this workspace +(`zod@4.6.7`, `@modelcontextprotocol/client@2.4.0`) or the first patched +release (`undici@8.12.3`). `@deepseek-ai/dsh-mcp-client@0.2.1-rc.3` is the latest +published version; its `dependencies` pins all three packages to the vulnerable +versions. + +## Compatibility evidence + +- `zod` 4.4.3 → 4.6.7 is a patch release on the same major; the DSH packages use + only `import { z } from "zod"`. +- `undici` 8.11.2 → 8.12.3 is a patch release; `dsh-http-proxy` imports it + dynamically only to install a global dispatcher. +- `@modelcontextprotocol/client` 2.2.0 → 2.4.0 keeps the surface used by + `dsh-mcp-client`: `Client`, `StreamableHTTPClientTransport`, + `specTypeSchemas`, and `@modelcontextprotocol/client/stdio`'s + `StdioClientTransport`. +- `npm run verify:dsh-plugin` and `npm test -- --runInBand tests/dsh` guard the + host/client contract. + +## Removal criteria + +Drop an entry once the owning DSH package declares at least the fixed version: + +- `zod >= 4.6.6` +- `undici >= 8.12.2` +- `@modelcontextprotocol/client >= 2.3.0` + +Then run `npm install` to regenerate the lockfile and confirm `npm audit` (root +and `apps/desktop`) reports zero advisories. diff --git a/package-lock.json b/package-lock.json index 2126e854..25fffb47 100644 --- a/package-lock.json +++ b/package-lock.json @@ -789,16 +789,6 @@ "@deepseek-ai/cordis": "~4.0.5" } }, - "node_modules/@deepseek-ai/dsh-llm/node_modules/zod": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz", - "integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==", - "license": "MIT", - "peer": true, - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, "node_modules/@deepseek-ai/dsh-mcp-client": { "version": "0.2.1-rc.3", "resolved": "https://registry.npmjs.org/@deepseek-ai/dsh-mcp-client/-/dsh-mcp-client-0.2.1-rc.3.tgz", @@ -830,38 +820,6 @@ } } }, - "node_modules/@deepseek-ai/dsh-mcp-client/node_modules/@modelcontextprotocol/client": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/client/-/client-2.2.0.tgz", - "integrity": "sha512-LxCou/CSYQ6dwEnjhLZY0KnEuc8V4UJ3IEQCl/uR2yHobSQIEdJKUlKLRYRF5i5FqRGHy1eK7une3aAWDHLtig==", - "license": "MIT", - "peer": true, - "dependencies": { - "@modelcontextprotocol/core": "2.2.0", - "cross-spawn": "^7.0.5", - "eventsource": "^3.0.2", - "eventsource-parser": "^3.0.0", - "jose": "^6.1.3", - "pkce-challenge": "^5.0.0", - "zod": "^4.2.0" - }, - "engines": { - "node": ">=20" - } - }, - "node_modules/@deepseek-ai/dsh-mcp-client/node_modules/@modelcontextprotocol/core": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/core/-/core-2.2.0.tgz", - "integrity": "sha512-iLhmprRmWI8EcosOA3wVvww22z02NkgqhV4fBH6f/odQBsi7xnJc0HGmi21yWO+/iKw2yzqVE127Zhna5/+JXw==", - "license": "MIT", - "peer": true, - "dependencies": { - "zod": "^4.2.0" - }, - "engines": { - "node": ">=20" - } - }, "node_modules/@deepseek-ai/dsh-ptc-runtime": { "version": "0.2.1-rc.3", "resolved": "https://registry.npmjs.org/@deepseek-ai/dsh-ptc-runtime/-/dsh-ptc-runtime-0.2.1-rc.3.tgz", @@ -907,16 +865,6 @@ "@deepseek-ai/dsh-system-prompt": "0.2.1-rc.3" } }, - "node_modules/@deepseek-ai/dsh-sandbox-policy/node_modules/zod": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz", - "integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==", - "license": "MIT", - "peer": true, - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, "node_modules/@deepseek-ai/dsh-scope": { "version": "0.2.1-rc.3", "resolved": "https://registry.npmjs.org/@deepseek-ai/dsh-scope/-/dsh-scope-0.2.1-rc.3.tgz", @@ -957,16 +905,6 @@ "@deepseek-ai/dsh-session": "0.2.1-rc.3" } }, - "node_modules/@deepseek-ai/dsh-session-projection/node_modules/zod": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz", - "integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==", - "license": "MIT", - "peer": true, - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, "node_modules/@deepseek-ai/dsh-subprocess": { "version": "0.2.1-rc.3", "resolved": "https://registry.npmjs.org/@deepseek-ai/dsh-subprocess/-/dsh-subprocess-0.2.1-rc.3.tgz", @@ -2635,7 +2573,6 @@ "version": "2.4.0", "resolved": "https://registry.npmjs.org/@modelcontextprotocol/client/-/client-2.4.0.tgz", "integrity": "sha512-LgrD2OphHuG12vfKFKz6SOnq7bKHQmhGJIAYdD+MZBn2npHEyry6uD8zvktodtl5CQM85MO0anUyD9JwmUmxww==", - "dev": true, "license": "Apache-2.0", "dependencies": { "@modelcontextprotocol/core": "2.4.0", @@ -2654,7 +2591,6 @@ "version": "2.4.0", "resolved": "https://registry.npmjs.org/@modelcontextprotocol/core/-/core-2.4.0.tgz", "integrity": "sha512-z8QBKqdfXLPzkLQuG4xp8hrVEMm1PZ1IgxMN2sMbJiFiAKOWXnAzogXn2W4aqIBlP1ea6U5yiqVquvUNM1Cj6Q==", - "dev": true, "license": "Apache-2.0", "dependencies": { "zod": "^4.2.0" @@ -8791,9 +8727,9 @@ } }, "node_modules/undici": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-8.11.2.tgz", - "integrity": "sha512-u4UB2/IrKdU6lFxumHmmo1a3fCQO5tzQllRorfoRS63txhrB7xTpSn1PftwC4qEHkOaqP95fCWW4lJzwErwzhQ==", + "version": "8.12.3", + "resolved": "https://registry.npmjs.org/undici/-/undici-8.12.3.tgz", + "integrity": "sha512-+fdndUTwBP86cVjihTp21hZHo7d6oj1c/47XPA3lL8mM0XHs+C4EkcjmgRsFnFk2f/UONGDy9ItBItmXsLOQHw==", "license": "MIT", "peer": true, "engines": { diff --git a/package.json b/package.json index d8d7aa11..b3f607cf 100644 --- a/package.json +++ b/package.json @@ -162,6 +162,23 @@ "typescript": "^5.3.3", "zod": "^4.6.7" }, + "overrides": { + "@deepseek-ai/dsh-http-proxy": { + "undici": "8.12.3" + }, + "@deepseek-ai/dsh-llm": { + "zod": "4.6.7" + }, + "@deepseek-ai/dsh-mcp-client": { + "@modelcontextprotocol/client": "2.4.0" + }, + "@deepseek-ai/dsh-sandbox-policy": { + "zod": "4.6.7" + }, + "@deepseek-ai/dsh-session-projection": { + "zod": "4.6.7" + } + }, "jest": { "preset": "ts-jest", "testEnvironment": "node",