| name | dependency-audit |
| description | Dependency auditing, updating, and vulnerability management for npm, pip, and other package managers. Use when user asks to "audit dependencies", "update packages", "fix vulnerabilities", "check outdated", "npm audit", "pip audit", "upgrade dependencies safely", or any dependency management tasks. |
Dependency Audit
Audit, update, and manage dependencies safely.
npm / Node.js
Audit
npm audit
npm audit --json
npm audit --production
npm audit fix
npm audit fix --force
npm audit --advisory=1234
Check Outdated
npm outdated
Update Strategies
npm update
npm update express
npm install express@latest
npx npm-check-updates
npx npm-check-updates -u
npm install
npx npm-check-updates --target minor
npx npm-check-updates --target patch
Lock File
rm package-lock.json && npm install
npm ci
npm dedupe
Python / pip
Audit
pip install pip-audit
pip-audit
pip-audit -r requirements.txt
pip-audit --fix
pip-audit --json
pip install safety
safety check
safety check -r requirements.txt
Check Outdated
pip list --outdated
pip list --outdated --format=json
pip show package-name
Update Strategies
pip install --upgrade requests
pip list --outdated --format=json | python -c "
import json, sys
for pkg in json.load(sys.stdin):
print(pkg['name'])" | xargs -n1 pip install --upgrade
pip freeze > requirements.txt
pip-tools (Recommended)
pip install pip-tools
pip-compile requirements.in
pip-compile --upgrade requirements.in
pip-compile --upgrade-package flask requirements.in
pip-sync requirements.txt
Yarn
yarn audit
yarn audit --level moderate
yarn outdated
yarn upgrade
yarn upgrade --latest
yarn upgrade-interactive
yarn dedupe
pnpm
pnpm audit
pnpm audit --fix
pnpm outdated
pnpm update
pnpm update --latest
pnpm update --interactive
Renovate / Dependabot
Dependabot (GitHub)
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
reviewers:
- "team-name"
labels:
- "dependencies"
groups:
dev-deps:
patterns:
- "*"
dependency-type: "development"
prod-deps:
patterns:
- "*"
dependency-type: "production"
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
Renovate
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended"],
"schedule": ["before 6am on Monday"],
"automerge": true,
"automergeType": "pr",
"packageRules": [
{
"matchUpdateTypes": ["patch"],
"automerge": true
},
{
"matchUpdateTypes": ["major"],
"automerge": false,
"labels": [
Update Workflow
1. Check what's outdated
npm outdated / pip list --outdated
2. Run audit for vulnerabilities
npm audit / pip-audit
3. Update patch versions first (safest)
npx ncu --target patch -u && npm install
4. Run tests
npm test / pytest
5. Update minor versions
npx ncu --target minor -u && npm install && npm test
6. Update major versions one at a time
npm install package@latest && npm test
Read migration guides for major bumps
7. Commit and push
git add package.json package-lock.json
git commit -m "chore: update dependencies"
License Checking
npx license-checker --summary
npx license-checker --onlyAllow "MIT;ISC;BSD-3-Clause;Apache-2.0"
pip install pip-licenses
pip-licenses --summary
pip-licenses --allow-only "MIT;BSD;Apache-2.0"
Reference
For CI integration and automation: references/automation.md