chadfurman/security-kit

GitHub: chadfurman/security-kit

一款为 Claude Code 打造的 agentic 代码仓库安全审查插件,通过持久化积累的审查产物实现逐次更智能的全仓库防御性安全评估。

Stars: 1 | Forks: 0

# security-kit 为你的代码仓库编排的 agentic 安全审查工具。它会构建威胁地图,追踪不受信任的输入,通过激进的误报过滤来搜寻漏洞,计划缓解措施,并在 `docs/security/` 中留下带有日期的产物,从而使后续的每一次审查都比上一次更智能。 灵感来源于 [anthropics/claude-code-security-review](https://github.com/anthropics/claude-code-security-review),将范围从 PR-diff 扩展到了整个代码仓库,并提供了持久化且不断积累的产物。仅用于防御性自我评估——它只审查你拥有的代码。 ## 安装说明 在 Claude Code 中,将此仓库添加为插件市场并进行安装——它可以在 **私有** 仓库中运行(它会使用你的 `git` / `gh` 凭据进行克隆): ``` /plugin marketplace add chadfurman/security-kit /plugin install security-kit@security-kit ``` ## 使用方法 在任何你想要审查的仓库中: ``` "run a security review" # the full workflow (below) "update the threat map" # recon + map only, no hunting "where does untrusted input go?" # a single tracer dispatch "is this finding real?" # a single judge dispatch "make tickets for the findings" # epic + subtickets from the latest review ``` 或者直接调用技能:`/security-kit:security-kit`(定位 + 路由)和 `/security-kit:security-review`(完整工作流)。 ## 工作流程 ``` Phase 0 refresh artifacts (scoped to code changed since last review) → commit Phase 1 recon surface-mapper ∥ untrusted-input-tracer Phase 2 threat map threat-modeler → docs/security/threat-map.md Phase 3 hunt vuln-hunter × taxonomy cluster (parallel) Phase 4 judge fp-judge × finding (parallel, keep ≥8/10) Phase 5 plan mitigation-planner → themes, ranked plan, drafts Phase 6 artifacts dated docs entry + rolling security-data.json → commit Phase 7 tickets offer epic + subtickets (ticket-kit / Jira / markdown) ``` 每一次调度都有记录说明;没有任何操作会在后台静默执行。每次审查都会先读取上一次审查的产物,并根据自 `last_reviewed_sha` 以来的 diff 对其进行更新——这些更新会在开始搜寻新漏洞之前单独提交。 ## 你的仓库中会包含的内容 ``` docs/security/ ├── README.md # review index: date · findings · trend ├── threat-map.md # living: assets, actors, boundaries, ranked risk vectors ├── security-data.json # rolling history; powers new/recurring/resolved deltas └── reviews/ └── YYYY-MM-DD/ └── index.md # the dated review: findings, mitigations, FP audit ``` 可选的各个仓库的扩展内容(存在时会读取): - `docs/security/precedents.local.md` — 你的误报案例法 (“我们在各处使用 Prisma;SQLi 仅对 `$queryRaw` 有效”) - `docs/security/taxonomy.local.md` — 额外的分类或常驻排除项 ## 误报原则 评判机制会应用硬性排除规则和积累的先例(改编自上游 action),并且仅保留在具体可利用性上得分 ≥8/10 的发现结果。被舍弃的发现结果会保留在每次审查的审计表中——宁缺毋滥(重精确度轻召回率),并且召回率的处理路径会被记录在案。零发现结果是一个合理的结果。 ## 任务单系统 阶段 7 会自动检测目标:如果宿主仓库使用了 [ticket-kit](https://github.com/chadfurman/ticket-kit),则会调用它;如果配置了 MCP 则调用 Jira,否则文档条目中的缓解计划将作为一个独立的 Markdown 清单存在。 在创建任何内容之前,系统都会先进行询问。
标签:AI编程助手, Homebrew安装, 代码安全审计, 威胁建模, 安全生命周期管理, 插件, 网络安全研究, 错误基检测, 防御加固, 静态代码分析