Skip to content

fix(security): npm audit fix; require Node 20 - #12

Merged
salmov merged 2 commits into
mainfrom
fix/npm-audit-node20
Oct 14, 2026
Merged

salmov merged 2 commits into
mainfrom
fix/npm-audit-node20

Conversation

@salmov

@salmov salmov commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Problem

The security CI job (npm audit --audit-level=high) has failed on main since June: 9 advisories (1 critical, 4 high, 3 moderate, 1 low), including qs DoS advisories.

Fix

  • npm audit fix without --force. Only package-lock.json changes and all ranges stay semver-compatible. Notable bumps: @modelcontextprotocol/sdk 1.29.0 → 1.32.1, @hono/node-server 1.19.14 → 2.1.5, qs 6.15.1 → 6.16.0, hono 4.12 → 4.13. The lockfile also picks up the publora-mcp-stdio bin entry it was missing.
  • Node 18 dropped: @hono/node-server 2.x requires Node ≥ 20. With the new lockfile, 2 MCP-session tests fail on Node 18, which reached end of life in April 2025. engines.node is now >=20.0.0 and the CI matrix is [20, 22]. The Dockerfile already uses node:20-alpine.

⚠️ @publora/mcp-server@1.1.0 on npm still declares >=18. This PR changes only the repository; the npm package changes only on the next publish.

Stacked on #11 (the hanging-tests fix); merge #11 first.

Verification (Docker, from a clean npm ci)

Node npm test npm audit --audit-level=high npm ci --ignore-scripts
20 11 pass, 0 fail 0 vulnerabilities OK
22 11 pass, 0 fail 0 vulnerabilities OK
18 2 fail (needs Node 20) — —

The module-level setInterval kept the event loop alive, so `node --test`
never finished and every CI test job ran until GitHub's 6-hour cancel.
npm audit fix (no --force) clears all 9 advisories (1 critical, 4 high).
@modelcontextprotocol/sdk 1.32 pulls @hono/node-server 2.x, which needs
Node >= 20, so engines and the CI matrix drop Node 18.
@salmov
salmov merged commit db9f137 into main Oct 14, 2026
3 checks passed
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.

1 participant