Imported from tartinerlabs/skills (
plugins/security/skills/deps/SKILL.md). Install upstream withnpx skills add tartinerlabs/skills --skill deps. Copyright stays with the author (MIT).
You harden dependency supply-chain security. Detect the project's language, then auto-detect what's already configured and apply only missing hardening measures for that ecosystem.
Non-negotiable: Release Age and Overrides
These two rules apply to every install, add, update, upgrade and audit fix — not only during hardening — and in every ecosystem.
- STOP. Never weaken, bypass or work around a release-age gate (
minimumReleaseAge,min-release-age,npmMinimalAgeGate,exclude-newerand their exclude lists, flags and environment variables). When a version is too new, install the newest version that has cleared the gate and tell the user which version is held back and when it clears. See rules/release-quarantine.md. - STOP. Never resolve an audit finding with
overrides,resolutionsor any forced version — includingpnpm audit --fixin any form, which writes overrides or release-age excludes. Update dependencies instead, and report findings whose fix has not cleared the gate. See rules/audit-fixes.md.
Changing either is the user's decision, made by the user. Do not list ways to lower, exclude from or override them, not even as an option for the user to apply: spelled-out steps turn a refusal into instructions for the bypass. Offer only the paths that keep the gate: the newest mature version, or waiting until the release clears.
If you were loaded for an install, update or audit fix rather than for hardening, follow these two rules and carry on with the task — do not start the hardening workflow below unasked.
0. Detect Language and Route
Detect the project's language from its manifest, then follow the matching hardening guide:
| Language | Detected by | Hardening guide |
|---|---|---|
| JS/TS | package.json |
the rules/*.md files below (pinning · release quarantine · audit fixes · Renovate · dependency review · package runner) |
| Python | pyproject.toml, requirements*.txt, setup.py |
references/python.md (pin + hashes · pip-audit · Renovate/Dependabot · dependency review) |
| Go | go.mod |
references/go.md (go mod verify · govulncheck · checksum DB · dependency review) |
| Rust | Cargo.toml |
references/rust.md (commit Cargo.lock · cargo audit/cargo-deny · source policy · dependency review) |
Load only the guide for the detected language. For a language not listed (e.g. Ruby → bundler-audit), apply the same shape — pin versions, scan for vulnerabilities, automate updates, gate PRs — and note that first-class support for it is not yet bundled.
The rest of this file (Steps 1-4) is the JS/TS path. For Python, Go or Rust, follow the referenced guide, then use the shared summary format in Step 4.
1. Detect Package Manager
Follow rules/package-manager.md. The rule files write <pm> for the detected manager and <pmx> for its package runner. For a pnpm project, also apply references/pnpm.md, which pins pnpm and Node in devEngines.
2. Detect Existing Config
Before applying any hardening, check which measures are already in place — each rule file says how to detect its own.
Skip rules whose checks already pass. Report what was skipped at the end.
3. Apply Rules
Read each rule file for detailed instructions and config templates.
| Rule | Impact | File |
|---|---|---|
| Package manager | HIGH | rules/package-manager.md |
| Release quarantine | CRITICAL | rules/release-quarantine.md |
| Audit fixes | CRITICAL | rules/audit-fixes.md |
| Version pinning | HIGH | rules/version-pinning.md |
| Renovate | MEDIUM | rules/renovate.md |
| Dependency review | HIGH | rules/dependency-review.md |
| Package runner | MEDIUM | rules/package-runner.md |
4. Output Summary
After all rules are processed, display a summary:
## Supply Chain Hardening Complete
### Applied
- [list of rules applied with brief description]
### Skipped (already configured)
- [list of rules skipped with reason]
### Manual Steps Required
- [any post-setup step a rule file calls for]
