T08 · Insecure Dependencies
- Location
scripts/setup-mcp.sh:18- Finding
Unpinned npm Package Persisted as an MCP Executable
- Content
View full analysis
/dev/null; then if [ "$SCOPE" = "user" ]; then claude mcp add --scope user aegis -- npx aegis-bridge mcp --port "$PORT" else claude mcp add --scope project aegis -- npx aegis-bridge mcp --port "$PORT" fi ``` The fallback configuration creates the same unpinned command: ```bash jq --arg port "$PORT" ' .mcpServers = (.mcpServers // {}) | .mcpServers.aegis = { "command": "npx", "args": ["aegis-bridge", "mcp", "--port", $port] } ' "$CONFIG_FILE" > "$TMP" && mv "$TMP" "$CONFIG_FILE" ``` ### Technical Analysis The setup script registers the bare npm package name `aegis-bridge` as an MCP executable through `npx`. It does not specify an exact package version, integrity hash, lockfile, verified registry, or trusted local installation path. The resulting command is stored in either the user-level Claude configuration or the project-level MCP configuration. Subsequent MCP launches can therefore resolve package content that was not included in, or reviewed as part of, this project. The effective executable may change when a new package release is published or if the package registry, publisher account, or dependency chain is compromised. Because an MCP server is a locally executed process, resolved package code runs with the privileges of the user launching Claude Code. This is materially more dangerous than using an unpinned library solely for build-time development. ### Attack Path 1. A user runs `scripts/setup-mcp.sh` with either user or project scope. 2. The script stores `npx aegis-bridge mcp --port ...` in Claude’s MCP configuration. 3. An attacker compromises the `aegis-bridge` npm package, its publisher account, registry resolution, or one of its tr ...[truncated 1179 chars]- Remediation
View remediation
