dependency_advisor
Audits GitHub repos, PRs, or uploaded manifests for unused, undeclared, deprecated, or vulnerable dependencies, returning verdict, risk score, fixes, and SARIF findings.
Instructions
Dependency Underuse & Replacement Advisor. Audits the dependencies of a public GitHub repo, commit or pull request (or uploaded manifests and sources) and returns a pass/warn/fail verdict, a 0-100 risk score, the top findings with manifest file:line and the fix, and a SARIF 2.1.0 log for GitHub code scanning. Parses JS/TS, Python and Rust imports with a tokenizer-level scanner and maps them to declared npm, PyPI and crates.io dependencies. Flags unused, dev-only, undeclared and trivially used packages; checks deps.dev, the npm registry and OSV for deprecation, advisories, staleness and OpenSSF Scorecard; matches a cited table of platform replacements (fetch, crypto.randomUUID, optional chaining) and ranks alternatives in code by Scorecard, recency, dependents, size and license compatibility. Reads repos through GitHub's API and falls back to the source archive when the API is rate limited; when some lookups still fail, it returns a signed partial result that lists what is missing. At most one optional model call maps used symbols to a replacement; deterministic mode makes none. Advisory data comes from OSV and deps.dev and can lag; findings are leads to verify, not a certification.
Cost: 1.00 USDC per call, paid automatically over x402 on Base when AGENT_PRIVATE_KEY is configured and the price is within MAX_USDC_PER_CALL.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Branch, tag or commit; defaults to the default branch. | |
| mode | No | deterministic makes no model call; auto makes at most one, only for symbols the curated table cannot decide. | |
| repo | No | Public GitHub repository: owner/repo, https://github.com/owner/repo[/tree/ref], a commit URL, or a pull request URL (analyzed at the PR head). | |
| files | No | Alternative to repo: manifests (package.json, lockfile, pyproject.toml, requirements.txt, Cargo.toml) and source files with repository-relative paths. | |
| ecosystems | No | Restrict the analysis; default all detected. | |
| repoLicense | No | SPDX id of the repository's license, for alternative ranking; detected from manifests or LICENSE when absent. |