Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of termdock

[email protected]

clean   confidence 72%   action allow   analyzed 2026-09-24 19:39 UTC by yolo in 26 tool calls, with lab detonation

Summary

Legitimate terminal application. The postinstall hook rebuilds node-pty and auto-installs tmux. The Electron main process reads the clipboard for terminal paste support and passes the full process.env to child processes as a runtime environment (not exfiltration). dist/server/quota/tokenDiscovery.js reads OAuth tokens from agent config files (~/.claude/settings.json, ~/.codex/auth.json, ~/.kimi-code/credentials/) and env vars, then uses them to fetch quota data from the respective provider APIs (api.anthropic.com, api.openai.com, etc.) — tokens never leave the machine. dist/server/agent/installers.js writes hook entries into agent config directories for collaboration features. Lab run: postinstall crashed on missing node-pty (expected, no dependencies installed); no network egress, no canary reads.

Intent

A complete web-based terminal application with Electron desktop wrapper. Integrates with AI coding agents (Claude, Codex, Copilot, etc.) by installing hooks into their config directories and reading their OAuth tokens to display subscription quota information.

agent_config_tamper clipboard_screen network_egress

Findings

Postinstall rebuilds native modules and installs tmux info scripts/postinstall.mjs:52-156
scripts/postinstall.mjs runs node-gyp rebuild on node-pty and attempts to install tmux via brew/apt-get/dnf/etc. on missing systems.
Clipboard image read via Electron IPC info .desktop-dist/main.js:1871
.desktop-dist/main.js:1871-1879 exposes clipboard.readImage() via IPC, gated by window origin verification.
Process.env passed to child runtime low .desktop-dist/main.js:1084
.desktop-dist/main.js:1084 spreads the entire process.env into child process environment for the bundled runtime. This is standard for runtime isolation, not exfiltration.
Agent OAuth token discovery for quota management low dist/server/quota/tokenDiscovery.js:1-265
dist/server/quota/tokenDiscovery.js reads tokens from ~/.claude/settings.json, ~/.codex/auth.json, ~/.kimi-code/credentials/, ~/.copilot/config.json, and env vars (OPENAI_API_KEY, GH_TOKEN, etc.). Tokens are used only to call provider APIs for quota/usage data. No outbound exfiltration.
Hook installer writes into agent config directories low dist/server/agent/installers.js:54-63
dist/server/agent/installers.js writes termdock hook scripts 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. Ownership-guarded, idempotent.
UDP multicast for local network discovery info .desktop-dist/main.js:59-69
.desktop-dist/main.js:69 sends a UDP datagram to 224.0.0.251:5353 (mDNS/Bonjour) on macOS to trigger network permission prompt.

Lab evidence

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