Overview
Audits third-party dependencies for vulnerabilities (SCA), problematic licenses, and supply chain risk indicators. Covers npm audit, pip-audit, cargo audit, license checkers (FOSSA, license-checker, pip-licenses), dependency graph analysis, Dependabot/Renovate setup, pinning vs ranges, and a weekly dependency review workflow.
When to Use This Skill
- Before merging a PR that updates or adds dependencies.
- As part of release preparation.
- Regularly (weekly or per sprint) as hygiene.
- After a high-profile supply chain attack (log4shell, etc.).
Prerequisites
- The project's lockfile(s) and manifest(s) (package-lock.json, yarn.lock, poetry.lock, Cargo.lock, etc.).
- Access to vulnerability databases (tools query them).
Steps
Vulnerability scanning:
- Node:
npm audit (or pnpm audit, yarn audit).
- Python:
pip-audit or safety.
- Go:
go list -m -json all | nancy sleuth or govulncheck.
- Rust:
cargo audit.
- General: Snyk, Dependabot alerts, GitHub Dependabot.
License auditing:
license-checker --production --onlyAllow "MIT;Apache-2.0;BSD" (Node).
pip-licenses --allow-only="MIT;Apache-2.0" (Python).
- FOSSA or Snyk License for larger orgs.
Supply chain signals:
- Maintainer count, last publish date, download count, provenance (sigstore, etc.).
- Tools like
socket.dev or deps.dev give risk scores.
- Check for typosquatting (similar names to popular packages).
Pinning & ranges:
- Prefer exact pins in lockfiles (they are).
- In manifests: use
^ / ~ carefully; document policy (e.g., "patch and minor auto, major manual").
- For critical security deps, pin more tightly.
Automation:
- Dependabot or Renovate for automated PRs (group updates, auto-merge for patch/minor after CI).
- Require security review for major or high-risk updates.
Weekly review workflow:
- Review open Dependabot PRs.
- Run full audit.
- Prioritize by severity + reachability.
- Update + test + merge (or defer with justification).
Output:
- Exact audit commands for the languages in the project.
- Sample report interpretation.
- Recommended Dependabot / Renovate config.
- License allow-list policy.
- Dependency review checklist for PRs.
Examples
A complete weekly dependency review process for a Node + Python monorepo, including audit commands, a sample Dependabot config that groups security updates, license policy, and a PR template for dependency updates is included.
Edge Cases & Error Handling
- Transitive vulnerabilities: Most tools surface them; focus effort on direct deps you can actually change.
- No patch available: Use mitigation (e.g., network controls, input sanitization) + monitor for fix.
- License conflicts: Legal review for copyleft in certain contexts.
Verification
- Full audit runs cleanly or with only accepted/low findings.
- License check passes against the allow-list.
- Dependabot/Renovate is configured and creating PRs.
- A known vulnerable dependency (intentionally added) is detected and a fix PR is opened.
- Success: The project has a repeatable process that keeps dependencies reasonably current and free of critical known vulnerabilities and problematic licenses.
References
1---2name: dependency-checker3description: Audits third-party dependencies for known vulnerabilities, license issues, and supply chain risks. Use when reviewing dependencies before merging or deploying.4license: Apache-2.05compatibility: Claude Code, Codex, Gemini CLI6metadata:7 author: ai-skills8 version: "1.0"9 category: security10 tags: dependencies, supply-chain, npm-audit, pip-audit, license, dependabot, fossa11---1213## Overview1415Audits third-party dependencies for vulnerabilities (SCA), problematic licenses, and supply chain risk indicators. Covers `npm audit`, `pip-audit`, `cargo audit`, license checkers (FOSSA, license-checker, `pip-licenses`), dependency graph analysis, Dependabot/Renovate setup, pinning vs ranges, and a weekly dependency review workflow.1617## When to Use This Skill1819- Before merging a PR that updates or adds dependencies.20- As part of release preparation.21- Regularly (weekly or per sprint) as hygiene.22- After a high-profile supply chain attack (log4shell, etc.).2324## Prerequisites2526- The project's lockfile(s) and manifest(s) (package-lock.json, yarn.lock, poetry.lock, Cargo.lock, etc.).27- Access to vulnerability databases (tools query them).2829## Steps30311. **Vulnerability scanning**:32 - Node: `npm audit` (or `pnpm audit`, `yarn audit`).33 - Python: `pip-audit` or `safety`.34 - Go: `go list -m -json all | nancy sleuth` or `govulncheck`.35 - Rust: `cargo audit`.36 - General: Snyk, Dependabot alerts, GitHub Dependabot.37382. **License auditing**:39 - `license-checker --production --onlyAllow "MIT;Apache-2.0;BSD"` (Node).40 - `pip-licenses --allow-only="MIT;Apache-2.0"` (Python).41 - FOSSA or Snyk License for larger orgs.42433. **Supply chain signals**:44 - Maintainer count, last publish date, download count, provenance (sigstore, etc.).45 - Tools like `socket.dev` or `deps.dev` give risk scores.46 - Check for typosquatting (similar names to popular packages).47484. **Pinning & ranges**:49 - Prefer exact pins in lockfiles (they are).50 - In manifests: use `^` / `~` carefully; document policy (e.g., "patch and minor auto, major manual").51 - For critical security deps, pin more tightly.52535. **Automation**:54 - Dependabot or Renovate for automated PRs (group updates, auto-merge for patch/minor after CI).55 - Require security review for major or high-risk updates.56576. **Weekly review workflow**:58 - Review open Dependabot PRs.59 - Run full audit.60 - Prioritize by severity + reachability.61 - Update + test + merge (or defer with justification).62637. **Output**:64 - Exact audit commands for the languages in the project.65 - Sample report interpretation.66 - Recommended Dependabot / Renovate config.67 - License allow-list policy.68 - Dependency review checklist for PRs.6970## Examples7172A complete weekly dependency review process for a Node + Python monorepo, including audit commands, a sample Dependabot config that groups security updates, license policy, and a PR template for dependency updates is included.7374## Edge Cases & Error Handling7576- **Transitive vulnerabilities**: Most tools surface them; focus effort on direct deps you can actually change.77- **No patch available**: Use mitigation (e.g., network controls, input sanitization) + monitor for fix.78- **License conflicts**: Legal review for copyleft in certain contexts.7980## Verification81821. Full audit runs cleanly or with only accepted/low findings.832. License check passes against the allow-list.843. Dependabot/Renovate is configured and creating PRs.854. A known vulnerable dependency (intentionally added) is detected and a fix PR is opened.865. Success: The project has a repeatable process that keeps dependencies reasonably current and free of critical known vulnerabilities and problematic licenses.8788## References8990- [npm audit](https://docs.npmjs.com/cli/v8/commands/npm-audit)91- [pip-audit](https://pypi.org/project/pip-audit/)92- [Dependabot](https://docs.github.com/en/code-security/dependabot)93- [Renovate](https://docs.renovatebot.com/)94- [FOSSA](https://fossa.com/)95- [Socket.dev](https://socket.dev/)96- [deps.dev](https://deps.dev/)