Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of termdock

[email protected]

suspicious   confidence 55%   action isolate   analyzed 2026-09-24 18:44 UTC by yolo in 22 tool calls, with lab detonation

Summary

postinstall rebuilds node-pty and auto-installs tmux (may prompt sudo). On runtime, discovers OAuth tokens from ~/.claude/settings.json, ~/.codex/auth.json, ~/.kimi-code/credentials/, ~/.copilot/config.json, and env vars, then calls official provider usage APIs (api.anthropic.com, chatgpt.com, api.openai.com, api.github.com, api.x.ai, api.kimi.com) — tokens are NOT exfiltrated to third parties. Installs marker-carrying hooks into 7 agent config directories (agent_config_tamper). Clipboard image read via Electron API. All network egress is to legitimate provider endpoints.

Intent

A web-based terminal application with Electron desktop wrapper, P2P federation, and multi-agent integration. Reads OAuth tokens from agent config files to poll provider usage APIs for a quota dashboard. Installs hooks into Claude Code, Codex, Copilot, OpenCode, Pi, Grok, and Kimi config files.

credential_access agent_config_tamper network_egress

Findings

Credential access from agent config files high dist/server/quota/tokenDiscovery.js:17-261
Reads OAuth tokens from ~/.claude/settings.json (claude settings.json), ~/.local/share/opencode/auth.json (opencode auth.json), ~/.codex/auth.json (codex auth.json), ~/.kimi-code/credentials/kimi-code.json (kimi-code credentials), ~/.copilot/config.json (copilot config.json), plus env vars OPENAI_API_KEY, CODEX_API_KEY, GH_TOKEN, GEMINI_API_KEY, GROK_API_KEY, KIMI_API_KEY.
Agent config hook installation medium dist/server/agent/installers.js:54-63
Writes marker-carrying hooks into ~/.claude/settings.json, ~/.codex/hooks.json, ~/.copilot/hooks/termdock.json, ~/.config/opencode/plugins/termdock.js, ~/.pi/agent/extensions/termdock/index.ts, ~/.grok/hooks/termdock.json, ~/.kimi-code/config.toml.
Provider API calls with discovered tokens low dist/server/quota/providers/claude.js:9, dist/server/quota/providers/codex.js:11-13, dist/server/quota/providers/copilot.js:8-9, dist/server/quota/providers/grok.js:5, dist/server/quota/providers/kimi
Uses discovered tokens to fetch quota from https://api.anthropic.com/api/oauth/usage, https://chatgpt.com/backend-api/wham/usage, https://api.openai.com/v1/organization/usage, https://api.github.com/copilot/usage, https://api.x.ai/v1/usage, https://api.kimi.com/coding/v1/usages. Tokens stay on-device; data goes only to official provider endpoints.
Clipboard image read (Electron) low .desktop-dist/main.js:1875
clipboard.readImage() exposed via IPC handler desktop:read-clipboard-image, restricted to authorized service windows.
Postinstall may install tmux with sudo low scripts/postinstall.mjs:114-144
Tries brew install tmux, sudo apt-get install -y tmux, sudo dnf install -y tmux, etc. on missing tmux.
mDNS local network discovery info .desktop-dist/main.js:69
Sends UDP packet to 224.0.0.251:5353 on macOS for local service discovery.

Lab evidence

Install hooks ran in the isolated lab. Processes spawned: 6. Hooks: postinstall (exit 1), require (exit 0).