项目依赖安全更新
dependency-update
安全更新项目依赖的指南。当被要求更新软件包、升级依赖项或检查过时库时使用。
- License 许可
- MIT
- 所属仓库
- microsoft/haste
- 最近更新
- 2026-11-13
- Stars
- ★ 110
- Forks
- 19
01 前言 Front Matter
- name
- dependency-update
- level
- foundational
- agents
- [ "backend-dev", "security", "security-validation" ]
- domain
- maintenance
- source
- Internal engineering practices
- status
- draft
- description
- Guide for safely updating project dependencies. Use when asked to update packages, upgrade dependencies, or check for outdated libraries.
- created_date
- 2026-04-27
- validated_by
- allowed-tools
- shell
- last_validated
02 资源文件 5
- 许可证LICENSE1.0 KB
- 参考文档references/rule-catalog.md9.7 KB
- 参考文档references/strict-vocabulary.md4.9 KB
- 参考文档references/use-cases.md3.6 KB
- 参考文档references/word-swaps.md2.4 KB
03 SKILL.md 正文
Dependency Update
Overview
A structured process for safely updating project dependencies. Updates are categorized by risk level and applied in controlled batches with verification at each step.
Key Concepts
Semantic Versioning Risk Tiers
- Patch (x.x.X): Bug fixes only. Safe to batch.
- Minor (x.X.0): New features, backward compatible. Update in small batches.
- Major (X.0.0): Breaking changes. Update one at a time. Read the changelog.
Patterns & Techniques
Safe Update Process
Step 1: Audit
# Python
pip list --outdated
# JavaScript
npm outdated
Step 2: Categorize — Group by risk tier (patch, minor, major).
Step 3: Update per batch
- Update the dependency
cd hastelib && hatch build -t wheel— check buildcd hastelib && hatch run test:pytest— check behaviorcd ui && npm run lint— check for new warnings- If tests fail, investigate and fix or revert
Step 4: Security check — Scan for known vulnerabilities.
Step 5: Commit — One commit per logical group:
chore(deps): update [package] from vX to vY
Decision Framework
| Update Type | Risk | Strategy |
|---|---|---|
| Patch | Low | Batch all, update together |
| Minor (well-known pkg) | Low-Med | Small batches of 3-5 |
| Minor (niche pkg) | Medium | One at a time, check changelog |
| Major | High | One at a time, read migration guide |
| Security fix | Critical | Update immediately, regardless of type |
Common Pitfalls
- Updating everything at once — If tests fail, you can't tell which update caused it
- Skipping the changelog — Major updates often require code changes
- Ignoring transitive dependencies — A safe direct dep can pull in a vulnerable transitive dep
04 同仓库更多 Skills
HASTE 实施验证与诊断
validation-diagnostics
HASTE 的验证与诊断技能。对比计划工作与已实现工作,生成诊断报告,并将遗漏项反馈到技能改进中。使用场景:'验证实现'、'对比规格'、'诊断报告'、'偏差分析'、'覆盖检查'、'实现审查'。
Dependabot 漏洞分析与分诊
security-analysis
面向 HASTE 的 Dependabot 与安全分析技能。解析告警、归类相关漏洞、应用严重性规则并生成结构化报告。使用场景:'Dependabot 告警'、'安全扫描'、'漏洞分诊'、'依赖审计'、'npm audit'、'pip audit'、'CVE 分析'。
发布说明与变更日志生成
release-notes
根据提交历史生成发布说明。当需要起草发布说明、创建变更日志或总结某个版本的变更时使用。
HASTE 卫星影像供应商适配
imagery-provider-adaptation
面向 HASTE 的影像供应商适配技能。封装卫星影像来源(Planet、Vantor、Airbus 等)的特定逻辑。适用场景:'new imagery provider'(新影像供应商)、'add source type'(添加来源类型)、'satellite provider'(卫星供应商)、'Planet'、'Vantor'、'Airbus'、'Pleiades'、'WorldView'、'SkySat'、'imagery ingestion'(影像摄取)、'provider adapter'(供应商适配器)。
HASTE 确定性脚本执行
deterministic-scripts
面向 HASTE 的确定性脚本执行技能。使用脚本而非自由形式的 LLM 行为,以实现一致、可重复的操作。适用场景:'run preprocessing'(运行预处理)、'convert format'(转换格式)、'parse metadata'(解析元数据)、'generate tiles'(生成切片)、'build wheel'(构建 wheel 包)、'deploy functions'(部署函数)。防止产生幻觉脚本。
测试失败调试排查
debug-test-failures
用于测试失败的系统化调试工作流。当测试失败、CI 构建变红,或被要求调试测试问题时使用。