audit_dependency_tree
Map the full dependency tree of an npm package and identify CRITICAL supply chain risks at every level.
Unlike auditing a flat list of packages, this tool traverses the dependency graph — showing not just your direct dependencies but also what your dependencies depend on. Hidden CRITICAL packages (sole publisher + >10M weekly downloads) often lurk 1-2 levels deep.
Risk flags:
CRITICAL: single npm publisher + >10M weekly downloads — sole point of failure for a massive attack surface
HIGH: sole publisher + >1M/wk, OR new package (<1yr) with high adoption
WARN: no release in 12+ months (potential abandonware)
depth=1 (default): root package + all direct dependencies depth=2: also traverses one more level for any CRITICAL/HIGH direct deps (reveals hidden exposure)
Examples:
audit_dependency_tree("express") — see all of Express's deps and their risk scores
audit_dependency_tree("langchain", 2) — reveal transitive CRITICAL deps 2 levels deep
audit_dependency_tree("@anthropic-ai/sdk") — audit Anthropic SDK full tree
Use this when someone asks:
"What am I really depending on?"
"Are my dependencies' dependencies safe?"
"Show me the full supply chain risk for package X"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | How deep to traverse. 1 = direct deps only (fast). 2 = also traverse deps of CRITICAL/HIGH packages (slower, reveals hidden risk). Default: 1 | |
| package | Yes | npm package name to map. Examples: "express", "langchain", "@anthropic-ai/sdk", "zod" |