Analyze transitive dependencies for vulnerabilities
analyze_transitive_dependenciesRecursively resolves one or more direct/root packages' dependency graphs — e.g. the "dependencies" section of a package.json — up to maxDepth levels deep (default 2, max 3) and batch-checks every resolved package@version against OSV.dev, so vulnerabilities buried several levels down (which would never show up from checking direct dependencies alone) still surface. summary is a one-sentence, deterministic recap (packages scanned, unresolved count, vulnerable count and which roots pulled them in) — read it first. The vulnerablePaths field directly answers "which of my dependencies pulled this in" by naming the root package(s) responsible for each vulnerable transitive package; nodes has the full resolved graph (depth, parents, resolutionError) for deeper inspection. Scope/limits worth knowing before trusting a "clean" result: only the "dependencies" field is followed (not devDependencies/peerDependencies/optionalDependencies); each range is resolved independently per branch via semver max-satisfying against published versions — this does NOT emulate npm/yarn's actual node_modules hoisting/dedup, so read results as "which vulnerable versions are reachable in the graph," not the exact installed layout; git/file/workspace/URL/npm-alias dependencies aren't resolvable from the registry and show up with a resolutionError instead of being silently skipped; and the whole traversal is capped at a total node budget — check truncated/truncationNote rather than assuming a large graph was scanned exhaustively. Prefer batch_query_vulnerabilities instead when you only need to check exact packages you already have a flat list for (faster, no graph walk).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| maxDepth | No | How many levels of transitive dependencies to expand beyond the given root packages (0 = only check the roots themselves). Default 2, capped at 3 to bound registry calls and stay within the request timeout. | |
| packages | Yes | 1-15 direct/root packages to expand from, e.g. a package.json's "dependencies". version accepts an exact version or a semver range like "^4.17.21"; omitted = latest. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodes | Yes | ||
| roots | Yes | ||
| summary | Yes | ||
| maxDepth | Yes | ||
| truncated | Yes | ||
| enrichmentNote | Yes | ||
| truncationNote | Yes | ||
| unresolvedCount | Yes | ||
| vulnerablePaths | Yes | ||
| totalPackagesScanned | Yes | ||
| totalVulnerabilities | Yes | ||
| vulnerablePackageCount | Yes |