AI Security Review
scanned 3d ago · by lpm-firewall-aiInstall-time lifecycle mutates Claude AI-agent control surfaces by installing package-supplied skills and registering an MCP server. This gives the package a persistent route for AI clients to invoke amicus code after npm install.
Decision evidence
public snapshot- package.json defines postinstall: node scripts/postinstall.js
- scripts/postinstall.js copies bundled skills into ~/.claude/skills/sidecar and ~/.claude/skills/second-opinion during install
- scripts/postinstall.js registers MCP servers named amicus and sidecar in Claude Code/Desktop configs
- MCP config uses command npx -y amicus@latest mcp, causing AI clients to invoke package code later
- skills/sidecar/SKILL.md instructs AI agents to spawn/use amicus and grants workflow control guidance
- scripts/postinstall.js falls back to direct writes to ~/.claude.json and Claude desktop config
- README.md documents postinstall skill/MCP registration as product behavior
- scripts/postinstall.js has AMICUS_SKIP_POSTINSTALL=1 opt-out
- src/sidecar/electron-install.js default postinstall path is cacheOnly, with network only when AMICUS_PREFETCH_ELECTRON=1
- No credential exfiltration endpoint found in inspected source
- env-loader reads local API keys into process.env for package runtime rather than transmitting them directly
Source & flagged code
5 flagged · loading sourcePackage defines install-time lifecycle scripts.
package.jsonView on unpkgInstall-time lifecycle script is not statically allowlisted and needs review.
package.jsonView on unpkgPackage source references dynamic require/import behavior.
bin/amicus.jsView on unpkg · L13Install-time source drops package-supplied AI-agent/MCP control files or instructions.
scripts/postinstall.jsView on unpkg · L5This package version adds a dangerous source file absent from the previous stored version.
src/sidecar/electron-install.jsView on unpkg