plugins/vibeworks-library/skills/dependency-audit/SKILL.md
Dependency management and auditing — evaluating new dependencies, security vulnerability scanning, update strategies, and license compliance. Use when adding or auditing dependencies.
npx skillsauth add claude-code-community-ireland/claude-code-resources dependency-auditInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Before adding any dependency, run through this evaluation checklist. Every "no" answer is a risk that must be explicitly accepted.
# npm — check package info
npm info <package> --json | jq '{name, version, license, homepage, maintainers}'
# Check download stats
npm info <package> --json | jq '.downloads'
# Bundle size (requires bundlephobia API or website)
# Visit: https://bundlephobia.com/package/<package>
# Check for known vulnerabilities before installing
npm audit --dry-run --package-lock-only
# Python — check package metadata
pip show <package>
pip index versions <package>
# Rust — check crate info
cargo info <crate>
| Factor | Accept | Investigate | Reject | |----------------------|------------------------------|--------------------------------|-------------------------------| | Weekly downloads | > 50,000 | 1,000 - 50,000 | < 1,000 | | Last commit | < 3 months | 3 - 12 months | > 12 months | | Open issues | < 50 with triage | 50 - 200 | > 200 untriaged | | Maintainers | >= 2 | 1 active | 0 active | | Transitive deps | < 5 | 5 - 20 | > 20 | | Bundle size (JS) | < 10 KB gzipped | 10 - 50 KB | > 50 KB (for a single feature)| | License | MIT, Apache-2.0, BSD | ISC, MPL-2.0 | GPL, AGPL, SSPL, unlicensed |
# Run audit against known vulnerability databases
npm audit
# Fix automatically where possible
npm audit fix
# Fix with major version bumps (review changes carefully)
npm audit fix --force
# Generate machine-readable report
npm audit --json > audit-report.json
# Yarn equivalent
yarn audit
yarn audit --json
# Install safety or pip-audit
pip install pip-audit
# Run audit
pip-audit
# Output in JSON
pip-audit --format json --output audit-report.json
# Check a requirements file without installing
pip-audit -r requirements.txt
# Install cargo-audit
cargo install cargo-audit
# Run audit
cargo audit
# Fix where possible
cargo audit fix
# Generate JSON report
cargo audit --json
# Built-in vulnerability scanning (Go 1.18+)
govulncheck ./...
Run audits on every pull request. Fail the build on critical or high severity findings.
# GitHub Actions example
- name: Security audit
run: |
npm audit --audit-level=high
if [ $? -ne 0 ]; then
echo "::error::Security vulnerabilities found"
exit 1
fi
# .github/dependabot.yml
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
timezone: "America/New_York"
open-pull-requests-limit: 10
reviewers:
- "team-platform"
labels:
- "dependencies"
- "automated"
# Group minor and patch updates to reduce PR noise
groups:
production-deps:
patterns:
- "*"
update-types:
- "minor"
- "patch"
dev-deps:
dependency-type: "development"
update-types:
- "minor"
- "patch"
# Ignore major version bumps for specific packages
ignore:
- dependency-name: "aws-sdk"
update-types: ["version-update:semver-major"]
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended",
":semanticCommits",
"group:monorepos",
"group:recommended"
],
"schedule": ["before 9am on monday"],
"prConcurrentLimit": 10,
"labels": ["dependencies", "automated"],
"packageRules": [
{
"matchUpdateTypes": ["minor", "patch"],
"matchCurrentVersion": "!/^0/",
"automerge": true,
"automergeType": "pr",
"platformAutomerge": true
},
{
"matchUpdateTypes": ["major"],
"labels": ["dependencies", "breaking-change"],
"automerge": false
},
{
"matchPackagePatterns": ["eslint", "prettier", "@types/*"],
"groupName": "linting and types",
"automerge": true
},
{
"matchDepTypes": ["devDependencies"],
"matchUpdateTypes": ["minor", "patch"],
"automerge": true
}
],
"vulnerabilityAlerts": {
"enabled": true,
"labels": ["security"],
"prPriority": 10
}
}
| Update Type | Strategy | Review Required | |-------------|------------------------------------------|-----------------| | Patch | Auto-merge if tests pass | No | | Minor | Auto-merge for stable deps (>= 1.0.0) | Spot-check | | Major | Manual review, check migration guide | Yes | | Security | Prioritize, merge within 24-48 hours | Yes |
package-lock.json, yarn.lock, Pipfile.lock, Cargo.lock, go.sum)# npm — regenerate from package.json
rm package-lock.json
npm install
# Yarn — regenerate
rm yarn.lock
yarn install
# After resolving, verify nothing unexpected changed
git diff package-lock.json | head -100
# npm — verify installed packages match lock file
npm ci # Clean install from lock file (CI environments)
# Yarn — same concept
yarn install --frozen-lockfile
# pip — verify hashes
pip install --require-hashes -r requirements.txt
| Dependency License | MIT Project | Apache-2.0 Project | GPL-3.0 Project | Proprietary Project | |--------------------|-------------|---------------------|------------------|---------------------| | MIT | OK | OK | OK | OK | | Apache-2.0 | OK | OK | OK (GPL-3+ only) | OK | | BSD-2/3-Clause | OK | OK | OK | OK | | ISC | OK | OK | OK | OK | | MPL-2.0 | OK | OK | OK | OK (file-level) | | LGPL-2.1/3.0 | OK | OK | OK | OK (dynamic linking)| | GPL-2.0 | NO | NO | OK (same version)| NO | | GPL-3.0 | NO | NO | OK | NO | | AGPL-3.0 | NO | NO | NO (unless AGPL) | NO | | SSPL | NO | NO | NO | NO | | Unlicensed | NO | NO | NO | NO |
# npm — check all dependency licenses
npx license-checker --summary
npx license-checker --failOn "GPL-2.0;GPL-3.0;AGPL-3.0"
npx license-checker --production --csv > licenses.csv
# Python
pip install pip-licenses
pip-licenses --format=table
pip-licenses --fail-on="GPL-3.0;AGPL-3.0"
# Rust
cargo install cargo-license
cargo license
vendor/ or third_party/ directoryVENDORED.md file# npm workspaces — hoist shared deps to root
npm install <package> -w packages/shared
# Yarn workspaces — nohoist for packages that need isolation
# package.json
{
"workspaces": {
"packages": ["packages/*"],
"nohoist": ["**/react-native", "**/react-native/**"]
}
}
package.jsonpackage.jsonsyncpack or manypkg to enforce version consistency# Check for version mismatches across packages
npx syncpack list-mismatches
# Fix version mismatches
npx syncpack fix-mismatches
| Severity | CVSS Score | Response Time | Example | |----------|-----------|---------------|--------------------------------------| | Critical | 9.0-10.0 | 4 hours | Remote code execution, auth bypass | | High | 7.0-8.9 | 24 hours | SQL injection, privilege escalation | | Medium | 4.0-6.9 | 1 week | XSS in admin panel, info disclosure | | Low | 0.1-3.9 | Next sprint | Minor info leak, DoS requiring auth |
## Vulnerability Assessment: CVE-YYYY-XXXXX
**Package**: example-lib
**Installed Version**: 2.3.1
**Fixed Version**: 2.3.2
**Severity**: High (CVSS 8.1)
### Are We Affected?
[ ] We use the affected function/feature
[ ] The vulnerable code path is reachable in our application
[ ] External input reaches the vulnerable code
### Mitigation
- Describe workaround if patch is not yet available
### Action
- [ ] Update to fixed version
- [ ] Run tests
- [ ] Deploy to staging and verify
- [ ] Deploy to production
- [ ] Close vulnerability ticket
Run this checklist quarterly or when onboarding a new team member.
npm audit / pip-audit / cargo audit — zero critical or high findingsnpx depcheck, pip-extra-reqs)npm outdated)tools
Automate changelog generation from commits, PRs, and releases following Keep a Changelog format. Use when setting up release workflows, generating release notes, or standardizing commit conventions.
documentation
Project Guidelines Skill (Example)
development
Development skill from everything-claude-code
documentation
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.