
Dependency Audit
- 402 installs
- Updated June 24, 2026
- wu529778790/shenzjd-skills
dependency-audit is an agent skill that scans project dependencies for CVE vulnerabilities, outdated packages, and license compliance across npm, Go, Python, and Rust.
About
dependency-audit is a Claude Code skill that scans a project's dependencies for security vulnerabilities, outdated packages, and license compliance issues. It detects the package manager from lockfiles and runs the matching tool (npm audit, govulncheck, pip-audit, cargo audit) across npm, yarn, pnpm, Go, Python, and Rust ecosystems, then flags CVEs, outdated packages, duplicate versions, and copyleft licenses. It outputs a severity-sorted report with executable fix commands. The skill's docs are written primarily in Chinese.
- CVE scanning across npm, Go, Python, Rust
- License compliance (GPL/AGPL detection)
- Severity-sorted report with fix commands
Dependency Audit by the numbers
- 402 all-time installs (skills.sh)
- +60 installs in the week ending Jul 27, 2026 (Skillselion tracking)
- Ranked #556 of 2,203 Security skills by installs in the Skillselion catalog
- Data as of Jul 27, 2026 (Skillselion catalog sync)
dependency-audit capabilities & compatibility
free, no API key; uses local package-manager audit tools
- Capabilities
- dependency audit · cve scanning · license compliance · outdated detection
- Use cases
- security audit
- Pricing
- Free
What dependency-audit says it does
Use when auditing project dependencies for security vulnerabilities, outdated packages, or license compliance across npm/yarn/pnpm, pip, go, and cargo.
CVE scanning, severity classification
npx skills add https://github.com/wu529778790/shenzjd-skills --skill dependency-auditAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 402 |
|---|---|
| Last updated | June 24, 2026 |
| Repository | wu529778790/shenzjd-skills ↗ |
Do my project's dependencies have known CVEs, outdated versions, or risky copyleft licenses?
security-audit
Who is it for?
Developers checking dependency security and license compliance across multiple package ecosystems.
Skip if: Code-level security review, Docker image scanning, or deep license analysis.
When should I use this skill?
Auditing project dependencies for security vulnerabilities, outdated packages, or license compliance across npm/yarn/pnpm, pip, go, and cargo.
What you get
A severity-sorted audit report of vulnerabilities, outdated packages, and license risks with executable fix commands.
- Severity-sorted dependency audit report
- Executable fix commands
By the numbers
- 6 supported package-manager ecosystems
- 4 audit dimensions
Files
Dependency Audit
扫描项目依赖,检测安全漏洞、过时包和 license 合规问题。
Overview
全面审计项目依赖:CVE 漏洞扫描、过时依赖检测、license 合规检查、重复依赖分析。输出按严重程度排序的安全报告和可执行的修复命令。
When to Use
- User wants to check dependency security
- User mentions CVE, vulnerability, or audit
- User wants to know outdated dependencies
- User says "审计依赖" / "check dependencies"
- User inputs
/dependency-audit
When NOT to Use:
- User only wants to update versions
- User wants code-level security review
- User wants to analyze runtime dependencies
- User wants deep license analysis
- User wants to scan Docker images
Core Pattern
Step 1: 检测包管理器
| 检测文件 | 包管理器 | 审计命令 |
|---|---|---|
package-lock.json | npm | npm audit |
yarn.lock | yarn | yarn audit |
pnpm-lock.yaml | pnpm | pnpm audit |
go.sum | Go | govulncheck ./... |
requirements.txt / Pipfile.lock | Python | pip-audit |
Cargo.lock | Rust | cargo audit |
Step 2: 漏洞扫描
# 工具可用性检查
check_tool() {
command -v "$1" >/dev/null 2>&1 || { echo "⚠️ $1 未安装,跳过 $2 审计"; return 1; }
}
# npm
if check_tool "npm" "npm"; then
npm audit --json 2>/dev/null | python3 -c "
import sys,json
data=json.load(sys.stdin)
vulns=data.get('vulnerabilities',{})
print(f'Total: {len(vulns)} vulnerabilities')
for name,v in vulns.items():
via=v.get('via',[])
title=next((x.get('title','') for x in via if isinstance(x,dict) and x.get('title')),'')
print(f' {name}: {v.get(\"severity\",\"unknown\")} - {title}')
" || echo "npm audit 失败,尝试: npm audit fix"
fi
# Go
if check_tool "go" "Go"; then
go install golang.org/x/vuln/cmd/govulncheck@latest 2>/dev/null
$(go env GOPATH)/bin/govulncheck ./... 2>/dev/null || echo "govulncheck 失败,检查 Go 版本"
fi
# Python
if check_tool "pip-audit" "Python"; then
pip-audit 2>/dev/null; rc=$?; if [ $rc -gt 1 ]; then echo "pip-audit 执行失败 (exit $rc),尝试: pip install pip-audit"; fi
else
echo "安装 pip-audit: pip install pip-audit"
fiStep 3: 过时依赖检测
# npm
if command -v npx >/dev/null 2>&1; then
npx npm-check-updates --format table 2>/dev/null || echo "npm-check-updates 失败"
else
echo "⚠️ npx 未安装,跳过 npm 过时检测"
fi
# Go
if command -v go >/dev/null 2>&1; then
go list -m -u all 2>/dev/null | grep "\[" || echo "无过时依赖"
else
echo "⚠️ go 未安装,跳过 Go 过时检测"
fi
# Python
if command -v pip >/dev/null 2>&1; then
pip list --outdated 2>/dev/null || echo "pip list 失败"
else
echo "⚠️ pip 未安装,跳过 Python 过时检测"
fi统计:
- 过时依赖数量
- major / minor / patch 升级分布
- 是否有安全相关的更新
Step 4: License 合规检查
# npm
if command -v npx >/dev/null 2>&1; then
npx license-checker --json 2>/dev/null | python3 -c "
import sys,json
data=json.load(sys.stdin)
licenses={}
for k,v in data.items():
lic=v.get('licenses','UNKNOWN')
licenses[lic]=licenses.get(lic,0)+1
for l,c in sorted(licenses.items(),key=lambda x:-x[1]):
print(f' {l}: {c}')
" || echo "license-checker 失败"
else
echo "⚠️ npx 未安装,跳过 npm license 检查"
fi
# Go
if command -v go-licenses >/dev/null 2>&1; then
go-licenses csv . 2>/dev/null || echo "go-licenses 失败"
else
echo "⚠️ go-licenses 未安装,跳过 Go license 检查"
echo "安装: go install github.com/google/go-licenses@latest"
fi检测:
- 是否有 GPL/AGPL 等 copyleft 许可证
- 是否有未知/自定义许可证
- 许可证兼容性
Step 5: 生成报告
使用 templates/audit-report.md 模板,输出:
1. 安全概览 — 漏洞数量和严重程度分布 2. 高危漏洞 — 需要立即修复的 CVE 3. 过时依赖 — 按升级难度排序 4. License 合规 — 风险许可证列表 5. 修复命令 — 每个问题附带可执行命令
Quick Reference
/dependency-audit # 完整审计
/dependency-audit --security # 只检查安全漏洞
/dependency-audit --licenses # 只检查 license
/dependency-audit --fix # 自动修复可安全升级的依赖| 参数 | 说明 | 默认值 |
|---|---|---|
--security | 只检查安全漏洞 | false |
--licenses | 只检查 license 合规 | false |
--fix | 自动修复 | false |
Common Mistakes
| 错误 | 正确做法 | 原因 |
|---|---|---|
| 只看 high/critical | medium 也需要关注 | 很多攻击链从 medium 升级而来 |
| 盲目升级所有依赖 | 逐个升级并测试 | major 升级可能有 breaking changes |
| 不检查 transitive 依赖 | 分析完整依赖树 | 漏洞常出在间接依赖中 |
| 忽略 license 合规 | 定期检查 license | GPL 传染性风险 |
| audit 后不更新 lock 文件 | 重新生成 lock 文件 | 确保修复生效 |
| 忽略已弃用的依赖 | 检查弃用警告 | 弃用包可能有安全风险 |
Dependency Audit
Scan project dependencies for security vulnerabilities, outdated packages, and license compliance issues.
Installation
# npx skills (recommended)
npx skills add wu529778790/shenzjd-skills -s dependency-audit -y
# Manual (Claude Code)
git clone https://github.com/wu529778790/shenzjd-skills.git
cp -r shenzjd-skills/dependency-audit ~/.claude/skills/
# Manual (Cursor)
# Copy SKILL.md content to .cursorrules or .cursor/rules/Usage
/dependency-audit # Full audit
/dependency-audit --security # Security vulnerabilities only
/dependency-audit --licenses # License compliance only
/dependency-audit --fix # Auto-fix safe upgrades| Parameter | Description | Default |
|---|---|---|
--security | Security vulnerabilities only | false |
--licenses | License compliance only | false |
--fix | Auto-fix safe upgrades | false |
Audit Dimensions
| Dimension | What It Checks |
|---|---|
| Security Vulnerabilities | CVE scanning, severity classification |
| Outdated Dependencies | major/minor/patch upgrade detection |
| License Compliance | GPL/AGPL/custom license detection |
| Duplicate Dependencies | Same dependency at different versions |
Supported Ecosystems
| Ecosystem | Detection Tool |
|---|---|
| npm / yarn / pnpm | npm audit |
| Go | govulncheck |
| Python | pip-audit |
| Rust | cargo audit |
Dependency Audit Report: {{project_name}}
Generated: {{date}}
Summary
| Metric | Value |
|---|---|
| 直接依赖 | {{direct_deps}} |
| 间接依赖 | {{transitive_deps}} |
| 安全漏洞 | {{vuln_count}} |
| 高危漏洞 | {{high_vuln_count}} |
| 过时依赖 | {{outdated_count}} |
| License 风险 | {{license_risk_count}} |
Security Vulnerabilities
{{#each vulns}}
{{severity}}: {{name}}
- CVE: {{cve}}
- 描述: {{description}}
- 影响版本: {{affected_versions}}
- 修复版本: {{fixed_version}}
- 修复命令:
{{fix_command}}
{{/each}}
{{#if no_vulns}} No known vulnerabilities found. {{/if}}
Outdated Dependencies
| 包名 | 当前版本 | 最新版本 | 升级类型 |
|---|
{{#each outdated}} | {{name}} | {{current}} | {{latest}} | {{upgrade_type}} | {{/each}}
License Compliance
| 许可证 | 数量 | 风险等级 |
|---|
{{#each licenses}} | {{name}} | {{count}} | {{risk}} | {{/each}}
{{#if gpl_licenses}}
⚠️ GPL/AGPL Dependencies
以下依赖使用 copyleft 许可证,可能影响项目license:
{{#each gpl_licenses}}
- {{name}}: {{license}}
{{/each}} {{/if}}
Recommended Actions
{{#each actions}} {{@index}}. {{description}} Command: {{command}}
{{/each}}
Related skills
FAQ
Which ecosystems are supported?
npm, yarn, and pnpm via npm audit, Go via govulncheck, Python via pip-audit, and Rust via cargo audit.
What does it check besides CVEs?
Outdated dependencies with upgrade-type breakdown, duplicate versions, and license compliance including GPL/AGPL detection.