Dependency Auditor
When to activate
Invoke this skill when you need to:
- Scan project dependencies for known security vulnerabilities (CVEs)
- Identify outdated or stale packages in the dependency tree
- Detect license incompatibilities or problematic licenses
- Reduce dependency bloat and redundant transitive dependencies
- Verify dependency versions are locked and reproducible
- Check for supply-chain risks (unmaintained packages, deprecated modules)
- Analyze the health of critical dependencies (activity, maintainer count, issue backlog)
- Generate quarterly dependency audit reports with upgrade recommendations
When NOT to use
Do not use this skill for:
- General package management or routine updates (use native package managers: npm, pip, cargo)
- Debugging broken imports or runtime errors (use code-review or debugging workflow)
- Performance optimization unrelated to dependency size (use profiler)
- Choosing between similar packages without security or maintenance concerns (use architecture review)
- Daily/weekly checks (run annually or when drift becomes concerning; use CI/pre-commit for continuous scanning)
Instructions
Core Audit Steps
Identify the package manager and lock file
- Detect ecosystem: npm/yarn (JavaScript), pip/poetry (Python), cargo (Rust), bundler (Ruby), composer (PHP)
- Locate lock file:
package-lock.json, yarn.lock, poetry.lock, Cargo.lock, Gemfile.lock, composer.lock
- Verify lock file exists and is reasonably recent (not stale >6 months)
Run security vulnerability scan
- npm:
npm audit --audit-level=moderate for all vulnerabilities; optionally npm audit fix with caution
- Python:
pip-audit (recommended), safety check, or bandit for code-level risks
- Cargo:
cargo audit
- Ruby:
bundle audit
- Report CVEs by severity (critical, high, moderate, low), include CVE ID and remediation path
Check for outdated dependencies
- npm:
npm outdated to show major/minor/patch version gaps
- Python:
pip list --outdated
- Cargo:
cargo outdated
- Categorize by risk: patch-safe (low risk) vs. minor (medium) vs. major (breaking changes)
Analyze transitive dependencies
- Identify which direct dependencies pull in problematic transitive dependencies
- Use
npm ls <package> or equivalents to trace dependency paths
- Flag duplicate versions of the same package (e.g., two versions of lodash in tree)
- Recommend consolidation where possible
License compliance check
- npm:
npm ls --depth=0 with manual review; use npx license-checker for full tree
- Python:
pip-licenses
- Identify restrictive licenses: GPL, AGPL, SSPL that may infect your codebase
- Check for incompatibilities with your project's license
- Flag copyleft licenses or unusual restrictions
Supply-chain risk assessment
- Check package registry metadata: unmaintained status, maintainer count, last publish date
- npm:
npm view <package> to inspect time, dist-tags, repository
- Look for unusual patterns: recent ownership transfer, sudden spike in releases, abandoned projects
- Check GitHub/GitLab repo: last commit date, issue backlog, maintainer activity
- Flag packages with fewer than 2 active maintainers for critical dependencies
Dependency size and bloat analysis
- npm:
npm ls --all (full tree) vs. npm ls --depth=0 (direct only)
- Check bundle impact:
npm run bundle-size or equivalent
- Identify unnecessarily large packages (e.g., moment.js vs. date-fns)
- Find unused dependencies with tools like
depcheck or npm ls --all unused analysis
- Recommend lighter alternatives where applicable
Lock file integrity
- Ensure lock file is committed and up-to-date with package.json
- Warn if lock file is stale (> 30 days behind package.json changes)
- Check for conflicts or manual edits in lock file
Tool Commands by Ecosystem
Node.js / npm:
npm audit --audit-level=moderate
npm audit fix # Apply safe fixes (use with caution)
npm outdated
npm ls --depth=0 # Direct dependencies only
npm ls <package> # Trace specific package path
npm view <package> # Check metadata, maintainers, last publish
npx depcheck # Find unused dependencies
npx license-checker # List all licenses in tree
npm ls --all | grep "deduped" # Find duplication
Python / pip:
pip-audit # Security audit
pip list --outdated
pip show <package> # Check version, dependencies, maintainer
pipdeptree # Visualize full dependency tree
pip-licenses # Check all licenses
Rust / Cargo:
cargo audit
cargo outdated
cargo tree # Visualize dependency tree
cargo metadata --format-version 1 # Full dependency graph
Ruby / Bundler:
bundle audit
bundle outdated
bundle viz # Visualize dependency graph (requires graphviz)
Reporting Structure
Present audit results in this prioritized order:
Critical Issues (must fix immediately)
- CVEs with CVSS >= 7.0 or exploitable vulnerabilities
- Unmaintained packages in critical paths (auth, payments, data handling)
- Breaking version mismatches that prevent installation
Actionable Upgrades (schedule for next sprint)
- Security patches and minor updates that fix known issues
- Deprecated packages with recommended replacements
- License incompatibilities
Transitive Bloat (nice to have, improves tree health)
- Unused dependencies
- Redundant versions that should consolidate
- Oversized packages with lighter alternatives
Supply-Chain Health (informational)
- Packages with few maintainers
- Deprecated modules still in use
- Unusual activity patterns
Recommendations & Next Steps
- Timeline for critical fixes
- Breaking changes to plan for
- Long-term dependency health strategy
Output Format
# Dependency Audit Report — [Project Name] — [Date]
## Summary
- Total dependencies (direct): [X]
- Total dependencies (with transitive): [X]
- Outdated packages: [X] (>1 version behind)
- Security vulnerabilities: [X] (critical: Y, high: Z)
- Deprecated packages: [X]
- License conflicts: [X]
## Critical — MUST FIX NOW
### Security Vulnerabilities
- **[Package] [current-version] → [safe-version]**
- CVE-2024-XXXXX: [Description]
- CVSS Score: [X.X]
- Path: [dependency chain]
- Action: npm update [package] or npm install [package]@[version]
### Unmaintained or Abandoned
- **[Package] [current-version]**
- Last update: [date]
- Recommended alternative: [package]
- Action: Plan migration in next sprint
## High — Schedule for Next Sprint
### Major Version Upgrades
- **[Package] [current] → [next-major]**
- Breaking changes: [summary]
- Migration effort: [estimated hours]
- Benefit: [security/features/performance]
### Deprecated Packages
- **[Package]** is deprecated and no longer maintained
- Recommended replacement: [package]
- Migration notes: [key changes]
## Medium — Optimize for Stability
### Transitive Dependencies
- **Duplicate [Package]**: Versions [v1, v2] in tree
- Consolidate to: [recommended version]
- Effort: [low/medium/high]
### Unused Dependencies
- **[Package]**: Found in node_modules but not imported
- Action: Remove from package.json and run npm prune
### Bloat Reduction
- **[Package]**: [Size] KB, consider lightweight alternative [package]
- Size savings: [estimate]
## License Audit
- **Copyleft licenses detected**:
- [Package]: GPL-3.0 (incompatible with [your-license])
- [Package]: AGPL-3.0 (requires disclosure)
- **Recommended action**: [Replace or relicense]
## Supply-Chain Health
- **Maintainer Status**:
- [Package]: 1 active maintainer (consider [alternative])
- [Package]: 0 commits in 2+ years (consider [alternative])
## Effort Estimate
- Critical security fixes: [X hours] — Schedule for [date]
- Major version upgrades: [X hours] — Schedule for next sprint
- Optional optimizations: [X hours] — Backlog
- **Total recommended effort**: [X hours over next quarter]
## Upgrade Strategy
### Phase 1: Critical (This week)
1. npm audit fix --force (if safe)
2. Manual patching of high-severity CVEs
3. Verify tests pass
### Phase 2: High Priority (Next 2 weeks)
1. Plan breaking changes for [Package]
2. Create feature branch for major upgrades
3. Update tests for new API versions
### Phase 3: Medium Priority (Next quarter)
1. Remove unused dependencies
2. Consolidate duplicate versions
3. Consider lightweight alternatives for bloat
## Next Steps
- [ ] Apply critical security patches (deadline: [date])
- [ ] Schedule major version upgrade work
- [ ] Investigate [Package] alternative before next release
- [ ] Reduce bundle size by removing [Package]
- [ ] Review and approve license compatibility
Example
Scenario: A Node.js fullstack app with 42 npm dependencies. Developer asks to audit for security and outdated packages.
Steps Executed:
- Run
npm audit — Reports 3 critical CVEs in transitive dependency chain
- Run
npm outdated — Shows 8 packages are 2+ major versions behind
- Run
npm ls lodash — Discovers two versions of lodash (3.10.1 and 4.17.21) due to conflicting peer dependencies
- Run
npx license-checker — Flags GPL-licensed package (incompatible with MIT project)
- Run
npx depcheck — Identifies leftpad in node_modules but not in package.json
- Check npm registry for
express — Last update 2 months ago, 8 active maintainers
Report Output (abbreviated):
# Dependency Audit Report — MyApp — 2026-06-13
## Summary
- Total dependencies (direct): 15
- Total dependencies (with transitive): 42
- Outdated packages: 8
- Security vulnerabilities: 3 critical
- Deprecated packages: 1
- License conflicts: 1
## Critical — MUST FIX NOW
### Security Vulnerabilities
- **lodash 3.10.1 → 4.17.21**
- CVE-2021-23337: ReDoS vulnerability in template syntax
- CVSS Score: 7.5
- Path: app-utils → lodash@3.10.1
- Action: npm install lodash@4.17.21
- **express 4.16.4 → 4.18.2**
- CVE-2022-24999: Prototype pollution via query string
- CVSS Score: 8.2
- Path: direct dependency
- Action: npm install express@latest
## High — Schedule for Next Sprint
### Major Version Upgrades
- **mongoose 5.x → 7.x**
- Breaking changes: Changed query helpers API, model.findByIdAndUpdate() signature
- Migration effort: 4-6 hours
- Benefit: Security fixes, MongoDB 5.0+ support
## Medium — Optimize for Stability
### Transitive Dependencies
- **Duplicate lodash**: Versions 3.10.1 and 4.17.21 in tree
- Consolidate to: 4.17.21
- Effort: low (update peer dependencies)
### Unused Dependencies
- **leftpad**: 2.5 KB, not imported anywhere
- Action: Remove from package.json
## License Audit
- **gpl-package 1.0.0**: GPL-3.0 (incompatible with MIT)
- Recommended action: Replace with [mit-licensed-alternative]
## Effort Estimate
- Critical security fixes: 2 hours
- Major version upgrades: 6 hours
- Total recommended: 8 hours over next 2 weeks
## Next Steps
- [x] Apply critical security patches (deadline: 2026-06-17)
- [ ] Plan mongoose 5 → 7 migration
- [ ] Replace GPL package before next release
- [ ] Remove unused leftpad dependency
Follow-up:
- Create GitHub issue to track major version upgrades
- Pin critical security patches in next release
- Schedule GPL license replacement in next sprint
1---2name: dependency-auditor-23description: Dependency Auditor4metadata:5 source: https://skillmd.com/skills/uitbreidenos/dependency-auditor-26---7# Dependency Auditor89## When to activate1011Invoke this skill when you need to:12- Scan project dependencies for known security vulnerabilities (CVEs)13- Identify outdated or stale packages in the dependency tree14- Detect license incompatibilities or problematic licenses15- Reduce dependency bloat and redundant transitive dependencies16- Verify dependency versions are locked and reproducible17- Check for supply-chain risks (unmaintained packages, deprecated modules)18- Analyze the health of critical dependencies (activity, maintainer count, issue backlog)19- Generate quarterly dependency audit reports with upgrade recommendations2021## When NOT to use2223Do not use this skill for:24- General package management or routine updates (use native package managers: npm, pip, cargo)25- Debugging broken imports or runtime errors (use code-review or debugging workflow)26- Performance optimization unrelated to dependency size (use profiler)27- Choosing between similar packages without security or maintenance concerns (use architecture review)28- Daily/weekly checks (run annually or when drift becomes concerning; use CI/pre-commit for continuous scanning)2930## Instructions3132### Core Audit Steps33341. **Identify the package manager and lock file**35 - Detect ecosystem: npm/yarn (JavaScript), pip/poetry (Python), cargo (Rust), bundler (Ruby), composer (PHP)36 - Locate lock file: `package-lock.json`, `yarn.lock`, `poetry.lock`, `Cargo.lock`, `Gemfile.lock`, `composer.lock`37 - Verify lock file exists and is reasonably recent (not stale >6 months)38392. **Run security vulnerability scan**40 - npm: `npm audit --audit-level=moderate` for all vulnerabilities; optionally `npm audit fix` with caution41 - Python: `pip-audit` (recommended), `safety check`, or `bandit` for code-level risks42 - Cargo: `cargo audit`43 - Ruby: `bundle audit`44 - Report CVEs by severity (critical, high, moderate, low), include CVE ID and remediation path45463. **Check for outdated dependencies**47 - npm: `npm outdated` to show major/minor/patch version gaps48 - Python: `pip list --outdated`49 - Cargo: `cargo outdated`50 - Categorize by risk: patch-safe (low risk) vs. minor (medium) vs. major (breaking changes)51524. **Analyze transitive dependencies**53 - Identify which direct dependencies pull in problematic transitive dependencies54 - Use `npm ls <package>` or equivalents to trace dependency paths55 - Flag duplicate versions of the same package (e.g., two versions of lodash in tree)56 - Recommend consolidation where possible57585. **License compliance check**59 - npm: `npm ls --depth=0` with manual review; use `npx license-checker` for full tree60 - Python: `pip-licenses`61 - Identify restrictive licenses: GPL, AGPL, SSPL that may infect your codebase62 - Check for incompatibilities with your project's license63 - Flag copyleft licenses or unusual restrictions64656. **Supply-chain risk assessment**66 - Check package registry metadata: unmaintained status, maintainer count, last publish date67 - npm: `npm view <package>` to inspect time, dist-tags, repository68 - Look for unusual patterns: recent ownership transfer, sudden spike in releases, abandoned projects69 - Check GitHub/GitLab repo: last commit date, issue backlog, maintainer activity70 - Flag packages with fewer than 2 active maintainers for critical dependencies71727. **Dependency size and bloat analysis**73 - npm: `npm ls --all` (full tree) vs. `npm ls --depth=0` (direct only)74 - Check bundle impact: `npm run bundle-size` or equivalent75 - Identify unnecessarily large packages (e.g., moment.js vs. date-fns)76 - Find unused dependencies with tools like `depcheck` or `npm ls --all` unused analysis77 - Recommend lighter alternatives where applicable78798. **Lock file integrity**80 - Ensure lock file is committed and up-to-date with package.json81 - Warn if lock file is stale (> 30 days behind package.json changes)82 - Check for conflicts or manual edits in lock file8384### Tool Commands by Ecosystem8586**Node.js / npm:**87```bash88npm audit --audit-level=moderate89npm audit fix # Apply safe fixes (use with caution)90npm outdated91npm ls --depth=0 # Direct dependencies only92npm ls <package> # Trace specific package path93npm view <package> # Check metadata, maintainers, last publish94npx depcheck # Find unused dependencies95npx license-checker # List all licenses in tree96npm ls --all | grep "deduped" # Find duplication97```9899**Python / pip:**100```bash101pip-audit # Security audit102pip list --outdated103pip show <package> # Check version, dependencies, maintainer104pipdeptree # Visualize full dependency tree105pip-licenses # Check all licenses106```107108**Rust / Cargo:**109```bash110cargo audit111cargo outdated112cargo tree # Visualize dependency tree113cargo metadata --format-version 1 # Full dependency graph114```115116**Ruby / Bundler:**117```bash118bundle audit119bundle outdated120bundle viz # Visualize dependency graph (requires graphviz)121```122123### Reporting Structure124125Present audit results in this prioritized order:1261271. **Critical Issues** (must fix immediately)128 - CVEs with CVSS >= 7.0 or exploitable vulnerabilities129 - Unmaintained packages in critical paths (auth, payments, data handling)130 - Breaking version mismatches that prevent installation131 1322. **Actionable Upgrades** (schedule for next sprint)133 - Security patches and minor updates that fix known issues134 - Deprecated packages with recommended replacements135 - License incompatibilities136 1373. **Transitive Bloat** (nice to have, improves tree health)138 - Unused dependencies139 - Redundant versions that should consolidate140 - Oversized packages with lighter alternatives141 1424. **Supply-Chain Health** (informational)143 - Packages with few maintainers144 - Deprecated modules still in use145 - Unusual activity patterns146 1475. **Recommendations & Next Steps**148 - Timeline for critical fixes149 - Breaking changes to plan for150 - Long-term dependency health strategy151152### Output Format153154```155# Dependency Audit Report — [Project Name] — [Date]156157## Summary158- Total dependencies (direct): [X]159- Total dependencies (with transitive): [X]160- Outdated packages: [X] (>1 version behind)161- Security vulnerabilities: [X] (critical: Y, high: Z)162- Deprecated packages: [X]163- License conflicts: [X]164165## Critical — MUST FIX NOW166167### Security Vulnerabilities168- **[Package] [current-version] → [safe-version]**169 - CVE-2024-XXXXX: [Description]170 - CVSS Score: [X.X]171 - Path: [dependency chain]172 - Action: npm update [package] or npm install [package]@[version]173174### Unmaintained or Abandoned175- **[Package] [current-version]**176 - Last update: [date]177 - Recommended alternative: [package]178 - Action: Plan migration in next sprint179180## High — Schedule for Next Sprint181182### Major Version Upgrades183- **[Package] [current] → [next-major]**184 - Breaking changes: [summary]185 - Migration effort: [estimated hours]186 - Benefit: [security/features/performance]187188### Deprecated Packages189- **[Package]** is deprecated and no longer maintained190 - Recommended replacement: [package]191 - Migration notes: [key changes]192193## Medium — Optimize for Stability194195### Transitive Dependencies196- **Duplicate [Package]**: Versions [v1, v2] in tree197 - Consolidate to: [recommended version]198 - Effort: [low/medium/high]199200### Unused Dependencies201- **[Package]**: Found in node_modules but not imported202 - Action: Remove from package.json and run npm prune203204### Bloat Reduction205- **[Package]**: [Size] KB, consider lightweight alternative [package]206 - Size savings: [estimate]207208## License Audit209210- **Copyleft licenses detected**:211 - [Package]: GPL-3.0 (incompatible with [your-license])212 - [Package]: AGPL-3.0 (requires disclosure)213- **Recommended action**: [Replace or relicense]214215## Supply-Chain Health216217- **Maintainer Status**:218 - [Package]: 1 active maintainer (consider [alternative])219 - [Package]: 0 commits in 2+ years (consider [alternative])220221## Effort Estimate222223- Critical security fixes: [X hours] — Schedule for [date]224- Major version upgrades: [X hours] — Schedule for next sprint225- Optional optimizations: [X hours] — Backlog226- **Total recommended effort**: [X hours over next quarter]227228## Upgrade Strategy229230### Phase 1: Critical (This week)2311. npm audit fix --force (if safe)2322. Manual patching of high-severity CVEs2333. Verify tests pass234235### Phase 2: High Priority (Next 2 weeks)2361. Plan breaking changes for [Package]2372. Create feature branch for major upgrades2383. Update tests for new API versions239240### Phase 3: Medium Priority (Next quarter)2411. Remove unused dependencies2422. Consolidate duplicate versions2433. Consider lightweight alternatives for bloat244245## Next Steps246- [ ] Apply critical security patches (deadline: [date])247- [ ] Schedule major version upgrade work248- [ ] Investigate [Package] alternative before next release249- [ ] Reduce bundle size by removing [Package]250- [ ] Review and approve license compatibility251```252253## Example254255**Scenario**: A Node.js fullstack app with 42 npm dependencies. Developer asks to audit for security and outdated packages.256257**Steps Executed**:2582591. Run `npm audit` — Reports 3 critical CVEs in transitive dependency chain2602. Run `npm outdated` — Shows 8 packages are 2+ major versions behind2613. Run `npm ls lodash` — Discovers two versions of lodash (3.10.1 and 4.17.21) due to conflicting peer dependencies2624. Run `npx license-checker` — Flags GPL-licensed package (incompatible with MIT project)2635. Run `npx depcheck` — Identifies `leftpad` in node_modules but not in package.json2646. Check npm registry for `express` — Last update 2 months ago, 8 active maintainers265266**Report Output** (abbreviated):267268```269# Dependency Audit Report — MyApp — 2026-06-13270271## Summary272- Total dependencies (direct): 15273- Total dependencies (with transitive): 42274- Outdated packages: 8275- Security vulnerabilities: 3 critical276- Deprecated packages: 1277- License conflicts: 1278279## Critical — MUST FIX NOW280281### Security Vulnerabilities282- **lodash 3.10.1 → 4.17.21**283 - CVE-2021-23337: ReDoS vulnerability in template syntax284 - CVSS Score: 7.5285 - Path: app-utils → lodash@3.10.1286 - Action: npm install lodash@4.17.21287288- **express 4.16.4 → 4.18.2**289 - CVE-2022-24999: Prototype pollution via query string290 - CVSS Score: 8.2291 - Path: direct dependency292 - Action: npm install express@latest293294## High — Schedule for Next Sprint295296### Major Version Upgrades297- **mongoose 5.x → 7.x**298 - Breaking changes: Changed query helpers API, model.findByIdAndUpdate() signature299 - Migration effort: 4-6 hours300 - Benefit: Security fixes, MongoDB 5.0+ support301302## Medium — Optimize for Stability303304### Transitive Dependencies305- **Duplicate lodash**: Versions 3.10.1 and 4.17.21 in tree306 - Consolidate to: 4.17.21307 - Effort: low (update peer dependencies)308309### Unused Dependencies310- **leftpad**: 2.5 KB, not imported anywhere311 - Action: Remove from package.json312313## License Audit314- **gpl-package 1.0.0**: GPL-3.0 (incompatible with MIT)315 - Recommended action: Replace with [mit-licensed-alternative]316317## Effort Estimate318- Critical security fixes: 2 hours319- Major version upgrades: 6 hours320- Total recommended: 8 hours over next 2 weeks321322## Next Steps323- [x] Apply critical security patches (deadline: 2026-06-17)324- [ ] Plan mongoose 5 → 7 migration325- [ ] Replace GPL package before next release326- [ ] Remove unused leftpad dependency327```328329**Follow-up**:330- Create GitHub issue to track major version upgrades331- Pin critical security patches in next release332- Schedule GPL license replacement in next sprint