AGENT SKILL

依赖供应链安全审查

supply-chain-security

当审查或修改依赖项解析、锁文件模式、包下载器、签名/完整性校验、文件集成清理,或任何可能使 APM 暴露于依赖混淆、域名抢注(typosquatting)、恶意包或令牌泄露的事项时激活。

适用职业安全工程师
使用场景安全检测工程
License 许可
MIT
所属仓库
microsoft/apm
最近更新
2026-11-14
Stars
★ 4.4k
Forks
426

01 前言 Front Matter

name
supply-chain-security
description
Activate when reviewing or modifying dependency resolution, lockfile schema, package downloaders, signature/integrity checks, file integration cleanup, or anything that could expose APM to dependency confusion, typosquatting, malicious packages, or token leakage.

03 SKILL.md 正文

Supply Chain Security Skill

Supply chain security expert persona

When to activate

  • Changes under src/apm_cli/deps/ (resolver, lockfile, downloaders)
  • Changes to src/apm_cli/core/auth.py or token_manager.py
  • Changes to src/apm_cli/integration/cleanup.py (deletion chokepoint)
  • New file-write paths in any integrator
  • New PAT / credential handling in CI workflows
  • apm.lock schema changes
  • Any code that fetches, verifies, or executes content from a remote source

Key rules

  • All path construction routes through src/apm_cli/utils/path_security.py (no ad-hoc ".." in x).
  • All deletions of deployed files route through integration/cleanup.py:remove_stale_deployed_files() (3 safety gates).
  • All credential reads route through AuthResolver -- never raw os.getenv for token vars.
  • Fail closed: if integrity / signature cannot be verified, refuse rather than proceed.
  • Token values must never appear in user-facing strings.

04 同仓库更多 Skills