跳到正文
Skillpedia
安全29k · #9583

dependency-auditor

它能做什么

它扫描项目的软件包,查找漏洞和许可证问题,然后按风险排序规划升级。适合准备发布或应对安全警报的开发者和团队。

适用场景

  • ✓当你准备发布,需要先检查依赖时。
  • ✓当安全公告提到你使用的某个软件包,你需要了解影响时。
  • ✓当你要添加新软件包,需要进行许可证审查时。

技能链接

https://github.com/alirezarezvani/claude-skills/blob/main/engineering/skills/dependency-auditor/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/alirezarezvani/claude-skills/blob/main/engineering/skills/dependency-auditor/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请在发布前审核我们项目的依赖,告诉我哪些需要升级,以及哪些许可证存在冲突。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体对你的清单文件和锁文件运行离线扫描器,查找漏洞和许可证冲突,然后规划升级,并附上风险和回滚说明。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Dependency Auditor

Skill Type: POWERFUL · Category: Engineering · Domain: Dependency Management & Security

Offline, deterministic dependency auditing across 8+ package ecosystems. The three scripts are pattern-matchers over manifests/lockfiles — they do not call live advisory APIs; pair their findings with npm audit / pip-audit / cargo audit for current CVE coverage.

Quick Start

# 1. Scan for vulnerabilities (built-in offline CVE pattern set; exit non-zero on high severity)
python3 scripts/dep_scanner.py /path/to/project --format json --fail-on-high -o scan.json

# 2. Check license compliance and conflicts
python3 scripts/license_checker.py /path/to/project --policy strict --format json -o licenses.json

# 3. Plan upgrades from the scanner's inventory
python3 scripts/upgrade_planner.py scan.json --risk-threshold medium --timeline 90 --format json -o plan.json

Consume the outputs: scan.json findings drive which packages to pin/patch now; licenses.json conflicts go to the user as a legal-risk list; plan.json orders upgrades by risk with rollback notes. --quick-scan skips transitive deps; --security-only limits the plan to security fixes.

Verification loop: after applying upgrades, re-run step 1 and assert 0 high-severity findings before closing the audit.

Supported Ecosystems

Language Manifests parsed
JavaScript/Node package.json, package-lock.json, yarn.lock
Python requirements.txt, pyproject.toml, Pipfile.lock, poetry.lock
Go go.mod, go.sum
Rust Cargo.toml, Cargo.lock
Ruby Gemfile, Gemfile.lock
Java pom.xml, gradle.lockfile
PHP composer.json, composer.lock
C#/.NET packages.config, project.assets.json

License Classification

  • Permissive: MIT, Apache 2.0, BSD (2/3-clause), ISC
  • Copyleft (strong): GPL v2/v3, AGPL v3 — flags contamination risk in permissive projects
  • Copyleft (weak): LGPL v2.1/v3, MPL 2.0
  • Proprietary / Dual / Unknown — unknown licenses are surfaced for manual review

The checker analyzes license inheritance through dependency chains and emits conflict pairs with remediation suggestions.

Upgrade Risk Matrix

Risk Update type Handling
Low Patch, security fixes Apply immediately
Medium Minor with new features Batch into scheduled update
High Major version, API changes Dedicated migration task + tests
Critical Known breaking changes Planned migration with rollback procedure

Prioritization: security patches > bug fixes > feature updates > major rewrites; deprecated features get immediate attention.

Scripts (accurate capability claims)

  • scripts/dep_scanner.py — multi-format parser; built-in offline vulnerability pattern set (~16 CVE patterns — a smoke layer, not a replacement for live advisories); transitive resolution from lockfiles; JSON + text output.
  • scripts/license_checker.py — license detection from package metadata; compatibility matrix across 20+ license types; --policy permissive|strict; conflict detection with remediation.
  • scripts/upgrade_planner.py — semver-based breaking-change prediction; risk-ordered migration plan with testing checklist and timeline estimation.

Sample fixtures: test-project/ and test-inventory.json in this folder; expected shapes in expected_outputs/.

CI Integration

# Security gate in CI
python3 scripts/dep_scanner.py . --format json --fail-on-high
python3 scripts/license_checker.py . --policy strict --format json

Best Practices

  1. Prioritize security: address high/critical findings immediately; license compliance before functionality.
  2. Gradual updates: incremental upgrades with thorough testing; feature flags for risky bumps.
  3. Cadence: security scans per commit; license audits monthly; full audit quarterly.
  4. False positives: whitelist with documentation; contact maintainers for license ambiguity.

See README.md for detailed usage and references/ for the vulnerability/license knowledge bases.

More in this skill

Load these only when the task needs them.

常见问题

它会检查实时的安全数据库吗?

不会。它的扫描是离线匹配模式的,因此应搭配 npm audit 或 pip-audit 等工具,以获取最新的公告。

它涵盖哪些生态系统?

超过八个软件包生态系统,通过读取其清单文件获得信息。

它能只规划安全修复吗?

能。你可以把升级计划限定为安全修复。

详情

作者的原始描述

Use before a release, during a CVE investigation, before a major version bump or for a license review. Scans dependencies with dep_scanner.py, checks licenses with license_checker.py and plans safe upgrades with upgrade_planner.py.

repo: alirezarezvani/claude-skills

热度

GitHub 星标
29k
排名
#9583
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能