/harness-claude:harness-supply-chain-auditfrom harness-claude
Evaluates npm dependency risk across 6 factors, surfacing flags for human review. Useful before releases, after adding dependencies, or during security audits.
Claude never picks this skill on its own
Its frontmatter has no description. Without a description, Claude Code leaves it out of the list Claude chooses from. Typing /harness-claude:harness-supply-chain-audit still runs it.
What the skill costs in Claude's context, stage by stage
No description Claude Code can read, so Claude's list leaves it out: only you can start it.
SKILL.md joins the conversation and stays.
6-factor dependency risk evaluation adapted from Trail of Bits security skill patterns. Surfaces dependency risk flags for human review — not automated verdicts.
on_milestone trigger fires (part of release gate)npm audit — this complements it with risk signals beyond CVEsPresent findings as flags for human review, never as verdicts. A dependency flagged as "high risk" may be entirely appropriate for a project. The skill surfaces signals; humans decide whether to act.
Resolve project root. Use the path argument or default to the current directory.
Detect lockfile. Check for the following in order:
package-lock.json (npm)pnpm-lock.yaml (pnpm)yarn.lock (yarn)npm install first." and stop.Parse direct dependencies from package.json:
dependencies and devDependencies{ name, version, isDev }Parse transitive depth from lockfile:
package-lock.json: read packages keys to extract the dependency tree. Nesting depth of node_modules/ segments in keys indicates transitive depth.pnpm-lock.yaml: read importers section for direct dependencies (keyed by workspace path, e.g., . for root). Each importer lists dependencies and devDependencies with version specifiers. Read packages section for resolved versions — keys are package identifiers (e.g., /@scope/[email protected]) with resolution (tarball URL + integrity hash) and dependencies sub-map for transitives.yarn.lock: parse block-format entries. Each block header is "pkg@version-range": followed by indented fields: version (resolved), resolved (tarball URL), integrity (hash), and dependencies sub-block listing transitive deps as "name" "version-range" pairs.Build inventory table:
INVENTORY: <project-name>
Direct dependencies: N
Dev dependencies: N
Total packages (including transitives): N
Deep transitive packages (depth > 5): N
Proceed to EVALUATE.
For each direct dependency (and any transitive with depth > 5), score on 6 factors:
Network access required: npm registry (
https://registry.npmjs.org/<pkg>) and GitHub API (https://api.github.com/repos/<owner>/<repo>).
- If npm registry returns 404: mark as "unresolvable", flag for manual review, skip remaining factors
- If GitHub API rate limits hit: score
maintenance-statusas "unknown", continue with other factors- If no GitHub repo link in package metadata: skip
maintenance-statusfactor, note in report
GET https://registry.npmjs.org/<pkg>maintainers array lengthtime field (last publish date) + GitHub API commit activityGET https://registry.npmjs.org/<pkg> → time.modifiedGET https://api.github.com/repos/<owner>/<repo>/commits?per_page=1 → latest commit dateGET https://api.npmjs.org/downloads/point/last-week/<pkg>node_modules/<pkg>/package.json (or lockfile-resolved path) → scripts fieldpreinstall, postinstall, install, preuninstall, postuninstallnpm audit --json or pnpm audit --jsonCombine factor scores into an overall risk level:
| Overall Risk | Condition |
|---|---|
| Critical | Factor 5 is Critical (any high/critical CVE) |
| High | 2+ factors scored High, OR Factor 1 is High + Factor 2 is High |
| Medium | 1 factor scored High, OR 3+ factors scored Medium |
| Low | All factors Low or at most 1 Medium |
Produce risk summary table sorted by overall risk (Critical first):
Supply Chain Audit: <project-name>
Date: <ISO date>
Packages evaluated: N direct + M deep transitives
┌─────────────────────┬──────────┬────────────┬─────────────┬────────────┬──────┬─────────────┐
│ Package │ Version │ Maintainers│ Last Publish│ Downloads │ CVEs │ Overall Risk│
├─────────────────────┼──────────┼────────────┼─────────────┼────────────┼──────┼─────────────┤
│ example-pkg │ 1.2.3 │ 1 (HIGH) │ 18mo (HIGH) │ 500 (MED) │ none │ HIGH │
│ another-pkg │ 2.0.0 │ 12 │ 2mo │ 50k │ 1 mod│ MEDIUM │
└─────────────────────┴──────────┴────────────┴─────────────┴────────────┴──────┴─────────────┘
Detail section for Critical and High risk packages:
HIGH RISK: [email protected]
├── Maintainer concentration: 1 maintainer (bus factor = 1)
├── Maintenance status: Last publish 18 months ago, no commits in 12 months
├── Popularity: 500 weekly downloads
├── Install scripts: none
├── Known CVEs: none
└── Transitive risk: depth 2, subtree 4 packages
Recommendation: Consider replacing with a well-maintained alternative,
or pin the version and monitor for abandonment.
Install script warnings (any package with install scripts):
INSTALL SCRIPTS DETECTED:
- [email protected]: postinstall — native addon compilation (likely legitimate)
- [email protected]: postinstall — review script contents before trusting
Summary line:
RESULT: 1 Critical, 2 High, 3 Medium, N Low — Review flagged items before release
Output: Print report to stdout. If --output <file> was passed, also write to that file.
harness validate — Run after creating the skill files to verify they are properly placed.on_milestone fires this skill as part of the milestone completion checklist.harness-security-scan — run after mechanical scanning to complete the security picture.--output. No state files written.When reporting findings, cite the source for each factor:
registry.npmjs.org/<pkg> → maintainers fieldregistry.npmjs.org/<pkg> → time.modifiedapi.npmjs.org/downloads/point/last-week/<pkg>node_modules/<pkg>/package.json → scriptsnpm audit --json outputDo not assert risk scores without citing the specific data point that generated the score.
/harness:supply-chain-audit on a project with dependencies outputs a risk table with all 6 factors scoredpostinstall script is flagged in the install scripts sectionThese are common rationalizations that sound reasonable but lead to incorrect results. When you catch yourself thinking any of these, stop and follow the documented process instead.
| Rationalization | Why It Is Wrong |
|---|---|
| "This package has high risk signals but it is widely used, so it must be safe" | The Iron Law: present findings as flags for human review, never as verdicts. Popularity does not eliminate bus-factor risk or maintenance abandonment. |
| "The npm API returned an error for this package, so I will skip it and move on" | API failures produce "unknown" scores with a note, not skips. Partial results with noted gaps are always better than incomplete audits. |
| "The install script is probably just native addon compilation, so I do not need to flag it" | Every install script must be flagged in the report. "Probably legitimate" is exactly the assumption that supply chain attacks exploit. |
Supply Chain Audit: my-project
Date: 2026-03-31
Packages evaluated: 24 direct + 3 deep transitives (depth > 5)
CRITICAL (1):
[email protected] — CVE-2021-23337 (high severity, unpatched)
HIGH (2):
[email protected] — sole maintainer, last publish 22 months ago
[email protected] — sole maintainer, postinstall script detected
MEDIUM (3):
[email protected] — 800 weekly downloads (low popularity signal)
...
LOW (18): no significant risk signals
INSTALL SCRIPTS:
[email protected] — postinstall (native compilation, likely legitimate)
[email protected] — postinstall (REVIEW: contents unknown)
RESULT: 1 Critical, 2 High, 3 Medium, 18 Low
Next steps: Update lodash to patch CVE. Review sketchy-helper postinstall script.
Consider alternatives to abandoned-util.
Supply Chain Audit: my-project
Date: 2026-03-31
Packages evaluated: 24 direct + 3 deep transitives (depth > 5)
CRITICAL (1):
[email protected] — CVE-2021-23337 (high severity, unpatched)
HIGH (2):
[email protected] — sole maintainer, last publish 22 months ago
[email protected] — sole maintainer, postinstall script detected
MEDIUM (3):
[email protected] — 800 weekly downloads (low popularity signal)
...
LOW (18): no significant risk signals
INSTALL SCRIPTS:
[email protected] — postinstall (native compilation, likely legitimate)
[email protected] — postinstall (REVIEW: contents unknown)
RESULT: 1 Critical, 2 High, 3 Medium, 18 Low
Next steps: Update lodash to patch CVE. Review sketchy-helper postinstall script.
Consider alternatives to abandoned-util.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
dependency-audit, supply-chain, risk-assessment, npm-security
npx claudepluginhub intense-visions/harness-engineering --plugin harness-claudeRead when SKILL.md points to them.
793 skills in this plugin
/a11y-aria-patternsARIA Patterns> Apply ARIA roles, states, and properties correctly to enhance assistive technology support for custom widgets/a11y-color-contrastColor Contrast and Color Independence> Ensure sufficient color contrast ratios and never use color as the sole means of conveying information/a11y-form-patternsAccessible Form Patterns> Build accessible forms with proper labeling, grouped controls, inline validation, and clear error communicationOther plugins' skills for the same job