Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of termdock

[email protected]

suspicious   confidence 55%   action isolate   analyzed 2026-09-24 21:35 UTC by yolo in 16 tool calls, with lab detonation

Summary

The postinstall hook (scripts/postinstall.mjs) rebuilds node-pty and attempts to auto-install tmux using system package managers, including with sudo on Linux. This is unusual for an npm package and can trigger a password prompt or install software unattended. The electron main process (.desktop-dist/main.js) reads clipboard images (line 1875) and spreads the full process.env into child process environments (line 1084) — desktop-app normal patterns. Agent-hook installer code (dist/server/agent/installers.js) resolves paths to ~/.claude/settings.json, ~/.codex/hooks.json, etc., but only runs when the user explicitly enables the integration through the UI. The lab run crashed on a missing dependency (node-pty) as expected in an isolated environment.

Intent

A web-based terminal application that auto-installs system packages (tmux) via sudo at postinstall time, and provides a runtime feature to install session-status hooks into AI agent config files (~/.claude/settings.json, ~/.codex/hooks.json) — gated on user action and the TERMDOCK env var.

code_execution agent_config_tamper

Findings

Auto-installs system package via sudo at postinstall medium
scripts/postinstall.mjs:134 — runs `sudo apt-get install -y tmux`, `sudo dnf install -y tmux`, etc. on Linux if tmux is not found. Can trigger a password prompt or install software unattended during npm install -g.
Writes boot-check marker to ~/.termdock/ low
scripts/postinstall.mjs:160-171 — creates ~/.termdock/ directory and writes .boot-check-ok JSON marker. Low risk; package home directory.
Spreads full process.env into child process environments low
.desktop-dist/main.js:1084 — `{ ...process.env, ... }` passed to spawned child processes. Standard desktop-electron pattern; does not exfiltrate.
Clipboard image read via Electron IPC low
.desktop-dist/main.js:1875 — `clipboard.readImage()` exposed to webContents origins via IPC. Expected for a desktop terminal app with clipboard integration.
Agent config path resolution (runtime feature) medium
dist/server/agent/installers.js:40,57,59 — resolves ~/.claude/settings.json, ~/.codex/hooks.json, ~/.config/opencode/plugins/termdock.js. Hooks are installed only when user explicitly enables the feature through the UI, and are gated on TERMDOCK env var.

Lab evidence

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