dependency-management
Minimal dependency surface, provenance, pinning, advisories, maintenance, transitive risk, licensing
- License 许可
- MIT
- 所属仓库
- WASDst/photoshow
- 最近更新
- 2026-10-08
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- dependency-management
- description
- Minimal dependency surface, provenance, pinning, advisories, maintenance, transitive risk, licensing
02 资源文件 6
- 参考文档checks/dependency-audit.md273 B
- 参考文档examples/di_container_example.md1.2 KB
- 参考文档manifest.json1.2 KB
- 参考文档references/dependency-injection-principles.md1.4 KB
- 脚本scripts/detect_cycles.sh426 B
- 参考文档templates/dependency-management-template.md873 B
03 SKILL.md 正文
Dependency Management
1. Minimal Dependency Surface
Every dependency is a liability. Strictly evaluate the need for a new dependency against building the functionality in-house. Minimize the total number of dependencies to reduce the attack surface, maintenance burden, and build times.
2. Provenance Verification
Verify the source and integrity of all dependencies. Use package managers that support cryptographic hashing and signature verification. Ensure dependencies are downloaded from trusted, authoritative registries.
3. Strict Dependency Pinning
Pin all dependencies to exact versions (e.g., major.minor.patch) in application projects. Use lockfiles to ensure reproducible builds across all environments. Avoid floating versions or ranges that can introduce unexpected breaking changes.
4. Security Advisories Auditing
Continuously monitor dependency trees for known vulnerabilities using automated tools (e.g., npm audit, dependabot, Trivy). Establish a strict SLA for patching critical and high-severity vulnerabilities in dependencies.
5. Maintenance and Upgrades
Treat dependency upgrades as regular maintenance, not an afterthought. Schedule regular cycles to update dependencies to their latest stable versions. Test upgrades thoroughly to catch subtle breaking changes or behavioral shifts.
6. Transitive Risk Assessment
Understand that you depend not just on your direct dependencies, but on their dependencies as well (transitive dependencies). Analyze the deep dependency graph to identify risky, unmaintained, or bloated packages brought in indirectly.
7. Licensing Compliance
Automate the checking of dependency licenses. Ensure all transitive dependencies have licenses compatible with your project's distribution model. Maintain an explicit allowlist of acceptable licenses and block builds containing incompatible ones.
8. Vendor Branching / Vendoring
For critical systems, consider vendoring dependencies directly into the source control repository. This guarantees availability, prevents upstream removal (left-pad scenario), and allows for targeted local patching if upstream is unresponsive.
9. Deprecation Management
Actively track the deprecation status of dependencies. Plan migrations away from abandoned or deprecated packages before they become security risks or block upgrades of other components.
10. Private Registries
Utilize private package registries or proxies for internal code sharing and to cache external dependencies. This provides a buffer against external registry outages and allows for tighter control over approved package versions.
04 同仓库更多 Skills
goal-management
暂无简介
evidence-collection
暂无简介
code-review
暂无简介
testing-quality
Testing pyramid, deterministic tests, regression tests, behavior assertions, test isolation, flaky detection, representative fixtures
rust-analyzer-context-indexing
暂无简介
release-engineering
暂无简介