关于
This skill audits a project's dependencies for supply-chain risks by running deterministic scripts that check for security advisories, abandoned upstreams, publisher concentration, and install-time scripts. Use it when you need to assess third-party package risk or review a dependency tree before an engagement. It automatically analyzes both direct dependencies and the full lockfile tree to generate a comprehensive risk report.
快速安装
Claude Code
推荐npx skills add trailofbits/skills -a claude-code/plugin add https://github.com/trailofbits/skillsgit clone https://github.com/trailofbits/skills.git ~/.claude/skills/supply-chain-risk-auditor在 Claude Code 中复制并粘贴此命令以安装该技能
技能文档
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, orgo.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, andpoetry.lockare 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.mdExpect a few minutes for ~50 dependencies — several HTTP requests per dependency, more with many Go modules, and slower without authenticated
gh. Ifcollect.pyexits non-zero, it is refusing to report — relay its message verbatim instead of retrying or working around it. -
Read
report.mdandfindings.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-scriptsis 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
- "
ghcan 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.
GitHub 仓库
常见问题
什么是 supply-chain-risk-auditor Skill?
supply-chain-risk-auditor 是一个 Claude Skill,作者为 trailofbits。Skill 将 Claude 按需加载的说明和资源打包,让 Claude 无需额外提示即可执行与 supply-chain-risk-auditor 相关的任务。
如何安装 supply-chain-risk-auditor?
使用本页的安装命令:将 supply-chain-risk-auditor 作为插件添加到 Claude Code,或将其仓库克隆到 skills 目录,然后重启 Claude 以加载该 Skill。
supply-chain-risk-auditor 属于哪个分类?
supply-chain-risk-auditor 属于设计分类。
supply-chain-risk-auditor 可以免费使用吗?
可以。supply-chain-risk-auditor 已收录在 AIMCP,可免费安装。
相关推荐技能
该Skill用于当开发者提供完整实施计划时,以受控批次方式执行代码实现。它会先审阅计划并提出疑问,然后分批次执行任务(默认每批3个任务),并在批次间暂停等待审查。关键特性包括分批次执行、内置检查点和架构师审查机制,确保复杂系统实现的可控性。
该Skill可在完成任务、实现主要功能或合并代码前自动调度代码审查子代理,确保实现符合需求和计划。它支持通过指定git SHA范围进行精准的代码变更审查,帮助开发者在关键节点及时发现潜在问题。核心原则是"早审查、勤审查",适用于开发流程的各个关键阶段。
这个Skill指导开发者如何将MCP服务器连接到Claude Code,支持HTTP、stdio和SSE三种传输协议。它涵盖了从安装配置到认证安全的完整流程,适用于集成GitHub、Notion、数据库等外部服务。当开发者需要添加集成、配置外部工具或提及MCP相关功能时,这个Skill能提供实用的操作指南。
该Skill帮助开发者根据任务特性选择Claude Code的Web或CLI界面,并指导如何在两种环境间无缝迁移会话。它能分析任务复杂度、迭代需求等要素,推荐最优工作界面和工作流。关键特性包括会话状态管理、环境切换指导和上下文优化建议。
