Trail of Bits' security review skill for PRs, commits, and diffs: risk-first analysis with git history, blast radius, and honest coverage limits.
Supply Chain Risk AuditorSkill
Summary
Audits npm, PyPI and Go dependencies for advisories, abandoned upstreams, publisher concentration and install-time scripts — measured by scripts, not estimated.
Features
- Version-matched advisories for direct dependencies and the whole resolved lockfile tree
- Flags abandoned and archived upstreams, npm publisher concentration, and install-time scripts
- npm, PyPI and Go; explicit about which lockfile formats it does and does not parse
- Deterministic collector scripts do every measurement — no estimated maintainer or download figures
- Unassessable data is reported as unassessable, never as risk; a run that measures nothing fails loudly
- Machine-readable findings.json backing every verdict in the rendered report
Install This Skill
Add this skill to your favorite AI agent in a few steps.
Skill Content
Usage Instructions
Learn how to use this skill with different AI agents.
Example Usage
Audit this service's dependencies before the engagement kicks off — flag anything with a known advisory or an abandoned upstream, and tell me whether we can build with --ignore-scripts.
Description
A dependency audit is a set of claims about other people's projects, and the usual way of producing one — asking an agent to look up maintainer counts, download figures and CVE history — produces claims that are confidently wrong. This skill from Trail of Bits was rebuilt around deterministic collector scripts after exactly that failure mode was measured: GitHub contributor counts reported five-plus maintainers for lodash where npm's ACL says one, and gh reported zero downloads for a package moving 164 million a week.
So the division of labour is explicit. Two scripts do every measurement; the agent supplies only the judgment the scripts refuse to automate.
What gets measured
- Version-matched advisories for direct dependencies and for the full tree the lockfile resolves
- Abandoned or archived upstreams
- npm publisher concentration — how few accounts can push a new version
- Install-time script execution, with a note on whether
npm ci --ignore-scriptsis viable for the project
Manifests parsed: package.json, pyproject.toml, requirements*.txt and go.mod. Lockfiles read for exact versions and the transitive sweep: package-lock.json, npm-shrinkwrap.json, uv.lock and a Go 1.17+ go.mod. yarn.lock, pnpm-lock.yaml and poetry.lock are not parsed, and the report says so when they are present rather than quietly falling back.
Two rules that make the output trustworthy
The collector enforces a distinction most dependency scanners blur. Unavailable data is never evidence of risk — every criterion resolves to assessed-clean, assessed-flagged, or unassessable-with-a-reason, so PyPI's absent maintainer ACL does not become a red mark. And an absent measurement is never a clean verdict — a run that measured nothing exits non-zero instead of printing a reassuring report that found nothing.
What the agent adds
On top of the rendered report: what to act on first and why, upgrade paths for advisory findings (is the fix a patch or a major version away), and replacement candidates for abandoned dependencies — each verified to exist in the registry and labelled as judgment rather than measurement. The skill also specifies the register for that prose, since audit text gets pasted into tickets verbatim: impersonal, declarative, active voice, no intensifiers, and recommendations that name an action and its cost rather than a culprit.
Practical notes
Authenticate gh before running — unauthenticated GitHub allows 60 requests/hour against 5,000, and the collector makes several per dependency, so repository criteria otherwise come back unassessable. Budget a few minutes for roughly 50 dependencies.
Related Skills
Skill: Zeroize Audit
by Trail of Bits
Finds secrets left in memory in C, C++ and Rust — including wipes the compiler deleted — and requires IR or assembly evidence before calling one optimized away.
Skill: Constant-Time Analysis
by Trail of Bits
Compiles cryptographic code and reads the emitted assembly for variable-time instructions, then triages which flagged operations actually touch secrets.
Skill: SAIL — Secure AI Lifecycle
by Pillar Security
Pillar Security's SAIL V2 framework as an agent skill: a 91-risk catalogue across seven lifecycle phases, for AI security gap assessments, roadmaps, and ISO 42001 / EU AI Act compliance checklists.