Summary
No malicious mechanism found: postinstall only shells out to `npm install [email protected]` / `[email protected]` (+ `[email protected]` on macOS/Linux) into ~/.polyrouter/runtime, as documented in package.json comments; cli.js and the bundle do what the README claims (local gateway on :20128, dashboard, provider OAuth/token import, CLI-tool config writers, optional MITM root-CA install). The static prescreen's "credential_harvest / ransomware / macos_stealer" tags are false positives from minified Next.js internals and from the product's own cert/keychain code (chunks/3127.js is the MITM CA installer, not a stealer). Residual risk is by-design blast radius rather than malice: it reads other tools' credential stores, rewrites their configs, installs a root CA with sudo, binds 0.0.0.0 by default, and sends an anonymous install/startup UUID to a Supabase endpoint that is on by default (documented on the bundled /privacy page, switchable via setting publicTelemetryEnabled=false or POLYROUTER_PUBLIC_TELEMETRY=0). Install it in a sandbox if the machine holds production keys; the lab detonation could not run (tool error), so my clean label rests on static reading of the hooks, CLI and entry chain.
Intent
PolyRouter is a proprietary, closed-source local AI gateway (Next.js dashboard + CLI + OpenAI-compatible router) that stores provider OAuth/API credentials locally and rewrites AI coding tools' config files to point at it. Every capability I could trace matches that stated purpose; I found no exfiltration of secrets, no obfuscated payload, and no download-and-execute of remote code.
network_egress download_execute credential_access agent_config_tamper reconnaissance persistence destructive
postinstall installs runtime deps via npm into the user's home directory medium package.json:21, hooks/postinstall.js:6-20, hooks/sqliteRuntime.js:78-136
postinstall requires hooks/sqliteRuntime.js and hooks/trayRuntime.js, which spawnSync('npm', ['install','
[email protected]'|'
[email protected]'|'
[email protected]','--no-audit','--no-fund','--prefer-online']) with cwd ~/.polyrouter/runtime (or %APPDATA%\polyrouter on Windows). Pinned versions of popular packages, documented in package.json comment_sqlite/comment_systray; this is install-time network egress + execution of registry code, comparable to node-gyp/prebuild-install. Failure is caught and non-fatal.
Install hook writes outside the package and deletes a dependency directory low hooks/sqliteRuntime.js:27-42, hooks/trayRuntime.js:25-58
ensureRuntimeDir() creates ~/.polyrouter/runtime and writes a private package.json there; cleanupLegacySystray() does fs.rmSync(dir,{recursive:true,force:true}) on ~/.polyrouter/runtime/node_modules/systray and on <pkg>/node_modules/systray; chmodSystrayBin() sets 0755 on the systray2 tray binary. All bounded to the app's own data dir and the legacy package name, but it is a destructive rm -rf executed at install time.
Default-on anonymous install/startup telemetry to a third-party Supabase function medium app/.next-cli-build/server/chunks/7058.js:1, app/.next-cli-build/required-server-files.json:9, app/.next-cli-build/server/app/api/settings/public-telemetry/route.js
flushInstallationTelemetry()/recordStartupTelemetry() POST {protocol_version,installation_id,event_id,event_type,occurred_at,app_version} to https://fzdduustinwqhotqlpua.supabase.co/functions/v1/public-installation-telemetry. installation_id is a locally generated UUID; no provider keys, tokens or prompt content are included. Enabled unless settings.publicTelemetryEnabled === false or POLYROUTER_PUBLIC_TELEMETRY is 0/false/off/no; the README does not mention it, though the bundled /privacy page documents it and its off switch.
Reads AI-tool credential stores and rewrites their configuration files high app/.next-cli-build/server/app/api/oauth/{codex/import-token,cursor/auto-import,kiro/import,chatgpt-web/cookie}/route.js, app/.next-cli-build/server/chunks/2878.js:14, app/.next-cli-build/server/app/a
Server routes import OAuth tokens/cookies from other CLI tools (e.g. writes/reads ~/.codex/auth.json, ~/.claude/settings.json, Cursor/OpenCode/Kilo configs) into the local SQLite providerConnections table and push PolyRouter base URL + key back into those tools' config. This is credential_access + agent_config_tamper by design (the product is a gateway that reuses provider logins); I found no code path that sends those tokens to any remote host.
Optional MITM root CA installed into the system trust store with admin rights medium app/.next-cli-build/server/chunks/3127.js:1-39
installCert() runs `security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain` on macOS, PowerShell `certutil -addstore Root` on Windows and sudo `cp ... /usr/local/share/ca-certificates/` + update-ca-certificates plus `certutil -d sql:...` into ~/.pki/nssdb and ~/.mozilla/firefox/*/cert9.db on Linux. Triggered only from the MITM/antigravity dashboard features; prescreen tags browser_theft/macos_stealer on this file are false positives.
Aggressive process management and default network exposure low cli.js:96, cli.js:243-338, cli.js:604-605
CLI defaults to host 0.0.0.0:20128 and warns about LAN exposure; before starting it kills processes matching 'node ... polyrouter' / 'next-server' from `ps aux`, plus anything listening on the port (lsof/kill -9, taskkill) and cloudflared instances whose --url matches the app port. Standard for this kind of launcher but wide-reaching on a shared dev box.
User-triggered autostart (persistence) and detached background process info cli.js:766-800
Choosing 'Hide to Tray' calls src/cli/tray/autostart.enableAutoStart(__filename) (login/boot autostart) and on Windows/Linux spawns a detached `node cli.js --tray` process. Requires an explicit menu choice; not silent install-time persistence.
Updater spawns `npm i -g polyrouter@latest` after the app exits low app/src/lib/updater/updater.js:1-120, app/.next-cli-build/server/app/api/version/update/route.js
A detached updater waits for the app port to free, then runs a global npm install of the package itself, exposing status on 127.0.0.1:20129 and logging to ~/.polyrouter/update/install.log. Registry-only, package-name driven (UPDATER_PKG_NAME), no arbitrary URL fetch observed.
Prescreen capability tags are dominated by false positives; no encoded payload found info app/.next-cli-build/server/{chunks,middleware.js,instrumentation.js,.next-cli-build/app/node_modules}
The flagged files are Next.js runtime bundles (Sentry debug-ID stubs, base64/atob helpers, source maps) and bundled npm deps; the 'ransomware'/'crypto_wallet'/'anti_analysis' hits come from generic crypto and sandbox-detection strings in those libraries. No Buffer.from(...,'base64') payload that is eval'd or spawned, no reverse shell, no webhook/Discord/Telegram egress was found in any file I read, and I found no prompt-injection text aimed at an AI reader (README.md:125 is a security note; dashboard/token-saver.html is UI copy about a terse system prompt).
Lab detonation unavailable info n/a
andy_detonate failed twice with a tool error ('invalid output: value is not lossless JSON'), so no runtime evidence (child processes, connection attempts, canary reads) was collected. This is the main reason confidence in the clean label is only moderate: the postinstall path installs well-known packages offline-fail here, and the 100 MB minified Next.js build could only be sampled, not exhaustively read.
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