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: orchestrator/memory bearer tokens persisted world-readable in kimi/grok user configs, never revoked #125
The bearer tokens that protect the memory and orchestrator (coder-threads) servers are written into user-global CLI configs and left there forever:
electron/memory-sup.js:404 (ensureKimiMcpConfig) writes ~/.kimi-code/mcp.json with fs.writeFileSync(..., "utf8") and no mode, so a fresh file lands ~0644 containing headers.Authorization: Bearer <token> for both coder-memory and coder-threads.
electron/memory-sup.js:466-472 registers grok with grok mcp add <name> <url> -H "Authorization: Bearer <token>" -s user, persisting the token in ~/.grok/config.toml at user scope.
unregisterMcpServer (electron/memory-sup.js:129-141) only rewrites the claude config; the kimi/grok entries (with tokens) are never removed. They outlive the server, app updates, and uninstall.
Related: getCodexMcpArgs (electron/memory-sup.js:242-250) puts the token in a URL query param on the command line, so it is visible to any local process via ps for the lifetime of every codex run.
Impact
The coder-threads token drives thread_fork/thread_send → runner.startRun (electron/orchServer.js:262-313), i.e. arbitrary agent runs in any registered project. Any kimi/grok CLI session on the machine (outside Solenta, any cwd) silently carries this capability, and the tokens sit in world-readable files on multi-user machines. A leaked token is a full RCE primitive against every project open in Solenta while the app runs.
Fix direction
Write MCP config files with mode 0600.
Unregister kimi/grok MCP entries on shutdown/uninstall like the claude path does.
Prefer header/env-based auth for codex over a token in argv.
Consider rotating the token per app session so stale persisted entries stop working.
Activity
Merge pull request #195 from currentbits/coder/security-orchestrator-…