MuhammedZohaib/patchman
GitHub: MuhammedZohaib/patchman
Patchman 是一款专注于授权安全审查的防御性审计工具,帮助开发与安全团队在编码阶段发现并修复常见安全缺陷。
Stars: 1 | Forks: 0
# patchman
[](https://github.com/MuhammedZohaib/patchman)
[](https://github.com/MuhammedZohaib/patchman/releases)
[](./LICENSE)
用于授权安全审查的防御性安全审计技能包和 Web 应用程序评估工具。
## 概述
Patchman 是一款用于 **授权安全审查** 的技能与插件集合。它采用只读优先、审查优先的模式——检查代码与架构是否符合 OWASP 及常见的应用程序安全失败模式,然后生成结构化的发现结果,并提供可操作的修复建议。
**支持的代理:** Claude Code · Codex · Cursor · Windsurf · Copilot · Gemini 风格技能安装器
## 安装
### Claude Code(推荐)
```
claude plugin marketplace add https://github.com/MuhammedZohaib/patchman.git
claude plugin install patchman@patchman-marketplace
```
重启 Claude Code。会话钩子会自动激活。
**验证安装**
```
claude plugin list
```
**卸载**
```
claude plugin uninstall patchman@patchman-marketplace
```
### Claude Code — 本地安装
```
git clone https://github.com/MuhammedZohaib/patchman.git
claude plugin marketplace add ./patchman
claude plugin install patchman@patchman-marketplace
```
### Codex — 本地安装
```
git clone https://github.com/MuhammedZohaib/patchman.git
mkdir -p ~/.codex/plugins
cp -R patchman/plugins/patchman ~/.codex/plugins/patchman
codex marketplace add ./patchman
```
如果希望直接指向插件路径,请使用 `~/.codex/plugins/patchman`。
如果希望 `Patchman` 出现在 Codex 市场或选择发现中,请使用 `codex marketplace add ./patchman`。
## 审查模式
| 模式 | 命令 |
|---|---|
| 完整安全审计 | `/security-audit focus=full severity>=medium output=report` |
| 身份验证审查 | `/auth-review area=login,session,reset` |
| 业务逻辑审查 | `/bizlogic-review feature=billing-upgrade workflow=invite-approval` |
| API 审查 | `/api-review surface=public-api include=authz,rate-limit,headers` |
| ORM / 数据访问审查 | `/query-review path=app/models include=n-plus-one,tenant-scope` |
| PR 差异审查 | `/pr-diff-review base=main head=feature/auth-refactor` |
| 快速分类 | `/quick-triage path=admin/ reason=pre-release` |
| 威胁建模 | `/threat-model feature=file-import` |
| 审计报告 | `/audit-report format=engineering-summary` |
## Patchman 可检测内容
- 带有代码级证据的 OWASP Top 10 类别
- 破损的身份验证、授权与会话管理
- IDOR 与租户隔离失败
- 业务逻辑漏洞与审批绕过
- SSRF、XSS、CSRF、注入与不安全的反序列化
- 密钥泄露与日志中的敏感数据
- 不安全的文件上传处理
- 弱安全头、不安全的默认配置与风险加密
- 缺失的速率限制与反滥用控制
- ORM 误用、N+1 查询问题与跨租户数据访问
- 管理路径、Webhook、队列与后台作业漏洞
## 示例提示
**完整审计**
```
Run a full security audit on this repo. Prioritize broken access control, unsafe defaults,
tenant isolation, secret handling, and exploitable auth issues. Use the Patchman findings format.
```
**针对性审查**
```
Review only the password reset flow. Focus on token lifetime, replay attacks, host header
trust, user enumeration, and session invalidation after reset.
```
**PR 审查**
```
Audit this pull request as a defensive security reviewer. Flag regressions, rank by severity
and confidence, and suggest minimal safe patches.
```
## 发现结果格式
每个发现结果包含:
- **证据** — 具体的代码或配置引用
- **严重性** — 基于影响范围与可实际利用的条件
- **置信度** — 当上下文不完整时会降低
- **修复建议** — 足够具体以直接实施
## 范围与限制
Patchman 仅适用于 **授权的防御性审计**。
**在范围内:** 安全代码审查、架构审查、配置审查、以明文形式进行的漏洞可利用性分析、修复规划
**超出范围:** 未授权入侵、漏洞武器化、凭证收集、恶意软件或持久化指导、破坏性载荷、实时攻击链
Patchman 从静态代码与配置推断风险。它不会替代运行时验证,并在证据不足时请求缺失的部署、代理或身份边界上下文。
## 仓库结构
```
patchman/
├── .claude-plugin/
├── .agents/plugins/
├── commands/
├── docs/
├── evals/
├── hooks/
├── plugins/patchman/
├── rules/
├── skills/
└── patchman.skill
```
## 许可证
请参见 [LICENSE](./LICENSE)。
标签:AI辅助安全, Claude插件, Codex插件, Copilot插件, Cursor插件, Gemini技能, N+1查询, ORM安全, OWASP Top 10, Web安全, Windsurf插件, 不安全默认配置, 业务逻辑漏洞, 代码审查, 安全合规, 密钥泄露, 开源安全工具, 技能包, 授权检查, 插件市场, 租户隔离, 网络代理, 自动修复建议, 自定义脚本, 蓝队分析, 认证授权漏洞, 逆向工具, 逆向工程平台, 防御性安全