Skip to content

Commit d2e9707

Browse files
Update README.md
1 parent 0a0cadd commit d2e9707

1 file changed

Lines changed: 93 additions & 121 deletions

File tree

README.md

Lines changed: 93 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -1,203 +1,175 @@
11
# patchman
22

33
[![Stars](https://img.shields.io/github/stars/MuhammedZohaib/patchman?style=flat-square)](https://github.com/MuhammedZohaib/patchman)
4-
[![Last Commit](https://img.shields.io/github/last-commit/MuhammedZohaib/patchman?style=flat-square)](https://github.com/MuhammedZohaib/patchman)
5-
[![License](https://img.shields.io/github/license/MuhammedZohaib/patchman?style=flat-square)](./LICENSE)
64
[![Release](https://img.shields.io/github/v/release/MuhammedZohaib/patchman?display_name=tag&style=flat-square)](https://github.com/MuhammedZohaib/patchman/releases)
5+
[![License](https://img.shields.io/github/license/MuhammedZohaib/patchman?style=flat-square)](./LICENSE)
76

8-
Defensive security audit skills for agentic code review and web application assessment.
9-
10-
`patchman` is a Claude/Codex-style skill and plugin bundle for authorized security reviews. It stays in read-first, review-first mode by default, inspects code and architecture against OWASP and common appsec failure patterns, and produces structured findings with remediation guidance instead of offensive playbooks.
11-
12-
## What It Is
13-
14-
- A reusable skill pack for secure code review, API review, auth review, business-logic review, PR diff review, and quick triage.
15-
- A plugin bundle that mirrors Caveman’s distribution shape: repo-level metadata, installable plugin packaging, top-level skills, mirrored plugin-level skills, commands, hooks, docs, evals, rules, and release automation.
16-
- A defensive review copilot that helps engineers find high-value vulnerabilities early and explain fixes clearly.
17-
18-
## What It Catches
19-
20-
- OWASP Top 10 classes with emphasis on exploitability and code evidence
21-
- Broken authentication and authorization flows
22-
- Session, cookie, and token handling flaws
23-
- Business logic gaps, approval bypasses, and abuse-case failures
24-
- IDOR and tenant-isolation bugs
25-
- Unsafe file upload, SSRF, XSS, CSRF, injection, and insecure deserialization risks
26-
- Secret handling mistakes and sensitive logging
27-
- Insecure defaults, weak headers, and risky crypto choices
28-
- Rate limiting and anti-abuse gaps
29-
- ORM misuse, N+1 query smells, and security-adjacent data-access regressions
30-
- Admin path, migration, webhook, queue, and background-job hazards
7+
Defensive security audit skill pack for agentic code review and web application assessment.
318

32-
## Review Modes
9+
---
3310

34-
- `full security audit`
35-
- `auth-only review`
36-
- `business-logic review`
37-
- `API review`
38-
- `ORM / N+1 / data-access review`
39-
- `PR diff review`
40-
- `quick triage`
11+
## Overview
4112

42-
## Supported Agents / Platforms
13+
Patchman is a skill and plugin bundle for **authorized security reviews**. It operates in read-first, review-first mode — inspecting code and architecture against OWASP and common appsec failure patterns, then producing structured findings with actionable remediation guidance.
4314

44-
- Claude Code via local plugin directory or marketplace-style repo metadata
45-
- Codex via `.codex-plugin` packaging and top-level skill folders
46-
- Cursor / Windsurf / Copilot / Gemini-style skill installers with manual path import
15+
**Supported agents:** Claude Code · Codex · Cursor · Windsurf · Copilot · Gemini-style skill installers
4716

48-
## Install
17+
---
4918

50-
### Claude Code (recommended)
19+
## Installation
5120

52-
Two commands — no cloning required:
21+
### Claude Code (Recommended)
5322

5423
```bash
5524
claude plugin marketplace add github:MuhammedZohaib/patchman
5625
claude plugin install patchman@patchman-marketplace
5726
```
5827

59-
Restart Claude Code. The session hooks activate automatically and print `PATCHMAN ACTIVE` on start.
60-
61-
To verify the install:
28+
Restart Claude Code. The session hooks activate automatically.
6229

30+
**Verify installation**
6331
```bash
6432
claude plugin list
6533
```
6634

67-
To remove:
68-
35+
**Uninstall**
6936
```bash
7037
claude plugin uninstall patchman@patchman-marketplace
7138
```
7239

73-
### Claude Code — local install from clone
40+
---
41+
42+
### Claude Code — Local Install
7443

7544
```bash
7645
git clone https://github.com/MuhammedZohaib/patchman.git
7746
claude plugin marketplace add ./patchman
7847
claude plugin install patchman@patchman-marketplace
7948
```
8049

81-
### Codex local install
50+
---
51+
52+
### Codex — Local Install
8253

8354
```bash
8455
git clone https://github.com/MuhammedZohaib/patchman.git
8556
mkdir -p ~/.codex/plugins
8657
cp -R patchman/plugins/patchman ~/.codex/plugins/patchman
8758
```
8859

89-
Then search for `Patchman` in the plugin picker or point Codex at `~/.codex/plugins/patchman`.
60+
Open the Codex plugin picker and search for `Patchman`, or point it directly at `~/.codex/plugins/patchman`.
9061

91-
### Repo metadata for marketplace-style installs
62+
---
9263

93-
- Claude-style marketplace metadata: [`.claude-plugin/marketplace.json`](./.claude-plugin/marketplace.json)
94-
- Codex-style marketplace metadata: [`.agents/plugins/marketplace.json`](./.agents/plugins/marketplace.json)
95-
- Packaged Codex plugin manifest: [`plugins/patchman/.codex-plugin/plugin.json`](./plugins/patchman/.codex-plugin/plugin.json)
96-
97-
## Example Commands
64+
## Review Modes
9865

99-
- `/security-audit focus=full severity>=medium output=report`
100-
- `/auth-review area=login,session,reset`
101-
- `/bizlogic-review feature=billing-upgrade workflow=invite-approval`
102-
- `/api-review surface=public-api include=authz,rate-limit,headers`
103-
- `/query-review path=app/models include=n-plus-one,tenant-scope`
104-
- `/pr-diff-review base=main head=feature/auth-refactor`
105-
- `/quick-triage path=admin/ reason=pre-release`
106-
- `/threat-model feature=file-import`
107-
- `/audit-report format=engineering-summary`
66+
| Mode | Command |
67+
|---|---|
68+
| Full security audit | `/security-audit focus=full severity>=medium output=report` |
69+
| Auth review | `/auth-review area=login,session,reset` |
70+
| Business logic review | `/bizlogic-review feature=billing-upgrade workflow=invite-approval` |
71+
| API review | `/api-review surface=public-api include=authz,rate-limit,headers` |
72+
| ORM / data-access review | `/query-review path=app/models include=n-plus-one,tenant-scope` |
73+
| PR diff review | `/pr-diff-review base=main head=feature/auth-refactor` |
74+
| Quick triage | `/quick-triage path=admin/ reason=pre-release` |
75+
| Threat modeling | `/threat-model feature=file-import` |
76+
| Audit report | `/audit-report format=engineering-summary` |
77+
78+
---
79+
80+
## What Patchman Detects
81+
82+
- OWASP Top 10 classes with code-level evidence
83+
- Broken authentication, authorization, and session management
84+
- IDOR and tenant isolation failures
85+
- Business logic gaps and approval bypasses
86+
- SSRF, XSS, CSRF, injection, and insecure deserialization
87+
- Secret leakage and sensitive data in logs
88+
- Unsafe file upload handling
89+
- Weak headers, insecure defaults, and risky cryptography
90+
- Missing rate limiting and anti-abuse controls
91+
- ORM misuse, N+1 query issues, and cross-tenant data access
92+
- Admin path, webhook, queue, and background job vulnerabilities
93+
94+
---
10895

10996
## Example Prompts
11097

111-
```text
112-
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.
98+
**Full audit**
11399
```
114-
115-
```text
116-
Review only the password reset flow. Focus on token lifetime, replay, host header trust, user enumeration, and session invalidation after reset.
100+
Run a full security audit on this repo. Prioritize broken access control, unsafe defaults,
101+
tenant isolation, secret handling, and exploitable auth issues. Use the Patchman findings format.
117102
```
118103

119-
```text
120-
Audit this pull request as a defensive security reviewer. Flag regressions, rank by severity and confidence, and suggest minimal safe patches.
104+
**Targeted review**
121105
```
122-
123-
```text
124-
Check the ORM layer for N+1 issues that become security problems under multi-tenant load or leak cross-tenant metadata.
106+
Review only the password reset flow. Focus on token lifetime, replay attacks, host header
107+
trust, user enumeration, and session invalidation after reset.
125108
```
126109

127-
## Safety Posture
110+
**PR review**
111+
```
112+
Audit this pull request as a defensive security reviewer. Flag regressions, rank by severity
113+
and confidence, and suggest minimal safe patches.
114+
```
128115

129-
`patchman` is for authorized defensive auditing only.
116+
---
130117

131-
It refuses:
118+
## Findings Format
132119

133-
- unauthorized intrusion
134-
- exploit weaponization
135-
- credential harvesting
136-
- malware, persistence, or stealth guidance
137-
- destructive payloads or service disruption
138-
- live attack chains beyond high-level defensive explanation
120+
Every finding includes:
139121

140-
It does support:
122+
- **Evidence** — specific code or configuration reference
123+
- **Severity** — based on blast radius and realistic abuse conditions
124+
- **Confidence** — drops when context is incomplete
125+
- **Remediation** — specific enough to implement directly
141126

142-
- secure code review
143-
- architecture review
144-
- configuration review
145-
- safe exploitability analysis in plain language
146-
- remediation planning and patch guidance
127+
---
147128

148-
## Limitations
129+
## Scope and Limitations
149130

150-
- It infers risk from code, config, framework conventions, and diffs; it does not replace runtime validation.
151-
- It can overestimate exploitability when repository context is incomplete.
152-
- It will ask for missing deployment, proxy, tenant, or identity-boundary context when evidence is thin.
153-
- It is intentionally conservative about offensive detail.
131+
Patchman is for **authorized defensive auditing only**.
154132

155-
## Evaluation Philosophy
133+
**In scope:** secure code review, architecture review, configuration review, exploitability analysis in plain language, remediation planning
156134

157-
Patchman optimizes for signal over theater.
135+
**Out of scope:** unauthorized intrusion, exploit weaponization, credential harvesting, malware or persistence guidance, destructive payloads, live attack chains
158136

159-
- Findings must cite code or configuration evidence.
160-
- Severity must reflect blast radius and realistic abuse conditions.
161-
- Confidence must drop when important context is missing.
162-
- Remediations must be specific enough to implement.
163-
- False positives should be easy to dismiss with explicit assumptions.
137+
Patchman infers risk from static code and configuration. It does not replace runtime validation and will request missing deployment, proxy, or identity-boundary context when evidence is insufficient.
164138

165-
See [evals/README.md](./evals/README.md) and [docs/false-positive-handling.md](./docs/false-positive-handling.md).
139+
---
166140

167-
## Repo Layout
141+
## Repository Structure
168142

169-
```text
143+
```
170144
patchman/
171-
├── .agents/plugins/marketplace.json
172145
├── .claude-plugin/
173-
├── .codex/
174-
├── .cursor/
175-
├── .github/workflows/
176-
├── benchmarks/
146+
├── .agents/plugins/
177147
├── commands/
178148
├── docs/
179149
├── evals/
180150
├── hooks/
181151
├── plugins/patchman/
182152
├── rules/
183153
├── skills/
184-
├── tests/
185-
├── AGENTS.md
186-
├── CLAUDE.md
187-
├── CONTRIBUTING.md
188-
├── LICENSE
189-
├── README.md
190154
└── patchman.skill
191155
```
192156

157+
---
158+
193159
## Contributing
194160

195-
Open an issue or PR with one of these:
161+
Contributions welcome. Open a PR with any of the following:
162+
163+
- New defensive review heuristics
164+
- Framework-specific false positive reductions
165+
- Safer remediation examples
166+
- Eval fixtures with expected findings
167+
- Packaging improvements for Claude or Codex
168+
169+
See [CONTRIBUTING.md](./CONTRIBUTING.md) to get started.
170+
171+
---
196172

197-
- new defensive review heuristics
198-
- safer remediation examples
199-
- framework-specific false positive reductions
200-
- eval fixtures with clear expected findings
201-
- packaging improvements for Claude/Codex compatibility
173+
## License
202174

203-
Start with [CONTRIBUTING.md](./CONTRIBUTING.md).
175+
See [LICENSE](./LICENSE).

0 commit comments

Comments
 (0)