360 Secure SkillHub
360 安全技能中心

Deps Mgmt

核心为6阶段全流程(库存风险、政策节奏、锁文件、升级测试、安全许可、治理工具),适配npm、pip等多技术生态。典型场景包括Dependabot噪音、CVE响应、依赖未固定导致的环境不一致等。输入需明确技术生态,输出含SBOM、合规依赖策略、标准化治理方案等,帮助团队规范依赖管理,提升安全性与可复现性。

codekungfu
codekungfu
热度 44.71
最近更新 2026-05-11 17:37:15
分类:开发依赖:纯提示词应用场景:DevOps / 工作流 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add deps-mgmt
Metadata
name
deps-mgmt
description
Deep dependency management workflow—inventory, upgrade policy, security patches, licensing, lockfiles, and supply-chain hygiene. Use when upgrading frameworks, resolving CVEs, or standardizing how teams pin dependencies.

Dependencies

Dependencies are supply-chain surface area: versions affect security, reproducibility, and upgrade cost.

When to Offer This Workflow

Trigger conditions:

  • Dependabot noise; major version upgrades
  • CVE response or license audit
  • “Works on my machine” due to unpinned dependencies

Initial offer:

Use six stages: (1) inventory & risk, (2) policy & cadence, (3) lockfiles & reproducibility, (4) upgrades & testing, (5) security & licensing, (6) governance & tooling). Confirm ecosystem (npm, pip, Maven, Go modules, etc.).


Stage 1: Inventory & Risk

Goal: Direct vs transitive dependencies; flag critical packages (crypto, auth, parsing, serialization).

Exit condition: SBOM or export for top applications; list of critical deps.


Stage 2: Policy & Cadence

Goal: When to upgrade (time-based vs on-demand); SemVer rules for libraries vs applications.


Stage 3: Lockfiles & Reproducibility

Goal: Committed lockfiles for deployable apps; libraries test against a compatibility matrix instead of one frozen lock.


Stage 4: Upgrades & Testing

Goal: Prefer one major bump per PR when feasible; CI matrix on supported language/runtime versions.


Stage 5: Security & Licensing

Goal: SCA scanning; patch SLA by severity; license allowlist for compliance.


Stage 6: Governance & Tooling

Goal: Renovate/Bot policies; pin internal packages; document exceptions and overrides.


Final Review Checklist

  • Inventory and risk hotspots known
  • Upgrade cadence and semver policy documented
  • Lockfiles or matrix strategy per repo type
  • CI validates upgrades
  • SCA and license policy enforced

Tips for Effective Guidance

  • Transitive CVEs may need overrides—trace the dependency graph.
  • Pin CI images and toolchains, not only application dependencies.

Handling Deviations

  • Monorepos: shared versions with Nx/Bazel/etc.—coordinate breaking upgrades.