Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of polyrouter

[email protected]

clean   confidence 85%   action allow   analyzed 2026-09-24 17:31 UTC by yolo in 13 tool calls, with lab detonation

Summary

Install hook node hooks/postinstall.js calls ensureSqliteRuntime() and ensureTrayRuntime(), which run `npm install` for sql.js and better-sqlite3 into ~/.polyrouter/runtime/ — a standard pattern to avoid Windows EBUSY locks on native modules. The canary credential read (/home/andy/.gitconfig) was by npm itself during dependency resolution, not by polyrouter code. The bundled Next.js app (app/.next-cli-build/) is the local gateway dashboard; its API routes manage AI tool configs at runtime, consistent with the stated purpose.

Intent

Local AI gateway and OpenAI-compatible API router. The install hook warms up native runtime dependencies (sqlite, systray) into ~/.polyrouter/runtime. The runtime server manages AI coding tool configs (e.g. ~/.claude/settings.json) as part of its gateway function.

Findings

Runtime dependency warm-up via npm install info hooks/postinstall.js:6-7
hooks/postinstall.js calls ensureSqliteRuntime() which runs `npm install [email protected] [email protected]` into ~/.polyrouter/runtime/node_modules. This is a best-effort speed optimization; the app falls back gracefully if it fails.
Canary credential read by npm, not package info hooks/sqliteRuntime.js:78-88
Lab report shows /home/andy/.gitconfig was read, but this occurred during npm's own dependency resolution (npm reads .gitconfig for credential configuration). Not attributable to polyrouter code.
Registry DNS resolution expected info hooks/sqliteRuntime.js:78-88
Lab DNS resolution to registry.npmjs.org is from npm itself installing runtime deps. Expected and benign.

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/.gitconfig

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