← ClaudeAtlas

dependency-auditlisted

Use when user wants to audit dependencies for security vulnerabilities, CVE scanning, check for outdated packages, verify license compliance, or get upgrade recommendations for npm, pip, or go modules
wu529778790/shenzjd-skills · ★ 0 · AI & Automation · score 68
Install: claude install-skill wu529778790/shenzjd-skills
# Dependency Audit 扫描项目依赖,检测安全漏洞、过时包和 license 合规问题。 ## Overview 全面审计项目依赖:CVE 漏洞扫描、过时依赖检测、license 合规检查、重复依赖分析。输出按严重程度排序的安全报告和可执行的修复命令。 ## When to Use - 用户想检查项目依赖安全 - 用户提到 CVE、漏洞、安全审计 - 用户想知道哪些依赖过时了 - 用户输入 `/dependency-audit` **When NOT to Use:** - 用户只是想更新依赖版本 - 用户想做代码级别的安全审查(那是 security-review) - 用户想分析运行时依赖(需要 APM 工具) ## 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: 漏洞扫描 ```bash # npm 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(): print(f' {name}: {v.get(\"severity\",\"unknown\")} - {v.get(\"title\",\"\")}') " # Go go install golang.org/x/vuln/cmd/govulncheck@latest govulncheck ./... 2>/dev/null # Python pip-audit 2>/dev/null || echo "pip-audit 未安装,运行: pip install pip-audit" ``` ### Step 3: 过时依赖检测 ```bash # npm npx npm-check-updates --format table 2>/dev/null # Go go list -m -u all 2>/dev/null | grep "\[" # Python pip list --outdated 2>/dev/null ``` 统计: - 过时依赖数量 - major / minor / patch 升级分布 - 是否有安全相关的更新 ### Step 4: License 合规检查 ```bash # npm npx license-checker --json 2>/dev/null | python