Repository navigation
chore(security): resolve pnpm audit vulnerabilities (6 high, 5 moderate, 1 low) - #434
Merged
Merged
Conversation
…te, 1 low) All 12 advisories are in transitive dependencies; none of the affected packages is a direct dependency of any workspace package. Following the existing convention, each is remediated by raising (or adding) a `pnpm.overrides` floor plus a lockfile refresh. Override floors raised: - @hono/node-server >=1.19.13 -> >=2.0.10 (2.0.1 -> 2.0.12) - brace-expansion >=5.0.6 -> >=5.0.8 (5.0.6 -> 5.0.8) - fast-uri >=3.1.2 -> >=3.1.4 <4 (3.1.2 -> 3.1.4) - hono >=4.12.25 -> >=4.12.27 (4.12.25 -> 4.12.32) - js-yaml >=4.2.0 -> >=4.3.0 <5 (4.2.0 -> 4.3.0) - postcss >=8.5.10 -> >=8.5.18 (8.5.15 -> 8.5.23) Override added: - body-parser >=2.3.0 (2.2.2 -> 2.3.0) fast-uri and js-yaml are upper-bounded because their fixes were backported to the old major line (js-yaml ships a `v4-legacy` dist-tag at 4.3.0; fast-uri 3.1.4 was published after 4.1.1). Their consumers declare `^3.0.1` and `^4.1.0` respectively, so a bare `>=` floor would have resolved to fast-uri 4.1.1 / js-yaml 5.2.2 and silently pushed both past their consumers' supported range. `pnpm audit` and `pnpm audit --prod` both report no known vulnerabilities. Build, typecheck, license-check and the full test suite (2641 tests) pass. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bydjnyj2uS7SjxvPhSDdnd
Contributor
📝 WalkthroughWalkthroughUpdated Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #434 +/- ##
=======================================
Coverage 87.36% 87.36%
=======================================
Files 181 181
Lines 9494 9494
Branches 2699 2624 -75
=======================================
Hits 8294 8294
Misses 1199 1199
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
tkislan
marked this pull request as ready for review
July 27, 2026 08:06
dinohamzic
approved these changes
Jul 27, 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.
Summary
pnpm auditwas failing in CI (both the Audit - Production and Audit - All jobs) with 12 advisories: 6 high, 5 moderate, 1 low.All 12 are in transitive dependencies — none of the affected packages is a direct dependency of any workspace package. Following the convention already established in this repo (#405, #393, #387, #376, #368, #338), each is remediated by raising or adding a
pnpm.overridesfloor in the rootpackage.jsonplus a lockfile refresh. No package's owndependenciesneeded to change.After the change, both
pnpm auditandpnpm audit --prodreport no known vulnerabilities.Changes
"pnpm": { "overrides": { - "@hono/node-server": ">=1.19.13", + "@hono/node-server": ">=2.0.10", "@isaacs/brace-expansion": ">=5.0.1", "ajv": ">=8.18.0", - "brace-expansion": ">=5.0.6", + "body-parser": ">=2.3.0", + "brace-expansion": ">=5.0.8", "defu": ">=6.1.5", "diff": ">=8.0.3", "express-rate-limit": ">=8.2.2", - "fast-uri": ">=3.1.2", + "fast-uri": ">=3.1.4 <4", "flatted": ">=3.4.2", "glob": ">=11.1.0", - "hono": ">=4.12.25", + "hono": ">=4.12.27", "ip-address": ">=10.1.1", - "js-yaml": ">=4.2.0", + "js-yaml": ">=4.3.0 <5", "lodash": ">=4.18.0", "lodash-es": ">=4.18.0", "minimatch": ">=10.2.3", "path-to-regexp": ">=8.4.0", "picomatch": ">=4.0.4", - "postcss": ">=8.5.10", + "postcss": ">=8.5.18", "qs": ">=6.15.2",Resulting lockfile resolutions:
@hono/node-serverbody-parserbrace-expansionfast-urihonojs-yamlpostcssWhy two overrides are upper-bounded
fast-uriandjs-yamlboth have a newer major on npm, and in both cases the security fix was backported to the old major line:js-yamlships an explicitv4-legacydist-tag pointing at 4.3.0 (latestis 5.2.2). Its consumer,json-schema-to-typescript, declaresjs-yaml: ^4.1.0.fast-uri3.1.4 was published 2026-07-19, after 4.1.1 (2026-07-18). Its consumer,ajv, declaresfast-uri: ^3.0.1.A bare
>=floor — the style used by every other entry here — resolved tofast-uri@4.1.1andjs-yaml@5.2.2, silently pushing both past their consumers' declared semver range. pnpm gives no warning when an override does this. The<4/<5bounds keep each package on the major line its consumer actually supports while still clearing the advisory. Every other entry keeps the bare>=house style, because none of them jumps a major.Note the fast-uri floor is 3.1.4, not 3.1.3: the two fast-uri advisories have different patched versions, and GHSA-v2hh-gcrm-f6hx lists 3.x as affected through
<=3.1.3, so 3.1.3 clears only the IDN advisory.Worth flagging for future audits: a
>=floor that the locked version already satisfies exerts no upgrade pressure at all while the lockfile stands — which is exactly whyfast-urisat on 3.1.2 under a>=3.1.2floor andpostcsson 8.5.15 under>=8.5.10. The floors document a minimum; only a lockfile refresh actually moves anything.Advisories and impact assessment
Reachability was verified against this repo, not just taken from the advisory text.
Production dependency graph (
@deepnote/mcp)packages/mcpis stdio-only:packages/mcp/src/server.tsimports onlyStdioServerTransport(line 2) and instantiates it (line 130). These advisories split into two groups, for two different reasons:Never loaded at all.
hono,@hono/node-serverandexpressare imported only fromdist/esm/server/streamableHttp.js,dist/esm/server/express.jsanddist/esm/server/auth/*— none of which this package ever loads. They are installed because the SDK declares them as hard dependencies, which is whypnpm audit --prodflags them. Confirmed at build level too: greppingpackages/mcp/distforexpress/body-parserreturns nothing, so tsdown never bundles them.Loaded, but the precondition still fails.
ajv— and thereforefast-uri— is live in the stdio path:dist/esm/server/index.js:3importsAjvJsonSchemaValidatorand line 51 instantiates it unconditionally in theServerconstructor, andvalidation/ajv-provider.jseagerly callsnew Ajv(). So the fast-uri argument does not rest on the transport. It rests on how ajv uses the library:ajv/dist/runtime/uri.jscallsfast-uripurely to normalize JSON-Schema$id/$refinto a cache key and$refbase — never as a network allowlist or SSRF filter, which is what both advisories require. Additionally, the only call site that compiles a non-fixed schema isserver/index.js:369(elicitationrequestedSchema), andpackages/mcpnever callselicitInputnor instantiates aClient, so the only schemas ajv ever compiles are its own fixed meta-schemas.fast-urifast-urito validate URLs against an allowlist/SSRF filter before handing them tofetch()/WHATWG URL (http://evil.com\@allowed.comparses differently in each)ajvuses it for JSON-Schema$id/$refnormalization, not as a security filterfast-urihttp://127。0。0。1/stays Unicode)honohonohono/jsxSSR withcreateContext()/useContext()under concurrent requestshonocx()fromhono/css@hono/node-serverserveStaticrunning on Windows (encoded%5C)@hono/node-serverupgradeWebSocketroutebody-parserlimitthat parses toNaN, silently disabling size enforcement (null/undefinedsafely fall back to the 100kb default)expressis never loaded; the SDK's onlylimit:call site isserver/sse.js:106, a hardcoded'4mb'passed toraw-body, not body-parserDev/build-only dependency graph
Neither of these appears in
pnpm audit --prod.brace-expansionlicense-checker-rseidelsohn→ … →glob→minimatchlicense-checkscript, not attackersbrace-expansionjs-yamlpackages/cli→json-schema-to-typescript(a devDependency)packages/cli/scripts/generate-skill-schema.ts, a codegen script over this repo's own schemapostcssvite-tsconfig-paths→vitevite-tsconfig-pathsis a vitest path-resolution helper, no CSS pipeline runsNet assessment: none of the 12 is exploitable in this codebase today — every one fails its precondition. They are worth fixing anyway because they break CI, and because the preconditions are only unmet by current usage: the moment
packages/mcpgains an HTTP transport, seven of them become live. Nothing here needs a hotfix release.Verification
pnpm audit→ no known vulnerabilitiespnpm audit --prod→ no known vulnerabilitiespnpm install --frozen-lockfile→ clean (the path CI uses)pnpm build→ all 10 packages buildpnpm typecheck→ cleanpnpm test→ 2641 passed, 1 skipped (154 files)pnpm license-check→ passpnpm biome:check→ exit 0 (6 pre-existing warnings, unchanged by this PR)🤖 Generated with Claude Code
https://claude.ai/code/session_01Bydjnyj2uS7SjxvPhSDdnd