Skip to content

AAK-SUPPLY-001: MCP server package not pinned to exact version

Severity
MEDIUM
Category
Supply Chain (supply-chain)
Scanner
agent_audit_kit/scanners/supply_chain.py
Auto-fixable
No.
SARIF name
McpPackageNotPinned

What it detects

MCP server args contain package names without @x.y.z version pinning. Unpinned packages fetch latest at runtime, vulnerable to rug pull attacks.

How to fix

Pin to an exact version, for example npx -y some-mcp-server@1.4.2. The four npm reference servers (@modelcontextprotocol/server-filesystem, -memory, -everything and -sequential-thinking) left their date-based releases for semantic versioning in October 2026, so pin a SemVer release of them, never a 2025.x or 2026.x one. A launcher pin fixes only the top-level package; a lockfile install or an image digest fixes the whole tree. The launch arguments are part of what was reviewed too: mongodb-mcp-server serves different tools with and without --readOnly.

To confirm the finding is gone, report only this rule:

agent-audit-kit scan . --rules AAK-SUPPLY-001

Limitations

Reads the top-level mcpServers and servers maps of .mcp.json, .cursor/mcp.json, .vscode/mcp.json, .amazonq/mcp.json and mcp.json at the project root, comments and trailing commas included as VS Code allows them, for the launchers npx, uvx, bunx and pnpx, and reports each package spec that is not an exact version or a commit, a floating tag (@latest) or a range (@^1.0.0, >=1) included. A launcher outside those four is not read, whether another fetcher (pnpm dlx some-mcp-server) or npx behind a shell (cmd /c npx -y some-mcp-server), nor is a docker run image tagged latest. An MCP config over 1 MB is not read.

References


All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-SUPPLY-001.md: the page then shows that text, with the registry reference appended under it.