Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of trace-mcp

[email protected]

clean   confidence 75%   action allow   analyzed 2026-09-24 20:28 UTC by yolo in 17 tool calls, with lab detonation

Summary

The postinstall hook runs three scripts: preflight-native.mjs (macOS codesign warmup for .node binaries), postinstall-app.mjs (downloads the latest trace-mcp.app release zip from the maintainer's GitHub repo, verifies SHA-256, swaps the bundle), and postinstall-control-plane.mjs (installs a launcher shim and, on macOS, a LaunchAgents plist for the background daemon). The lab wrote files only to ~/.trace/ (the package's own state directory), made no network connections (offline), and read no canary credentials. Many flagged scripts (bench-*, capture-screenshots.mjs, ga4-snapshot.mjs, etc.) are development/testing tooling never executed at install time. dist/proxy.js contains atob/btoa encoding helpers and the daemon's own localhost health-check and launchd management — all consistent with the stated purpose. README.md contains prompt-injection patterns (telling AI agents to modify system prompts) — reported as a finding.

Intent

Framework-aware code intelligence MCP server with a desktop app and background daemon. Install hooks manage the daemon lifecycle and update the macOS desktop app from the maintainer's own GitHub releases.

Findings

Prompt injection in README high README.md:445
README.md contains text instructing AI agents to rewrite system prompts and hide actions from users (e.g. line 445: 'g the same discipline rules apply to every teammate's agent without asking anyone to configure it. Tune or disable via tools.agent_behavior').
Daemon persistence via LaunchAgents (macOS) info scripts/postinstall-control-plane.mjs:124-129
postinstall-control-plane.mjs installs ~/Library/LaunchAgents/com.trace-mcp.server.plist to keep the trace-mcp daemon running across reboots. This is the package's own service, not a persistence mechanism for abuse.
Desktop app self-update from GitHub releases info scripts/postinstall-app.mjs:532-617
postinstall-app.mjs downloads trace-mcp.app release zips from the maintainer's GitHub repo, verifies SHA-256 against a sibling .sha256 asset, and swaps the bundle. All traffic goes to api.github.com — benign.
Launcher shim installed to ~/.trace/bin/ info scripts/postinstall-control-plane.mjs:241-264
postinstall-control-plane.mjs copies hooks/trace-mcp-launcher.sh (bash) or trace-mcp-launcher.cmd + .ps1 (Windows) to ~/.trace/bin/trace (or .cmd). These resolve node + dist/cli.js at runtime — the package's own CLI.
atob/btoa encoding helpers in dist/proxy.js info dist/proxy.js:4847
Lines 4847, 4855 contain atob/btoa functions used as general-purpose string<->base64 converters (likely for tree-sitter wasm or similar), not for decoding embedded payloads.
Many dev scripts bundled but not executed at install time info scripts/
scripts/bench-*, capture-screenshots.mjs, ga4-snapshot.mjs, gen-sitemap.mjs, etc. are development/testing scripts with network_egress, credential_harvest, or code_execution tags — but none are invoked by the postinstall hook chain.

Lab evidence

Install hooks ran in the isolated lab. Processes spawned: 11. Hooks: postinstall (exit 0), prepare (exit 127), require (exit 0).

Files written outside the package: /home/andy/.trace/postinstall.log, /home/andy/.trace/launcher.env.tmp.77.4836cc4c41fa, /home/andy/.trace/launcher.env, /home/andy/.trace/bin/trace.tmp.77.fe6d6d2383a9, /home/andy/.trace/bin/trace, /home/andy/.trace/bin/trace (chmod 0755)