Attribution: Sourced from trailofbits/skills by Trail of Bits, licensed CC BY-SA 4.0. Modified for this collection.
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
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.
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.
Collect, then render. Put outputs somewhere outside the audited repository unless
asked 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
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.
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.
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.
1---2name: supply-chain-risk-auditor3description: "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."4allowed-tools: Read Write Bash Glob Grep5license: CC-BY-SA-4.06source: "https://github.com/trailofbits/skills"7attribution: "trailofbits/skills by Trail of Bits"8version: "1.0.0"9metadata:10 source: https://skillmd.com/skills/mouadja02/supply-chain-risk-auditor11---1213> **Attribution:** Sourced from [trailofbits/skills](https://github.com/trailofbits/skills) by [Trail of Bits](https://www.trailofbits.com), licensed CC BY-SA 4.0. Modified for this collection.1415# Supply Chain Risk Auditor1617Generates a supply-chain risk report for a project's direct dependencies (npm, PyPI,18Go), plus an advisory sweep of everything its lockfile resolves. Two deterministic19scripts do the measuring; your job is the judgment they refuse to automate.2021## Why the scripts do the measuring, not you2223Every figure in this report is a claim about somebody else's project, and hand-collected24figures were measured wrong before this skill was rebuilt around scripts: GitHub25contributor counts said five-plus people maintain `lodash` where npm's ACL says one, and26`gh` saw zero downloads for a package that moves 164 million a week. Do not estimate27maintainer counts, downloads, staleness, or CVE history from `gh`, web search, or28memory — run the collector, and quote what it measured.2930The scripts enforce two rules worth knowing before you read their output:3132- **Unavailable data is never evidence of risk.** Every criterion resolves to33 assessed-clean, assessed-flagged, or unassessable-with-a-reason.34- **An absent measurement is never a clean verdict.** A run that measured nothing exits35 non-zero instead of printing a report that finds nothing.3637## Workflow38391. Confirm the target directory has manifests: `package.json`, `pyproject.toml`,40 `requirements*.txt`, or `go.mod`. If none exist, say so and stop — do not audit an41 ecosystem this collector does not parse by hand. Lockfiles read for exact versions42 and the transitive sweep: `package-lock.json`/`npm-shrinkwrap.json`, `uv.lock`, and43 a go 1.17+ `go.mod`. `yarn.lock`, `pnpm-lock.yaml`, and `poetry.lock` are not read —44 the report says so when they are present, and versions fall back to pins or the45 latest release.462. Check `gh auth status`. Unauthenticated GitHub allows 60 requests/hour against 5,000,47 and the collector makes several per dependency; expect repository criteria to come48 back unassessable without it. Say so rather than fixing it silently.493. Collect, then render. Put outputs somewhere outside the audited repository unless50 asked otherwise:5152 ```sh53 uv run {baseDir}/scripts/collect.py <project-dir> --json <out-dir>/findings.json54 uv run {baseDir}/scripts/render.py <out-dir>/findings.json --out <out-dir>/report.md55 ```5657 Expect a few minutes for ~50 dependencies — several HTTP requests per dependency,58 more with many Go modules, and slower without authenticated `gh`. If `collect.py`59 exits non-zero, it is refusing to report — relay its message verbatim instead of60 retrying or working around it.614. Read `report.md` and `findings.json`. The report is the deliverable; the JSON carries62 the datum behind every verdict when you need to cite one.635. Add what the collector cannot, clearly separated from what it measured:64 - A short narrative for this reader: what to act on first, and why.65 - Upgrade paths for advisory findings — check whether the fix is a patch or a major66 version away.67 - Replacement candidates for abandoned or archived dependencies. Verify a candidate68 exists in the registry before naming it, and label these as judgment, not69 measurement.70 - For flagged install scripts: whether `npm ci --ignore-scripts` is viable for this71 project's build.7273## Style for what you add7475Write added prose the way a security report reads, and apply the same register to the76report addendum and the final reply alike — replies get pasted into tickets and reports77verbatim. State the finding, the datum behind it, and the action.7879- Impersonal and declarative: no first or second person ("I ran the collector", "you80 should upgrade"), no contractions, no exclamation points.81- Active voice, with the subject matter as the actor: "upgrading to 1.19.0 clears all82 25 advisories", not "it is recommended that axios be upgraded".83- Objective: no intensifiers or subjective framing ("very", "significant",84 "fortunately"), and no guesses about why the project chose what it chose.85- Tense: past for what the audit did, present for the state of the dependencies,86 future for the consequences of acting or not.87- Constructive: a recommendation names the action and its cost, never a culprit.8889If the `report-writing:writing-style` skill is available in the session, follow it —90it is the full version of this register.9192The rendered report carries facts only. The interpretive rules below are instructions93to you, not content for the reader — do not copy them into the deliverable as caveats94or framing.9596## Reading the report9798- **Unassessable is not risk.** PyPI publishes no maintainer ACL and Go has no registry;99 those rows say what could not be known, not what is wrong.100- **The coverage table bounds every claim.** "No advisories" means "none among what was101 assessed" — check the assessed count before repeating a clean verdict.102- **Quote figures verbatim.** Do not re-derive, round, or embellish the report's103 numbers; every one is reproducible from the artifact.104- **Absence from the findings is not endorsement.** A dependency with no findings was105 measured against these criteria only.106107## Rationalizations to reject108109- "`gh` can give me maintainer counts faster than the collector." Measured wrong — repo110 contributors and registry publish rights are different populations.111- "No findings, so the dependencies are safe." Read the coverage table; on PyPI and Go,112 half the criteria are structurally unassessable.113- "The unassessable rows would just confuse the reader; I'll drop them." They are the114 boundary of every claim in the report. Dropping them turns partial coverage into a115 clean bill of health, which is the failure this skill was rebuilt to prevent.116- "The version is probably close enough." A range checked at latest-release and a117 lockfile-resolved version are different claims; the report labels which one it makes.118 Keep the label.119120## When not to use121122- License compliance auditing.123- Scanning the target's own source for vulnerabilities or secrets — this skill never124 reads dependency source, only registry, advisory, and repository metadata.125- Judging whether the project installs or builds. The audit is designed to work from126 nothing more than the dependency list — manifests and lockfiles — and never installs,127 builds, or executes anything. Broken installs and import-time breakage are out of128 scope, and worth saying so if the user seems to expect them.129- Ecosystems other than npm, PyPI, and Go; say the ecosystem is unsupported rather than130 improvising an audit for it.