Skip to content

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


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.