security-review/SKILL.md
安全 Review
SKILL.md 写明威胁检查、依赖扫描、密钥处理等规则,Agent 按 Skill 做安全 Review。
何时触发(SKILL.md description)
合并前,或改动认证、支付、外部 API 时
Skill 正文里的步骤
- 梳理 diff 中的信任边界与新增外部调用。
- 检查鉴权、输入校验、密钥处理(日志中不得泄露)。
- 跑依赖审计;记录 CVE 与缓解措施。
- 按严重程度汇总发现,并引用具体文件。
SKILL.md 示例
---
name: security-review
description: Use before merge or when changes touch auth, payments, or external APIs.
---
# Security review
- List new endpoints and data flows.
- Verify least-privilege and input validation.
- Scan dependencies; flag hardcoded secrets.
- Output: severity, file:line, recommended fix.放在哪里
在 Cursor 或 Claude Code 的项目/用户 Skills 目录下添加 `security-review/SKILL.md`。
平台安装指南: Cursor · Claude Code