Skip to content
Supply Chain Risk Auditor

Supply Chain Risk AuditorSkill

Released
1 views
v2.0.2
CC BY-SA 4.0
Repository Docs

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.

Any AI agent

This skill is plain instructions — it works with any assistant that accepts custom instructions or system prompts.

  1. Copy the skill content with the button below.
  2. Paste it into your agent's instruction file or system prompt (for example AGENTS.md, .cursorrules, or a custom instructions field).
  3. Ask the agent to apply the skill whenever the task matches.

Skill Content

Markdown Content

Copy this content and use it with your preferred AI agent

---
name: supply-chain-risk-auditor
description: "Audits a project's dependencies for supply-chain risk: version-matched advisories for direct dependencies and the full lockfile tree, abandoned or archived upstreams, npm publisher concentration, and install-time script execution. Use when asked to audit dependencies, assess supply-chain or third-party package risk, or review a dependency tree before an engagement."
allowed-tools: Read Write Bash Glob Grep
---

# Supply Chain Risk Auditor

Generates a supply-chain risk report for a project's direct dependencies (npm, PyPI,
Go), plus an advisory sweep of everything its lockfile resolves. Two deterministic
scripts do the measuring; your job is the judgment they refuse to automate.

## Why the scripts do the measuring, not you

Every figure in this report is a claim about somebody else's project, and hand-collected
figures were measured wrong before this skill was rebuilt around scripts: GitHub
contributor counts said five-plus people maintain `lodash` where npm's ACL says one, and
`gh` saw zero downloads for a package that moves 164 million a week. Do not estimate
maintainer counts, downloads, staleness, or CVE history from `gh`, web search, or
memory — run the collector, and quote what it measured.

The scripts enforce two rules worth knowing before you read their output:

- **Unavailable data is never evidence of risk.** Every criterion resolves to
  assessed-clean, assessed-flagged, or unassessable-with-a-reason.
- **An absent measurement is never a clean verdict.** A run that measured nothing exits
  non-zero instead of printing a report that finds nothing.

## Workflow

1. Confirm the target directory has manifests: `package.json`, `pyproject.toml`,
   `requirements*.txt`, or `go.mod`. If none exist, say so and stop — do not audit an
   ecosystem this collector does not parse by hand. 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 read —
   the report says so when they are present, and versions fall back to pins or the
   latest release.
2. Check `gh auth status`. Unauthenticated GitHub allows 60 requests/hour against 5,000,
   and the collector makes several per dependency; expect repository criteria to come
   back unassessable without it. Say so rather than fixing it silently.
3. Collect, then render. Put outputs somewhere outside the audited repository unless
   asked otherwise:

   ```sh
   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
   ```

   Expect a few minutes for ~50 dependencies — several HTTP requests per dependency,
   more with many Go modules, and slower without authenticated `gh`. If `collect.py`
   exits non-zero, it is refusing to report — relay its message verbatim instead of
   retrying or working around it.
4. Read `report.md` and `findings.json`. The report is the deliverable; the JSON carries
   the datum behind every verdict when you need to cite one.
5. Add what the collector cannot, clearly separated from what it measured:
   - A short narrative for this reader: what to act on first, and why.
   - Upgrade paths for advisory findings — check whether the fix is a patch or a major
     version away.
   - Replacement candidates for abandoned or archived dependencies. Verify a candidate
     exists in the registry before naming it, and label these as judgment, not
     measurement.
   - For flagged install scripts: whether `npm ci --ignore-scripts` is viable for this
     project's build.

## Style for what you add

Write added prose the way a security report reads, and apply the same register to the
report addendum and the final reply alike — replies get pasted into tickets and reports
verbatim. State the finding, the datum behind it, and the action.

- Impersonal and declarative: no first or second person ("I ran the collector", "you
  should upgrade"), no contractions, no exclamation points.
- Active voice, with the subject matter as the actor: "upgrading to 1.19.0 clears all
  25 advisories", not "it is recommended that axios be upgraded".
- Objective: no intensifiers or subjective framing ("very", "significant",
  "fortunately"), and no guesses about why the project chose what it chose.
- Tense: past for what the audit did, present for the state of the dependencies,
  future for the consequences of acting or not.
- Constructive: a recommendation names the action and its cost, never a culprit.

If the `report-writing:writing-style` skill is available in the session, follow it —
it is the full version of this register.

The rendered report carries facts only. The interpretive rules below are instructions
to you, not content for the reader — do not copy them into the deliverable as caveats
or framing.

## Reading the report

- **Unassessable is not risk.** PyPI publishes no maintainer ACL and Go has no registry;
  those rows say what could not be known, not what is wrong.
- **The coverage table bounds every claim.** "No advisories" means "none among what was
  assessed" — check the assessed count before repeating a clean verdict.
- **Quote figures verbatim.** Do not re-derive, round, or embellish the report's
  numbers; every one is reproducible from the artifact.
- **Absence from the findings is not endorsement.** A dependency with no findings was
  measured against these criteria only.

## Rationalizations to reject

- "`gh` can give me maintainer counts faster than the collector." Measured wrong — repo
  contributors and registry publish rights are different populations.
- "No findings, so the dependencies are safe." Read the coverage table; on PyPI and Go,
  half the criteria are structurally unassessable.
- "The unassessable rows would just confuse the reader; I'll drop them." They are the
  boundary of every claim in the report. Dropping them turns partial coverage into a
  clean bill of health, which is the failure this skill was rebuilt to prevent.
- "The version is probably close enough." A range checked at latest-release and a
  lockfile-resolved version are different claims; the report labels which one it makes.
  Keep the label.

## When not to use

- License compliance auditing.
- Scanning the target's own source for vulnerabilities or secrets — this skill never
  reads dependency source, only registry, advisory, and repository metadata.
- Judging whether the project installs or builds. The audit is designed to work from
  nothing more than the dependency list — manifests and lockfiles — and never installs,
  builds, or executes anything. Broken installs and import-time breakage are out of
  scope, and worth saying so if the user seems to expect them.
- Ecosystems other than npm, PyPI, and Go; say the ecosystem is unsupported rather than
  improvising an audit for it.

Usage Instructions

Learn how to use this skill with different AI agents.

Claude Desktop
/plugin marketplace add trailofbits/skills
/plugin install supply-chain-risk-auditor@trailofbits

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-scripts is 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

New

Google's official skill for the gws CLI — drive Gmail, Drive, Calendar, Sheets, Docs, Chat and Admin APIs from an agent, with Model Armor screening.

2 views
New

Netlify's official skill for zero-config managed Postgres — querying from Functions, Drizzle setup, migrations and per-preview database branches.

2 views

Official WordPress skill for Gutenberg block work: block.json, attributes and serialization, dynamic rendering, and the deprecation path that keeps existing content valid.

2 views

Skill: claude-mem

by thedotmack

New

Persistent cross-session memory for coding agents: hooks capture each session, a local SQLite + vector store compresses it, and a mem-search skill reads it back.

1 views
Browse all skills →