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.05---67## Overview89Audits 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.1011## When to Use This Skill1213- Before merging a PR that updates or adds dependencies.14- As part of release preparation.15- Regularly (weekly or per sprint) as hygiene.16- After a high-profile supply chain attack (log4shell, etc.).1718## Prerequisites1920- The project's lockfile(s) and manifest(s) (package-lock.json, yarn.lock, poetry.lock, Cargo.lock, etc.).21- Access to vulnerability databases (tools query them).2223## Steps24251. **Vulnerability scanning**:26 - Node: `npm audit` (or `pnpm audit`, `yarn audit`).27 - Python: `pip-audit` or `safety`.28 - Go: `go list -m -json all | nancy sleuth` or `govulncheck`.29 - Rust: `cargo audit`.30 - General: Snyk, Dependabot alerts, GitHub Dependabot.31322. **License auditing**:33 - `license-checker --production --onlyAllow "MIT;Apache-2.0;BSD"` (Node).34 - `pip-licenses --allow-only="MIT;Apache-2.0"` (Python).35 - FOSSA or Snyk License for larger orgs.36373. **Supply chain signals**:38 - Maintainer count, last publish date, download count, provenance (sigstore, etc.).39 - Tools like `socket.dev` or `deps.dev` give risk scores.40 - Check for typosquatting (similar names to popular packages).41424. **Pinning & ranges**:43 - Prefer exact pins in lockfiles (they are).44 - In manifests: use `^` / `~` carefully; document policy (e.g., "patch and minor auto, major manual").45 - For critical security deps, pin more tightly.46475. **Automation**:48 - Dependabot or Renovate for automated PRs (group updates, auto-merge for patch/minor after CI).49 - Require security review for major or high-risk updates.50516. **Weekly review workflow**:52 - Review open Dependabot PRs.53 - Run full audit.54 - Prioritize by severity + reachability.55 - Update + test + merge (or defer with justification).56577. **Output**:58 - Exact audit commands for the languages in the project.59 - Sample report interpretation.60 - Recommended Dependabot / Renovate config.61 - License allow-list policy.62 - Dependency review checklist for PRs.6364## Examples6566A 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.6768## Edge Cases & Error Handling6970- **Transitive vulnerabilities**: Most tools surface them; focus effort on direct deps you can actually change.71- **No patch available**: Use mitigation (e.g., network controls, input sanitization) + monitor for fix.72- **License conflicts**: Legal review for copyleft in certain contexts.7374## Verification75761. Full audit runs cleanly or with only accepted/low findings.772. License check passes against the allow-list.783. Dependabot/Renovate is configured and creating PRs.794. A known vulnerable dependency (intentionally added) is detected and a fix PR is opened.805. Success: The project has a repeatable process that keeps dependencies reasonably current and free of critical known vulnerabilities and problematic licenses.8182## References8384- [npm audit](https://docs.npmjs.com/cli/v8/commands/npm-audit)85- [pip-audit](https://pypi.org/project/pip-audit/)86- [Dependabot](https://docs.github.com/en/code-security/dependabot)87- [Renovate](https://docs.renovatebot.com/)88- [FOSSA](https://fossa.com/)89- [Socket.dev](https://socket.dev/)90- [deps.dev](https://deps.dev/)