Summary
[email protected] is a large (81 MB) self-contained AI proxy gateway. The postinstall hook lazily installs native modules (better-sqlite3, systray2) into ~/.miawrouter/runtime — a user-writable data directory — to avoid Windows EBUSY on global updates. At runtime it launches a Next.js HTTP server on port 21128 exposing a web dashboard and API routes for OAuth token imports (Codex, Cursor, Kiro, etc.), MCP plugin spawning, proxy tunneling (cloudflared/tailscale), and per-provider settings management. No stealthy credential exfiltration, C2 channels, or download-execute patterns observed.
Intent
A self-hosted AI proxy/gateway CLI with a web dashboard for managing multiple AI provider configurations, OAuth token imports, and MCP plugin bridging. Bundles a full Next.js server.
Local-native-module warm-up at install time info hooks/postinstall.js:6-7
hooks/postinstall.js calls ensureSqliteRuntime() and ensureTrayRuntime(), which run `npm install
[email protected] [email protected] [email protected]` into ~/.miawrouter/runtime/node_modules. This is a user-writable data directory, not a system location. The lab wrote only ~/.miawrouter/runtime/package.json; npm network calls were blocked by the offline lab.
Next.js server with OAuth token-import endpoints info app/.next-cli-build/server/app/api/oauth/*/route.js
app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js, oauth/cursor/auto-import/route.js, oauth/kiro/auto-import/route.js, etc. provide user-initiated OAuth flows to import provider tokens from installed IDEs. These are interactive, user-triggered operations — not background credential theft.
MCP plugin bridge spawning child processes info app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js:6
app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js spawns external processes for MCP plugins (e.g. exa). Child process I/O is local; no remote code download observed.
Proxy tunnel management (cloudflared, tailscale) info app/.next-cli-build/server/app/api/tunnel/enable/route.js
Routes at api/tunnel/enable, api/tunnel/disable, api/proxy-pools/cloudflare-deploy spawn tunnel binaries and manage their PIDs in ~/.miawrouter/tunnel/*.pid. Local process management only.
Static analysis flags are expected for a bundled Next.js server info app/.next-cli-build/server/chunks/*
The 81 MB tarball includes a full Next.js production build (~1500 files). The high counts of code_execution, network_egress, credential_access, etc. come from the compiled server runtime (next/dist/compiled/*) and per-route bundles — normal for a Next.js app, not evidence of malicious behavior.
Install hooks ran in the isolated lab. Processes spawned: 4. Hooks: postinstall (exit 0).
Files written outside the package: /home/andy/.miawrouter/runtime/package.json