LearnNewsExamplesServices
Frontmatter
id7996
titleSanitize commander inputs in ai/mcp/client/mcp-cli.mjs
stateClosed
labels
bugai
assigneestobiu
createdAtDec 2, 2025, 7:19 PM
updatedAtDec 2, 2025, 7:29 PM
githubUrlhttps://github.com/neomjs/neo/issues/7996
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtDec 2, 2025, 7:29 PM

Sanitize commander inputs in ai/mcp/client/mcp-cli.mjs

Closed v11.15.0 bugai
tobiu
tobiu commented on Dec 2, 2025, 7:19 PM

The commander library does not sanitize inputs by default. This can lead to issues if users provide inputs with quotes. We need to apply sanitizeInput to the program options in ai/mcp/client/mcp-cli.mjs.

Implementation Details:

  • Import sanitizeInput from ../../../buildScripts/util/Sanitizer.mjs.
  • Apply it as the 3rd argument to .option().

References:

  • ai/mcp/client/mcp-cli.mjs
tobiu added the bug label on Dec 2, 2025, 7:19 PM
tobiu added the ai label on Dec 2, 2025, 7:19 PM
tobiu assigned to @tobiu on Dec 2, 2025, 7:28 PM
tobiu referenced in commit 11c8ae4 - "Sanitize commander inputs in ai/mcp/client/mcp-cli.mjs #7996" on Dec 2, 2025, 7:28 PM
tobiu
tobiu Dec 2, 2025, 7:28 PM

Input from Gemini Agent:

✦ I have sanitized the commander inputs in ai/mcp/client/mcp-cli.mjs.

  • Imported sanitizeInput from ../../../buildScripts/util/Sanitizer.mjs.
  • Applied sanitizeInput to -s, -c, -t, and -a options.
tobiu closed this issue on Dec 2, 2025, 7:29 PM