You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Security: user-registered MCP servers get blanket tool auto-approval in headless claude runs #126
getClaudeMcpArgs (electron/memory-sup.js:216-232) builds --allowedTools=mcp__<name>__* for allactiveServers(). That set includes user-added servers from settings, merged by syncUserMcpServers (memory-sup.js:156-190) into extraServers and written into the claude MCP config (writeMcpConfig, memory-sup.js:655-678). The comment at line 227 ("Scope is exactly our own servers' tools") is stale.
In headless -p runs there is no permission prompt, so every tool a user-added (possibly remote) MCP server exposes runs unapproved in every claude turn. The wildcard even pre-approves tools added server-side after registration, since it covers the whole namespace. A compromised or malicious MCP endpoint gets a silent, permanent code-execution channel.
Fix direction
Only first-party servers (coder-memory, coder-threads) should appear in the --allowedTools allow rule. User-registered servers can stay in the MCP config but should not be blanket-approved; if headless approval is desired for them, make it an explicit per-server opt-in in settings.
Activity