Skip to content

security: dependency cleanup — 0 vulnerabilities (npm audit clean) (v0.2.0) - #4

Open
jamubc wants to merge 1 commit into
masterfrom
security/dependency-cleanup-v0.2.0
Open

security: dependency cleanup — 0 vulnerabilities (npm audit clean) (v0.2.0)#4
jamubc wants to merge 1 commit into
masterfrom
security/dependency-cleanup-v0.2.0

Conversation

@jamubc

@jamubc jamubc commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Summary

Closes all open Dependabot alerts. Achieves 0 vulnerabilities (npm audit clean) across the full dependency tree. No source logic changes beyond the SDK capability fix and the test-tool registry gate.


Vulnerability Fixes

Direct / Production Dependencies

CVE / Advisory Package Sev Fix
CVE-2026-44705 tmp (via inquirer) HIGH Remove unused inquirer dep
CVE-2026-8769 @ai-sdk/provider-utils (via ai) LOW Remove unused ai dep
GHSA-8r9q-7v3j-jr4g @modelcontextprotocol/sdk <=1.25.1 HIGH Upgrade 0.5.01.29.0
GHSA-w48q-cv73-mx4w @modelcontextprotocol/sdk <=1.25.1 HIGH Upgrade 0.5.01.29.0

Dev / Transitive Dependencies (overrides)

CVE / Advisory Package Sev Fix
CVE-2026-41907 uuid <11.1.1 MEDIUM Override ^11.1.1
GHSA-mw96-cpmx-2vgc rollup 4.0.0-4.58.0 HIGH Override ^4.61.0
GHSA-36hm-qxxp-pg3m preact 10.26.5-10.26.9 HIGH Override ^10.27.0
GHSA-4fh9-h7wg-q85m mdast-util-to-hast 13.0.0-13.2.0 MEDIUM Override ^13.2.1
GHSA-67mh-4wv8-2f99 esbuild <=0.24.2 MEDIUM Override ^0.25.0
CVE-2026-39365 / GHSA-4w7w-66w2-5vf9 vite <=6.4.1 MEDIUM Override ^6.4.2
CVE-2026-41305 postcss <8.5.10 MEDIUM Override ^8.5.10
CVE-2026-41238/41239/41240 dompurify <3.4.0 MEDIUM Override ^3.4.0
CVE-2026-41159/41149/41148 mermaid <=11.14.0 MEDIUM Upgrade devDep ^11.15.0

Removed Dead Dependencies

Package Reason
inquirer@9.0.0 + @types/inquirer Never imported in src/. Brought in the tmp path-traversal chain.
ai@4.3.17 Never imported in src/. Brought in the @ai-sdk/provider-utils resource exhaustion chain.
archiver@7.0.1 Never imported anywhere. Removing it eliminates glob (HIGH), lodash (HIGH), minimatch (HIGH), brace-expansion (MODERATE). 83 packages removed.

Source Changes

  • src/index.ts — removed notifications: {} from the Server capabilities object. This key was dropped from the @modelcontextprotocol/sdk 1.x API; keeping it causes a TypeScript error against the new types.
  • src/tools/index.tstimeoutTestTool is now gated behind process.env.QWEN_MCP_TEST_TOOLS. It no longer appears as a user-facing tool in normal operation.

Vite Override

vitepress@1.6.3 pins vite@^5.4.14. The 5.4.x line has no backport for CVE-2026-39365 (path traversal in the dev server). The "overrides": { "vite": "^6.4.2" } entry forces the full tree to resolve to a patched version. Verified: npm run docs:build completes successfully.

Test Plan

  • npm audit — 0 vulnerabilities
  • tsc --noEmit — clean
  • npm run build — full dist build
  • npm run docs:build — VitePress docs build with vite override

…0.2.0)

Closes all open Dependabot alerts by removing dead production dependencies,
upgrading the MCP SDK, and patching transitive chains via overrides.

Removed unused production deps (never imported in src/):
- inquirer (CVE-2026-44705, HIGH — path traversal via tmp/external-editor)
- ai (CVE-2026-8769, LOW — resource exhaustion in @ai-sdk/provider-utils)

Removed unused devDeps:
- @types/inquirer (orphaned stubs)
- archiver (never imported; brought in glob/lodash/minimatch HIGH chain, 83 pkgs)

Upgraded:
- @modelcontextprotocol/sdk 0.5.0 → 1.29.0
  (GHSA-8r9q-7v3j-jr4g HIGH — ReDoS; GHSA-w48q-cv73-mx4w HIGH — DNS rebinding)
  Breaking change: removed `notifications` from Server capabilities (dropped in 1.x).
- mermaid ^11.9.0 → ^11.15.0
  (CVE-2026-41159/41149/41148 — CSS/HTML injection)

Added overrides for transitive vulnerabilities:
  postcss ^8.5.10, dompurify ^3.4.0, uuid ^11.1.1, rollup ^4.61.0,
  preact ^10.27.0, mdast-util-to-hast ^13.2.1, esbuild ^0.25.0, vite ^6.4.2

Gated timeout-test tool behind QWEN_MCP_TEST_TOOLS env var so it is not
visible to end users in normal operation.

No source logic changes beyond the SDK capability fix and the registry gate.
npm audit: 0 vulnerabilities. tsc --noEmit: clean.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request bumps the version of qwen-mcp-tool to 0.2.0, updates dependencies (including upgrading @modelcontextprotocol/sdk to ^1.29.0 and adding dependency overrides), and removes the notifications capability. It also refactors tool registration so that the timeoutTestTool is only registered when the QWEN_MCP_TEST_TOOLS environment variable is set. Feedback was provided to explicitly check if this environment variable is equal to the string "true", as any non-empty string (like "false") would otherwise evaluate to truthy in JavaScript.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/tools/index.ts
Comment on lines +18 to +20
if (process.env.QWEN_MCP_TEST_TOOLS) {
toolRegistry.push(timeoutTestTool);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

In Node.js, environment variables retrieved from process.env are always strings (or undefined). Checking if (process.env.QWEN_MCP_TEST_TOOLS) will evaluate to true even if the variable is explicitly set to "false" or "0" because any non-empty string is truthy in JavaScript. To avoid registering test tools when they are explicitly disabled via QWEN_MCP_TEST_TOOLS=false, check for an explicit "true" value.

Suggested change
if (process.env.QWEN_MCP_TEST_TOOLS) {
toolRegistry.push(timeoutTestTool);
}
if (process.env.QWEN_MCP_TEST_TOOLS === "true") {
toolRegistry.push(timeoutTestTool);
}

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