Preface¶
Third-party dependencies represent a real attack surface for most applications: known vulnerabilities in direct dependencies, transitive dependencies resolved from lock files, upstream repository archiving or stalled maintenance, high concentration of npm publishers, and scripts executed during the installation phase all constitute risks before you even “read the business code.” Manually checking registries or using gh to estimate maintainer counts or download volumes easily mixes data from different sources into a single conclusion—the official documentation mentions that before rebuilding this Skill, deviations occurred, such as “many GitHub contributors but only one person in the npm ACL” or “gh showing zero downloads while the registry side shows hundreds of millions per week.”
Below is an introduction to supply-chain-risk-auditor provided by Trail of Bits in the skills plugin marketplace: it generates supply chain risk reports based on project manifests and lock files, with data collected by deterministic scripts and judgments/narrations made by the Agent where scripts cannot automate.
What is this¶
supply-chain-risk-auditor is an Agent Skill loadable in environments like Claude Code / Codex (allowed-tools: Read, Write, Bash, Glob, Grep). It audits a project’s direct dependencies (npm, PyPI, Go) and performs advisory scans on the full dependency tree resolved from lock files; covering dimensions such as version-matched vulnerability advisories, upstream deprecation or archiving, npm publisher concentration, and installation-time script execution.
Produced by Trail of Bits, the Skill source code and instructions are located at:
https://github.com/trailofbits/skills/tree/main/plugins/supply-chain-risk-auditor/skills/supply-chain-risk-auditor
This Skill does not install, build, or execute the target project, nor does it read dependency package source code; it works solely based on manifests, lockfiles, and registry, advisory, and repository metadata.
Core Features¶
Scripted Collection, Agent Adjudication¶
Numbers in the report should come from collection scripts, not memory, casual gh queries, or web searches. The official documentation explicitly requires: do not self-estimate maintainer counts, download volumes, staleness, or CVE history—run the collector and cite its measurement results.
The scripts follow two rules:
- Unavailable data cannot be treated as risk evidence. The result for each criterion is: Assessed Clean, Assessed Concern, or Unassessable (with a reason).
- No “all green” conclusion can be given without measurement results. If a run measures nothing, the process exits with a non-zero status instead of printing a “zero findings” report.
Supported Ecosystems and Manifests¶
The target directory must contain one of the following; otherwise, explain and stop, do not manually audit unsupported ecosystems:
package.json(npm)pyproject.toml,requirements*.txt(PyPI)go.mod(Go)
Lock files used for precise version and transitive dependency scanning include: package-lock.json / npm-shrinkwrap.json, uv.lock, and go.mod (Go 1.17+). If yarn.lock, pnpm-lock.yaml, or poetry.lock exist, the report will state that these files were not read, and versions may fall back to pin or latest-release declaration methods—these will be marked separately in the report.
Report Readability Conventions¶
- Unassessable does not equal risk (e.g., when PyPI lacks maintainer ACLs or Go lacks a unified registry, some lines are simply “unable to determine”).
- The coverage table limits all conclusions. “No advisories” means “none within the assessed scope”; check the assessed count first.
- Numbers are transcribed directly from the report text; do not recalculate, round, or polish them.
- A dependency not appearing in findings only indicates it was not flagged under this Skill’s criteria, not an endorsement.
Installation and Enablement¶
The Skill is distributed via the Trail of Bits skills marketplace plugin; the plugin directory is plugins/supply-chain-risk-auditor/.
Claude Code:
/plugin marketplace add trailofbits/skills
/plugin menu
Select and install the corresponding plugin (including supply-chain-risk-auditor) from the menu.
Codex:
codex plugin marketplace add trailofbits/skills
codex plugin list
codex plugin add <plugin-name>@trailofbits
For local development, you can run /plugins marketplace add ./skills in the parent directory of the repository (refer to the official README for paths).
For Cursor, if loading the same marketplace via a mechanism compatible with the Claude plugin marketplace, refer to current product documentation for steps; this article only includes the commands mentioned above that appear in the official repository README.
Typical Usage¶
1. Confirm Target and GitHub Authentication¶
- Confirm the directory to be audited contains a supported manifest (see above).
- Run
gh auth status. Unauthenticated GitHub API access is approximately 60 requests/hour, while authenticated access is approximately 5000 requests/hour; the collector initiates multiple requests for each dependency. When unauthenticated, repository-related criteria may return a large number of unassessable results, which should be explained in the deliverables rather than silently ignored.
2. Collect and Render Report¶
It is recommended to place the output in a directory outside the audited repository (unless the user explicitly requests otherwise):
uv run {baseDir}/scripts/collect.py <project-dir> --json <out-dir>/findings.json
uv run {baseDir}/scripts/render.py <out-dir>/findings.json --out <out-dir>/report.md
{baseDir} is the skill root path under the Skill installation directory. For approximately 50 direct dependencies, a full collection may take several minutes (multiple HTTP requests per dependency; slower for many Go modules; slower without gh authentication).
If collect.py exits with a non-zero status, it means it refuses to generate a report—relay its error message verbatim, do not retry or bypass it without authorization.
3. Read Deliverables and Supplement Judgment¶
report.md: The main report for readers (facts rendered by scripts).findings.json: Structured data behind each conclusion, facilitating citation.
The Agent supplements content beyond script results, clearly distinguishing between “measurement” and “judgment”:
- Short narrative for readers: priorities and reasons.
- Upgrade paths corresponding to advisories (patch-level or major version jump).
- Alternative candidates for deprecated/archived dependencies (must verify existence in the registry and mark as judgment rather than measurement).
- Strategies for flagged installation scripts: whether the project can adopt strategies like
npm ci --ignore-scripts.
Supplementary text should adopt a security report style: state findings, basis in data, and recommended actions; avoid first/second person, exclamation marks, and subjective intensifiers; use past tense for describing audit actions, present tense for describing the current state of dependencies, and future tense for describing remediation consequences.
Applicable Scenarios and Notes¶
Suitable for:
- Quickly surveying advisories and metadata risks on the dependency tree before security assessments or code audits.
- Triggered when the user explicitly requests “audit dependencies,” “assess supply chain/third-party package risks,” or “review dependency tree before engagement” (consistent with the official
description).
Not suitable for or Out of Scope:
- License compliance auditing.
- Scanning the project’s own source code for vulnerabilities or secrets (this Skill does not read dependency source code).
- Judging whether a project can be successfully installed or built; broken installations and import-time errors are out of scope.
- Ecosystems other than npm / PyPI / Go: explain lack of support, do not improvise manual audits.
Common Misconceptions (Officially Opposed):
- Using
ghmaintainer counts to replace registry publishing permission perspectives. - Ignoring the coverage table and claiming “zero findings” means “dependencies are secure.”
- Deleting unassessable lines to make partial coverage look like a full pass.
- Mixing up the “scope checked by latest-release” with “versions resolved by lock file.”
Conclusion¶
supply-chain-risk-auditor hands the error-prone “data collection” part of supply chain auditing to collect.py / render.py, leaves prioritization, upgrades, and alternatives to the Agent, and distinguishes between assessed and unassessable in the report boundaries to reduce false positives and negatives. For installation and Skill instructions, see the Trail of Bits official repository:
https://github.com/trailofbits/skills/tree/main/plugins/supply-chain-risk-auditor/skills/supply-chain-risk-auditor