Summary
[email protected] is a proprietary (UNLICENSED), prebuilt AI-gateway CLI: postinstall runs `npm install [email protected] [email protected] [email protected] --no-save` into ~/.polyrouter/runtime, then chmod 755 on the systray2 Go tray binary (hooks/sqliteRuntime.js, hooks/trayRuntime.js). At runtime it can install its own root CA into the system trust store and set NODE_EXTRA_CA_CERTS via launchctl/reg while editing the hosts file (server/chunks/3127.js), rewrites other agents' settings (Claude/.codex/Cursor/opencode/kilo/jcode) to point at itself, and posts anonymised installation/startup events to https://fzdduustinwqhotqlpua.supabase.co/functions/v1/public-installation-telemetry. I found no credential theft (no ~/.npmrc, ~/.ssh, ~/.aws reads, no decoded-and-eval'd blobs), and the install hook telemetry is opt-outable, but the install-time npm execution, agent-config tampering and TLS-interception capability are unverified by a lab run — andym_detonate failed three times on this package, so nothing could be observed. Treat as suspicious: install only in a throwaway sandbox without real provider tokens.
Intent
Claims to be a local AI gateway / OpenAI-compatible router CLI. It largely does that (bundled Next.js dashboard + /v1 router), but the shipped artifact is a 100 MB closed-source app that at install time npm-installs native binaries into ~/.polyrouter, rewrites other AI coding tools' config files (including storing its API key in ~/.config/jcode/provider-polyrouter.env), sends install/startup telemetry to an anonymous Supabase project, and can install a MITM root CA into the OS trust store with system-wide NODE_EXTRA_CA_CERTS and hosts-file edits.
credential_access network_egress download_execute agent_config_tamper privilege persistence reconnaissance
postinstall npm-installs native code into the user home directory medium hooks/postinstall.js:6-20, hooks/sqliteRuntime.js:78-137, hooks/trayRuntime.js:48-104
hooks/postinstall.js requires hooks/sqliteRuntime.js and hooks/trayRuntime.js. sqliteRuntime.js:78-103 runs `npm install
[email protected] … --no-save --prefer-online` with cwd ~/.polyrouter/runtime (native .node compiled/downloaded), and trayRuntime.js:48-58,74-85 npm-installs
[email protected] and chmods the bundled Go binary traybin/tray_{darwin,linux}_release to 0755. The comments explain the design (Windows EBUSY, AV false positives), but the effect is code fetched from the registry and executed from a home-directory path outside the package.
Rewrites other AI coding tools' configuration and stores its own key outside the package medium app/.next-cli-build/server/chunks/2878.js:28,33; app/.next-cli-build/static/chunks/1477-161cae315795e6df.js:55
The /api/cli-tools/*-settings routes read and write settings for Claude, Codex, Cursor, Cline, Kilo, OpenCode, OpenClaw, Hermes, Droid, jcode etc. (app/.next-cli-build/static/chunks/1477-161cae315795e6df.js:55 writes `~/.config/jcode/provider-polyrouter.env` containing JCODE_POLYROUTER_API_KEY). cli-tools/[toolId]/page.js references `settingsFile: "~/.claude/settings.json"`. This is an agent-supply-chain surface: every tool that an agent runs can be silently re-pointed at this gateway and handed a key.
Telemetry to an anonymous Supabase project (runtime, opt-out available) medium app/.next-cli-build/server/chunks/7058.js:1; app/.next-cli-build/required-server-files.json:10
server/chunks/7058.js posts JSON (protocol_version, installation_id, event_id, event_type, occurred_at, app_version) to https://fzdduustinwqhotqlpua.supabase.co/functions/v1/public-installation-telemetry on install/startup events; the URL is baked into required-server-files.json as PUBLIC_INSTALLATION_TELEMETRY_URL. It can be disabled via the publicTelemetryEnabled setting or POLYROUTER_PUBLIC_TELEMETRY=0/false/off/no, and a private self-hosted target takes precedence. Payload is anonymised — no keys or prompts seen in the request body — but the destination is an unexplained third-party host.
MITM TLS interception with system trust-store and hosts modifications high app/.next-cli-build/server/chunks/3127.js:5,49,58; app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js
server/chunks/3127.js generates/handles rootCA.key/rootCA.crt under the app data dir, installs the CA into the OS trust store (macOS `security … /Library/Keychains/System.keychain`, Windows Root store), runs `launchctl setenv NODE_EXTRA_CA_CERTS` (or `reg` / HKCU\Environment on Windows) so every Node process in the session trusts it, and edits the hosts file ("Failed to clean hosts" path, sudo -n kills). It is user-triggered from the dashboard (antigravity-mitm routes) and matches the product's feature set, but it is a genuine machine-wide TLS-interception capability shipped inside an npm package.
Gateway binds 0.0.0.0 by default medium cli.js:95-96,603-606
cli.js sets DEFAULT_HOST = "0.0.0.0" (line 96) and warns only in a console message at line 605. The dashboard exposes provider credentials, API keys and usage data; an agent that runs `npx polyrouter` without --host 127.0.0.1 exposes it on the LAN.
UI and routes direct users to install third-party code with curl | bash low app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js:15
The jcode integration returns the instruction "Install via: curl -fsSL https://raw.githubusercontent.com/1jehuang/jcode/master/scripts/install.sh | bash" (cli-tools/jcode-settings and all-statuses routes), and the Tailscale integration downloads and runs an installer MSI (chunks/2712.js:3). User-facing guidance rather than automatic execution, but it teaches an agent operator to pipe remote scripts into a shell.
No credential exfiltration found, but also no lab run info hooks/postinstall.js (detonation unavailable)
Whole-tree searches for .npmrc, id_rsa, .ssh/, .aws/credentials, login.keychain, browser cookie stores and for decoded-and-eval patterns (Buffer.from(...,'base64')/eval/new Function) returned no payload-style hits; most static-prescreen 'ransomware/anti_analysis/browser_theft' tags come from the bundled Next.js/Sentry/minified chunks (chunks/6770.js, 7688.js, instrumentation.js). However andy_detonate failed three times on this package (tool returned invalid output), so install-hook behaviour — including the outbound npm fetches and any canary reads — could not be confirmed in the lab. That is the main reason the verdict is suspicious rather than clean.
Docs flagged as prompt-injection are not instructions to an AI reader info README.md:121-126; app/.next-cli-build/server/app/dashboard/token-saver.html:1
The two flagged strings are benign: README.md:121-126 is an ordinary security warning ("Never share API keys, OAuth tokens, local SQLite databases…") and dashboard/token-saver.html contains the app's own terse-system-prompt marketing copy. Neither tries to steer an analysing model.
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