Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of polyrouter

[email protected]

suspicious   confidence 50%   action isolate   analyzed 2026-09-19 17:24 UTC by dsv41-flash in 33 tool calls, with lab detonation

Summary

[email protected] is a ~100 MB closed-source AI-gateway product. postinstall (hooks/postinstall.js) shells out to `npm install` via hooks/sqliteRuntime.js and hooks/trayRuntime.js, downloading better-sqlite3 (native) and systray2 (bundled Go binary) into ~/.polyrouter/runtime/node_modules — a native-dependency pattern used by many legit packages, and the hook itself performs no credential access or egress. The bundled dashboard/server code reads and rewrites AI coding tools' config and credential files (~/.claude/settings.json, ~/.codex/auth.json, ~/.hermes/.env, ~/.config/jcode/provider-polyrouter.env) and stores provider OAuth tokens — consistent with its stated purpose, but high-impact for an agent host. By default it sends anonymous installation/startup telemetry (random installation_id, app_version, event, timestamp) to https://fzdduustinwqhotqlpua.supabase.co/functions/v1/public-installation-telemetry unless POLYROUTER_PUBLIC_TELEMETRY is set to 0/false/off/no or the publicTelemetryEnabled setting is false. The gateway binds 0.0.0.0:20128 by default. Detonation could not be completed (lab tool returned an error three times), so install-time/require-time behavior is unverified; the 1,500-file tree is dominated by minified Next.js/Sentry output that the regex pre-screen over-flags.

Intent

Presents itself as a "local AI gateway and OpenAI-compatible API router for AI coding tools"; the code does implement that product. It is a closed-source, Next.js-bundled application that (a) on install runs npm installs into ~/.polyrouter/runtime, (b) sends default-on anonymous installation telemetry to a third-party Supabase project, and (c) reads and rewrites AI coding tools' config/credential files (~/.claude, ~/.codex, ~/.config/jcode, ~/.hermes/.env) and provider OAuth tokens. No hidden exfiltration, obfuscated payload or destructive code was found.

network_egress credential_access agent_config_tamper download_execute code_execution persistence reconnaissance

Findings

Install hook installs third-party native/Go binaries into the home directory medium hooks/postinstall.js:6-20, hooks/sqliteRuntime.js:78-137, hooks/trayRuntime.js:74-105
package.json:21 runs `node hooks/postinstall.js`, which calls ensureSqliteRuntime() (hooks/sqliteRuntime.js:117-137) and ensureTrayRuntime() (hooks/trayRuntime.js:89-105). These spawnSync `npm install [email protected]`/`[email protected]` (optional) and `[email protected]` into ~/.polyrouter/runtime/node_modules, then chmod 0755 the systray2 Go binary (trayRuntime.js:48-58). Standard native-dependency pattern, but it is install-time download-and-execute of code outside the package tree.
Default-on anonymous telemetry to a third-party Supabase endpoint low app/.next-cli-build/server/chunks/7058.js:1 (module 97058), app/.next-cli-build/required-server-files.json:10-11
app/.next-cli-build/server/chunks/7058.js: i()/k() build the public config from the hardcoded URL https://fzdduustinwqhotqlpua.supabase.co/functions/v1/public-installation-telemetry; m()/q() POST {protocol_version, installation_id, event_id, event_type, occurred_at, app_version}. It is disabled only when env POLYROUTER_PUBLIC_TELEMETRY is 0/false/off/no or settings.publicTelemetryEnabled === false. No credentials/secrets are included, but the machine's random installation id and version are reported to a host the user did not choose.
Reads and rewrites AI coding-agent configuration and credential files medium app/.next-cli-build/server/chunks/2878.js:14-33; app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js
The dashboard's /api/cli-tools/* routes write provider base URLs and API keys into tool config files, e.g. ~/.codex/auth.json and ~/.hermes/.env and ~/.config/jcode/provider-polyrouter.env (chunks/2878.js lines ~14-33), and ~/.claude/settings.json is edited by /api/cli-tools/claude-settings. This is the product's stated function ("Connect an AI Coding Tool") and helps agents point tools at the gateway, but it means installation plus dashboard use can overwrite agent config/credentials globally.
Gateway binds to all interfaces and dashboard can manage privileged/network features medium cli.js:95-96; app/.next-cli-build/server/chunks/3127.js; app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js
cli.js:96 sets DEFAULT_HOST="0.0.0.0" and DEFAULT_PORT=20128, so the gateway is network-exposed by default (README advises localhost-only). The app also exposes tunnel (cloudflared/tailscale install), MITM proxy, and version/update routes (chunks/2712.js, 3127.js; app/api/tunnel/tailscale-install) that install system components and run with privilege.
No credential-theft, obfuscated payload or destructive logic found info hooks/*; app/.next-cli-build/server/chunks/6770.js, 7688.js (Sentry/Next dist)
Targeted greps for reading ~/.npmrc, ~/.ssh/id_rsa, ~/.aws/credentials and for base64/eval payload chains returned no genuine hits; the many static 'ransomware/obfuscation/sentry/harvest' flags in app/.next-cli-build/** come from bundled Next.js and Sentry server/client code and source maps, not from polyrouter logic. The postinstall hook itself touches no credentials and makes no direct network calls.
Detonation could not be completed info n/a
andy_detonate returned an internal error on three attempts, so no lab observation of install-hook processes, DNS names, file writes or canary-credential reads is available. Verdict is based on source review only; confidence in a fully clean bill of health is correspondingly reduced.

Lab evidence

Install hooks ran in the isolated lab. Processes spawned: 8. Hooks: postinstall (timed out).

DNS names requested: registry[.]npmjs[.]org

Direct connections: socket 127[.]0[.]0[.]1:53

Canary credential files read: /home/andy/.npmrc, /home/andy/.gitconfig

Files written outside the package: /home/andy/.polyrouter/runtime/package.json