Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of local-operator-ui

[email protected]

clean   confidence 85%   action allow   analyzed 2026-09-24 19:43 UTC by yolo in 22 tool calls, with lab detonation

Summary

Install hook (bin/postinstall.js) is benign: it calls ensureElectronDist() to fetch the Electron runtime and, on Linux, restores the chrome-sandbox setuid bit via fs.fchownSync/fchmodSync on node_modules/electron/dist/chrome-sandbox (opened with O_NOFOLLOW to prevent symlink attacks). The lab recorded 0 network connections. The main bundle uses electron's safeStorage (keychain-backed encrypted storage, standard desktop pattern) and loads a local .env from cwd. PostHog analytics use a public project key sent to us.i.posthog.com at runtime, not at install time.

Intent

A legitimate Electron desktop application providing a chat interface for AI agent assistants that run Python code locally. The install hook fetches the Electron runtime (standard since Electron 42) and repairs the chrome-sandbox setuid bit on Linux. Runtime behavior includes local backend communication (127.0.0.1:1111), PostHog analytics with a public project key, and MCP credential storage in the app's own data directory.

Findings

Electron runtime fetch at install time info bin/postinstall.js:54
bin/postinstall.js calls ensureElectronDist() which downloads the Electron binary from electron.org if node_modules/electron/dist is absent. Idempotent, cache-backed. Standard since Electron 42 removed its own postinstall.
chrome-sandbox setuid repair on Linux info bin/linux-sandbox.js:234-235
bin/linux-sandbox.js repairs node_modules/electron/dist/chrome-sandbox to root:root 4755 using fs.openSync(O_NOFOLLOW|O_NONBLOCK) + fs.fchownSync + fs.fchmodSync. Symlink target is refused (outcome unsafe). Runs as root only during sudo npm install -g.
Local .env loading at startup info out/main/index.js:5595
out/main/index.js:5595 loads dotenv from path.join(process.cwd(), '.env'). Working-directory config, not home-directory credential store.
Electron safeStorage using macOS keychain info out/main/index.js:17612
out/main/index.js:17612 references login.keychain-db for createSafeStorageCipher(). This is Electron's built-in encrypted storage backend, not credential harvesting. Standard desktop app pattern.
PostHog analytics at runtime info out/main/index.js:26237
out/main/index.js:26237-26238 initializes posthog-node with public project key phc_u6n9doAtCUbpFbydIqzupCxqCaGUO4SiHMEU5ESvQRL to https://us.i.posthog.com. Runtime telemetry, not install-time.
False positive: credential_harvest on keychain path info out/main/index.js:17612
Static pre-screen flagged login.keychain-db reference as credential_harvest. This is Electron safeStorage (encrypted local keystore), not exfiltration.
False positive: prompt-injection in README and HTML info README.md:8, out/renderer/index.html:14
README.md h1 tag and index.html blob: CSP explanation are benign descriptive text, not prompt injection.

Lab evidence

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