Skip to content

chore(security): resolve pnpm audit vulnerabilities (6 high, 5 moderate, 1 low) - #434

Merged
tkislan merged 1 commit into
mainfrom
chore/security-audit-2026-07-27
Jul 27, 2026
Merged

tkislan merged 1 commit into
mainfrom
chore/security-audit-2026-07-27

Conversation

@tkislan

@tkislan tkislan commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

pnpm audit was 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.overrides floor in the root package.json plus a lockfile refresh. No package's own dependencies needed to change.

After the change, both pnpm audit and pnpm audit --prod report 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:

Package Before After
@hono/node-server 2.0.1 2.0.12
body-parser 2.2.2 2.3.0
brace-expansion 5.0.6 5.0.8
fast-uri 3.1.2 3.1.4
hono 4.12.25 4.12.32
js-yaml 4.2.0 4.3.0
postcss 8.5.15 8.5.23

Why two overrides are upper-bounded

fast-uri and js-yaml both have a newer major on npm, and in both cases the security fix was backported to the old major line:

  • js-yaml ships an explicit v4-legacy dist-tag pointing at 4.3.0 (latest is 5.2.2). Its consumer, json-schema-to-typescript, declares js-yaml: ^4.1.0.
  • fast-uri 3.1.4 was published 2026-07-19, after 4.1.1 (2026-07-18). Its consumer, ajv, declares fast-uri: ^3.0.1.

A bare >= floor — the style used by every other entry here — resolved to fast-uri@4.1.1 and js-yaml@5.2.2, silently pushing both past their consumers' declared semver range. pnpm gives no warning when an override does this. The <4 / <5 bounds 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 why fast-uri sat on 3.1.2 under a >=3.1.2 floor and postcss on 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/mcp is stdio-only: packages/mcp/src/server.ts imports only StdioServerTransport (line 2) and instantiates it (line 130). These advisories split into two groups, for two different reasons:

Never loaded at all. hono, @hono/node-server and express are imported only from dist/esm/server/streamableHttp.js, dist/esm/server/express.js and dist/esm/server/auth/* — none of which this package ever loads. They are installed because the SDK declares them as hard dependencies, which is why pnpm audit --prod flags them. Confirmed at build level too: grepping packages/mcp/dist for express/body-parser returns nothing, so tsdown never bundles them.

Loaded, but the precondition still fails. ajv — and therefore fast-uri — is live in the stdio path: dist/esm/server/index.js:3 imports AjvJsonSchemaValidator and line 51 instantiates it unconditionally in the Server constructor, and validation/ajv-provider.js eagerly calls new Ajv(). So the fast-uri argument does not rest on the transport. It rests on how ajv uses the library: ajv/dist/runtime/uri.js calls fast-uri purely to normalize JSON-Schema $id/$ref into a cache key and $ref base — 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 is server/index.js:369 (elicitation requestedSchema), and packages/mcp never calls elicitInput nor instantiates a Client, so the only schemas ajv ever compiles are its own fixed meta-schemas.

Advisory Package Sev / CVSS Precondition Reachable here?
GHSA-v2hh-gcrm-f6hx fast-uri High 7.5 App uses fast-uri to validate URLs against an allowlist/SSRF filter before handing them to fetch()/WHATWG URL (http://evil.com\@allowed.com parses differently in each) No — loaded, but ajv uses it for JSON-Schema $id/$ref normalization, not as a security filter
GHSA-4c8g-83qw-93j6 fast-uri High 7.5 Same as above (IDN canonicalization variant — http://127。0。0。1/ stays Unicode) No — same reason
GHSA-xgm2-5f3f-mvvc hono Mod 4.8 Deployed via Hono's AWS API Gateway v1 / VPC Lattice adapter No — no HTTP server, no Lambda adapter
GHSA-hvrm-45r6-mjfj hono Mod 6.5 Uses hono/jsx SSR with createContext()/useContext() under concurrent requests No — no JSX, no SSR
GHSA-w62v-xxxg-mg59 hono Mod 6.1 Server-side JSX rendering passing untrusted input to cx() from hono/css No — no JSX rendering
GHSA-frvp-7c67-39w9 @hono/node-server Mod 5.9 serveStatic running on Windows (encoded %5C) No — no static file serving
GHSA-9mqv-5hh9-4cgg @hono/node-server Mod 5.3 Publicly reachable upgradeWebSocket route No — no WebSocket endpoint
GHSA-v422-hmwv-36x6 body-parser Low 3.7 App passes an unvalidated/computed limit that parses to NaN, silently disabling size enforcement (null/undefined safely fall back to the 100kb default) No — express is never loaded; the SDK's only limit: call site is server/sse.js:106, a hardcoded '4mb' passed to raw-body, not body-parser

Dev/build-only dependency graph

Neither of these appears in pnpm audit --prod.

Advisory Package Sev / CVSS Path Reachable here?
GHSA-3jxr-9vmj-r5cp brace-expansion High 7.7 root → license-checker-rseidelsohn → … → glob → minimatch No — dev-only; patterns come from the license-check script, not attackers
GHSA-mh99-v99m-4gvg brace-expansion High 7.5 same No — same reason
GHSA-52cp-r559-cp3m js-yaml High 7.5 packages/cli → json-schema-to-typescript (a devDependency) No — only used by packages/cli/scripts/generate-skill-schema.ts, a codegen script over this repo's own schema
GHSA-r28c-9q8g-f849 postcss High 7.5 root → vite-tsconfig-paths → vite No — dev-only; vite-tsconfig-paths is a vitest path-resolution helper, no CSS pipeline runs

Net 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/mcp gains an HTTP transport, seven of them become live. Nothing here needs a hotfix release.

Verification

  • pnpm audit → no known vulnerabilities
  • pnpm audit --prod → no known vulnerabilities
  • pnpm install --frozen-lockfile → clean (the path CI uses)
  • pnpm build → all 10 packages build
  • pnpm typecheck → clean
  • pnpm test → 2641 passed, 1 skipped (154 files)
  • pnpm license-check → pass
  • pnpm biome:check → exit 0 (6 pre-existing warnings, unchanged by this PR)

🤖 Generated with Claude Code

https://claude.ai/code/session_01Bydjnyj2uS7SjxvPhSDdnd

…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
@coderabbitai

coderabbitai Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Updated pnpm.overrides constraints for @hono/node-server, brace-expansion, fast-uri, hono, js-yaml, and postcss. Minimum versions were raised, with <4 and <5 upper bounds added for fast-uri and js-yaml.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Suggested reviewers: dinohamzic, m1so, jamesbhobbs

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Updates Docs ✅ Passed PASS: This PR only changes pnpm overrides/lockfile for audit fixes; no feature docs were required, and no docs files changed.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the security-focused pnpm audit fixes and matches the reported vulnerability counts.

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.36%. Comparing base (17a4c53) to head (7745798).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tkislan
tkislan marked this pull request as ready for review July 27, 2026 08:06
@tkislan
tkislan requested a review from a team as a code owner July 27, 2026 08:06
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.

2 participants