v0.2.2 — security hardening (CSO audit fixes)
Security fixes
Findings from a full CSO audit, all resolved:
-
Health-check command allowlist (HIGH) —
spawn()in health checks now validates the command against an allowlist (npx,uvx,docker,node,python) before execution. Prevents RCE if a config file was tampered with after install. -
MCP tool input constraints (MEDIUM) — Added Zod bounds on all MCP server tool inputs:
querymax 200 chars,descriptionmax 1000 chars,limitmax 100,minTrustScorerange 0-100 on all schemas. Prevents oversized payloads and trust-gate bypass via negative values. -
Client ID validation in MCP server (MEDIUM) —
resolveClientsnow validates--clientagainstCLIENT_IDSallowlist before theas ClientIdcast, matching the pattern already used in CLI commands. -
Doctor command allowlist (MEDIUM) —
execCheckDefaultnow restricts which commands can be passed towhich/where. -
Warning listener fix (MEDIUM) — Removed
removeAllListeners("warning")which was suppressing Node.js security warnings. Now uses an additive filter for the cli-table3 noise only. -
Always validate server name (LOW) —
handleInstallnow validates the server name unconditionally, even when called fromhandleSetupwith pre-resolved entries.
Install / upgrade
npm install -g @getmcpm/cli@0.2.2Full changelog: v0.2.1...v0.2.2