Reviews package dependencies for security vulnerabilities, outdated versions, and license compliance. Use when user asks about dependencies, security audits, or before releases.
This skill helps audit project dependencies for security vulnerabilities, outdated packages, and license compliance issues.
Identify which package manager(s) the project uses:
JavaScript/Node.js:
package.json + package-lock.jsonpackage.json + yarn.lockpackage.json + pnpm-lock.yamlPython:
requirements.txt or setup.pypyproject.toml + poetry.lockPipfile + Pipfile.lockRuby:
Gemfile + Gemfile.lockJava:
pom.xmlbuild.gradle or build.gradle.ktsGo:
go.mod + go.sumRust:
Cargo.toml + Cargo.lockPHP:
composer.json + composer.lockUse Glob to find these files.
Execute the appropriate audit command based on package manager:
npm: npm audit --json or npm audit
Yarn: yarn audit --json or yarn audit
pnpm: pnpm audit --json
pip: pip-audit or safety check
Poetry: poetry check
Bundler: bundle audit check --update
Maven: mvn dependency:tree + OWASP Dependency Check
Go: go list -m all + govulncheck
Cargo: cargo audit
Composer: composer audit
Parse the output to identify:
Identify packages that have newer versions available:
npm: npm outdated --json
Yarn: yarn outdated --json
pip: pip list --outdated
Poetry: poetry show --outdated
Bundler: bundle outdated
Cargo: cargo outdated
Go: go list -u -m all
Categorize updates:
Review licenses of all dependencies:
Steps:
reference/licenses.mdTools:
npx license-checker --json or npm-license-crawlerpip-licenseslicense_findergo-licensesLicense categories:
Understand the dependency structure:
Direct vs Transitive:
Identify issues:
Commands:
npm ls --allyarn why <package>pipdeptreemvn dependency:treePrioritize vulnerabilities based on:
Severity levels:
Exploitability:
Exposure:
For each issue found, provide:
Vulnerabilities:
Package: [email protected]
Severity: High
CVE: CVE-2020-8203
Issue: Prototype pollution
Recommendation: Upgrade to [email protected] or higher
Command: npm install [email protected]
Outdated packages:
Package: [email protected]
Current: 16.14.0
Latest: 18.2.0
Type: Major update
Recommendation: Test thoroughly before upgrading (breaking changes)
Notes: Review migration guide at https://react.dev/blog/2022/03/08/react-18-upgrade-guide
License issues:
Package: [email protected]
License: GPL-3.0
Issue: GPL license may conflict with proprietary code
Recommendation: Find alternative with permissive license or consult legal
Alternatives: [list of similar packages with MIT/Apache licenses]
Suggest an update approach:
Safe updates (automated):
npm update or npm audit fixCareful updates (manual testing):
Research needed:
Provide a comprehensive audit summary:
Dependency Audit Report
=======================
Overview:
- Total dependencies: 150 (120 direct, 30 transitive)
- Vulnerabilities: 5 (1 high, 3 moderate, 1 low)
- Outdated packages: 23
- License issues: 2
Security Vulnerabilities:
[List by severity with fix recommendations]
Outdated Packages:
[Categorized by update type: patch/minor/major]
License Compliance:
[List of licenses with any concerns]
Recommended Actions:
1. [Immediate] Fix high-severity vulnerabilities
2. [Soon] Update packages with moderate vulnerabilities
3. [Review] Address license compliance issues
4. [Optional] Update outdated packages to latest
Commands to run:
npm audit fix # Fix vulnerabilities automatically
npm update # Update to latest compatible versions
Suggest ongoing practices:
scripts/check-licenses.sh: Extract and check license informationreference/licenses.md: License compatibility matrixreference/common-vulnerabilities.md: Common vulnerability patternsnpm:
npm audit # Show vulnerabilities
npm audit fix # Auto-fix vulnerabilities
npm audit fix --force # Force major updates
npm outdated # Check for outdated packages
npm update # Update to latest compatible
Yarn:
yarn audit # Show vulnerabilities
yarn upgrade-interactive # Interactive update
yarn outdated # Check for outdated
pip:
pip-audit # Audit vulnerabilities
pip list --outdated # Check outdated
pip install --upgrade # Update package
Poetry:
poetry check # Check lock file
poetry show --outdated # Show outdated
poetry update # Update packages
Cargo:
cargo audit # Audit vulnerabilities
cargo outdated # Check outdated
cargo update # Update packages