AAK-SUPPLY-005: Dependency count exceeds threshold
- Severity
- LOW
- Category
- Supply Chain (
supply-chain) - Scanner
agent_audit_kit/scanners/supply_chain.py- Auto-fixable
- No.
- SARIF name
ExcessiveDependencyCount
What it detects
More than 200 direct + transitive dependencies in lockfile. Each dependency is a trust decision.
How to fix
Remove unused dependencies, or swap heavy ones for lighter ones, until the lockfile lists 200 or fewer dependencies. The rule counts every package package-lock.json installs under node_modules and every crate Cargo.lock takes from a registry or a git repository, transitive dependencies included. The project's own packages (the root, workspace members, path crates) are not counted.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-SUPPLY-005
Limitations
Counts the packages the root package-lock.json installs under node_modules and the crates of the root Cargo.lock that have a source, and reports more than 200. A lockfileVersion 1 package-lock.json is counted by its top-level dependencies only, so a package nested under another is not counted. A uv.lock or yarn.lock of any size and a package-lock.json in a sub-directory are not counted. A lockfile over 32 MiB is not counted.
References
- OWASP MCP Top 10: MCP04:2025 (Software Supply Chain Attacks & Dependency Tampering)
- OWASP Agentic Top 10: ASI04 (Agentic Supply Chain Vulnerabilities)
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-SUPPLY-07 (Excessive Dependencies)
- CSA AI Controls Matrix (AICM): STA-08
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-005.md: the page then shows that text, with the registry reference appended under it.