Skip to content

Commit f44fd7d

Browse files
committed
docs: SEO-optimize README with badges, keyword-rich headings, and intro paragraph
1 parent 052cfea commit f44fd7d

1 file changed

Lines changed: 97 additions & 82 deletions

File tree

README.md

Lines changed: 97 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,34 @@
11
<p align="center">
2-
<img src="docs/images/hero.png" alt="Bug Hunter — Adversarial Bug Finding for Coding Agents" width="720">
2+
<img src="docs/images/hero.png" alt="Bug Hunter — AI-powered adversarial code review and security vulnerability scanner for Claude Code, Cursor, Codex, Copilot, Windsurf, and Kiro" width="720">
33
</p>
44

55
<h1 align="center">Bug Hunter</h1>
6-
<p align="center"><strong>Three AI agents argue about your code. Only bugs that survive all three make the report.</strong></p>
6+
<p align="center"><strong>AI code review that argues with itself — adversarial multi-agent bug finding, security scanning, and auto-fix for any coding agent.</strong></p>
7+
8+
<p align="center">
9+
<a href="https://www.npmjs.com/package/@codexstar/bug-hunter"><img src="https://img.shields.io/npm/v/@codexstar/bug-hunter" alt="npm version"></a>
10+
<a href="https://github.com/codexstar69/bug-hunter/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@codexstar/bug-hunter" alt="MIT License"></a>
11+
<img src="https://img.shields.io/badge/tests-113%20passing-brightgreen" alt="113 tests passing">
12+
<img src="https://img.shields.io/badge/node-%3E%3D18-blue" alt="Node.js >= 18">
13+
</p>
14+
715
<p align="center">
816
<a href="#install">Install</a> ·
9-
<a href="#usage">Usage</a> ·
10-
<a href="#how-it-works">How It Works</a> ·
11-
<a href="#what-it-finds">What It Finds</a> ·
12-
<a href="#auto-fix-pipeline">Auto-Fix</a> ·
13-
<a href="#cli-reference">CLI Reference</a>
17+
<a href="#quick-start">Quick Start</a> ·
18+
<a href="#how-adversarial-ai-code-review-works">How It Works</a> ·
19+
<a href="#bugs-and-vulnerabilities-detected">What It Finds</a> ·
20+
<a href="#safe-auto-fix-with-canary-rollout">Auto-Fix</a> ·
21+
<a href="#cli-flags">CLI Reference</a>
1422
</p>
1523

1624
---
1725

26+
Bug Hunter is an open-source AI code review and security vulnerability scanner that works as a skill/plugin for AI coding agents. Three AI agents — a Hunter, a Skeptic, and a Referee — independently analyze your code in an adversarial pipeline. The Hunter finds bugs. The Skeptic tries to disprove them. The Referee delivers the final verdict. Only bugs that survive all three stages make the report, eliminating the false positive overload that plagues other AI code review tools.
27+
28+
It then auto-fixes confirmed bugs with a safe canary rollout pipeline — git branching, test baselines, per-fix commits, automatic rollback on failure, and post-fix re-scanning.
29+
30+
---
31+
1832
## Install
1933

2034
```bash
@@ -29,158 +43,161 @@ bug-hunter install # auto-detects your IDE/agent
2943
bug-hunter doctor # verify environment
3044
```
3145

32-
Or clone manually:
46+
Or clone:
3347

3448
```bash
3549
git clone https://github.com/codexstar69/bug-hunter.git ~/.agents/skills/bug-hunter
3650
```
3751

3852
> **Requirements:** Node.js 18+ recommended. Core pipeline works without it.
3953
>
40-
> **Works with:** Claude Code, Cursor, Codex CLI, Windsurf, Kiro, Copilot, Opencode, [Pi](https://github.com/mariozechner/pi-coding-agent) — or any AI agent that can read files and run shell commands.
54+
> **Compatible with:** Claude Code, Cursor, Codex CLI, Windsurf, Kiro, Copilot, Opencode, [Pi](https://github.com/mariozechner/pi-coding-agent) — or any AI agent that can read files and run shell commands.
4155
4256
---
4357

44-
## Usage
58+
## Quick Start
4559

4660
```bash
4761
/bug-hunter # scan project, auto-fix confirmed bugs
4862
/bug-hunter src/ # scan a specific directory
4963
/bug-hunter --scan-only src/ # report only, no code changes
50-
/bug-hunter --pr # review the current PR
64+
/bug-hunter --pr # review the current pull request
5165
/bug-hunter --pr-security # PR security review + threat model + CVEs
52-
/bug-hunter -b feature-xyz # scan files changed in branch vs main
53-
/bug-hunter --deps --threat-model # full audit: CVEs + STRIDE threat model
66+
/bug-hunter --deps --threat-model # full security audit
5467
```
5568

5669
---
5770

58-
## How It Works
71+
## How Adversarial AI Code Review Works
5972

6073
<p align="center">
61-
<img src="docs/images/pipeline-overview.png" alt="Bug Hunter pipeline" width="100%">
74+
<img src="docs/images/pipeline-overview.png" alt="Bug Hunter adversarial AI code review pipeline — triage, recon, deep scan, skeptic challenge, referee verdict, auto-fix with canary rollout" width="100%">
6275
</p>
6376

6477
```
6578
Triage → Recon → Hunter → Skeptic → Referee → Fix Plan → Fixer → Verify
6679
(<2s) ↕ doc verify ↕ doc verify
6780
```
6881

69-
1. **Triage** classifies every file by risk in <2 seconds (zero AI cost)
70-
2. **Recon** maps the tech stack and attack surfaces
71-
3. **Hunter** deep-scans for logic errors, security holes, race conditions
72-
4. **Skeptic** tries to *disprove* every finding with counter-evidence
73-
5. **Referee** re-reads the code independently and delivers final verdicts
74-
6. **Fixer** applies canary-first patches with per-fix rollback
82+
1. **Triage** classifies every file by risk in <2 seconds, zero AI tokens
83+
2. **Recon** maps tech stack, auth mechanisms, attack surfaces
84+
3. **Hunter** deep behavioral scan for logic errors, security vulnerabilities, race conditions
85+
4. **Skeptic** — adversarial review that tries to *disprove* every finding with counter-evidence
86+
5. **Referee** — independent final judge, re-reads code, delivers CVSS-scored verdicts
87+
6. **Fixer** applies canary-first patches with per-fix rollback safety
7588

76-
The adversarial debate between Hunter, Skeptic, and Referee eliminates false positives. The canary rollout with auto-revert prevents regressions from fixes.
89+
Claims are verified against official library documentation via [Context Hub](https://github.com/andrewyng/context-hub) + [Context7](https://context7.com) before any agent asserts framework behavior.
7790

7891
<p align="center">
79-
<img src="docs/images/adversarial-debate.png" alt="Hunter vs Skeptic vs Referee" width="100%">
92+
<img src="docs/images/adversarial-debate.png" alt="Adversarial AI code review debate — Hunter finds bugs, Skeptic challenges with counter-evidence, Referee delivers independent verdict" width="100%">
8093
</p>
8194

82-
| Agent | Earns Points For | Loses Points For |
83-
|-------|-----------------|-----------------|
84-
| **Hunter** | Reporting real bugs | False positives |
85-
| **Skeptic** | Disproving false positives | Dismissing real bugs (2x penalty) |
86-
| **Referee** | Accurate verdicts | Blind trust in either side |
95+
| Agent | Rewarded For | Penalized For |
96+
|-------|-------------|--------------|
97+
| **Hunter** | Confirmed real bugs | False positives |
98+
| **Skeptic** | Disproving false positives | Missing real bugs (2x penalty) |
99+
| **Referee** | Accurate independent verdicts | Blind trust in either side |
87100

88101
---
89102

90-
## What It Finds
103+
## Bugs and Vulnerabilities Detected
91104

92105
**Runtime behavioral bugs only** — not style, naming, or TODOs:
93106

94-
- Logic errors, off-by-one, inverted conditions
95-
- SQL injection, XSS, path traversal, IDOR, auth bypass, SSRF
96-
- Race conditions, TOCTOU, deadlocks
97-
- Swallowed exceptions, unhandled rejections
98-
- Data integrity issues, resource leaks, API contract violations
107+
- **Security** — SQL injection, XSS, command injection, path traversal, IDOR, auth bypass, SSRF
108+
- **Logic** — wrong comparisons, off-by-one, inverted conditions, unreachable branches
109+
- **Concurrency** — race conditions, TOCTOU, deadlocks
110+
- **Error handling** — swallowed exceptions, unhandled promise rejections
111+
- **Data integrity** — silent truncation, encoding corruption, resource leaks
112+
- **API contracts** — type mismatches, incorrect callback signatures
99113

100-
Every security finding gets **STRIDE classification**, **CWE ID**, and **CVSS 3.1 scoring** with proof-of-concept payloads for Critical/High findings.
114+
Every security finding gets **STRIDE classification**, **CWE ID**, and **CVSS 3.1 scoring** with proof-of-concept payloads.
115+
116+
### Supported Languages and Frameworks
101117

102118
**Languages:** TypeScript, JavaScript, Python, Go, Rust, Java, Kotlin, Ruby, PHP
103119

104-
**Frameworks:** Express, Next.js, Django, Flask, FastAPI, Gin, Spring Boot, Rails, Laravel, and anything indexed by Context7 for doc verification.
120+
**Frameworks:** Express, Next.js, Django, Flask, FastAPI, Gin, Spring Boot, Rails, Laraveland any framework with docs in Context7.
105121

106122
---
107123

108-
## Auto-Fix Pipeline
124+
## Safe Auto-Fix with Canary Rollout
109125

110-
When bugs are confirmed, the Fixer doesn't just edit files — it engineers patches:
126+
When bugs are confirmed, the Fixer engineers patches — not just edits:
111127

112-
1. **Git branch** — dedicated `bug-hunter-fix-*` branch with restore point
128+
1. **Git branch** — dedicated fix branch with restore point
113129
2. **Test baseline** — captures passing tests before any edits
114-
3. **Strategy classification**clusters bugs into safe-autofix / manual-review / larger-refactor / architectural
115-
4. **Confidence gate** — only fixes bugs the Referee confirmed at >=75% confidence
116-
5. **Canary rollout** — top 1-3 Critical bugs fixed first; if they break tests, pipeline halts
117-
6. **Per-fix checkpoint** — each fix is committed individually; failures auto-revert
118-
7. **Post-fix re-scan**checks if the Fixer introduced new bugs
130+
3. **Strategy**classifies each bug: safe-autofix / manual-review / larger-refactor / architectural
131+
4. **Confidence gate** — only auto-fixes bugs confirmed at >=75% confidence
132+
5. **Canary rollout** — top 1-3 Critical bugs fixed first; if tests break, pipeline halts
133+
6. **Per-fix checkpoint** — each fix committed individually; failures auto-revert
134+
7. **Post-fix re-scan**catches bugs the Fixer itself introduced
119135

120-
Use `--plan-only` to see the strategy without executing fixes. Use `--dry-run` to preview diffs.
136+
`--plan-only` to see the strategy. `--dry-run` to preview diffs. `--safe` to approve each fix.
121137

122138
---
123139

124-
## Security Features
140+
## Security Scanning Features
125141

126-
- `--threat-model` — generates STRIDE threat model saved to `.bug-hunter/threat-model.md`
127-
- `--deps` — scans npm/pip/go/cargo/bun lockfiles for HIGH/CRITICAL CVEs with reachability analysis
128-
- `--pr-security` — PR-scoped security review with threat model + dependency context
129-
- `--security-review` — enterprise security workflow with full validation pipeline
142+
| Flag | Capability |
143+
|------|-----------|
144+
| `--threat-model` | STRIDE threat model generation |
145+
| `--deps` | Dependency CVE scanning (npm, pip, go, cargo, bun) with reachability analysis |
146+
| `--pr-security` | PR-scoped security review with threat model + CVE context |
147+
| `--security-review` | Enterprise security audit workflow |
148+
| `--validate-security` | Exploitability validation with CVSS scoring |
130149

131150
Bundled security skills: `commit-security-scan`, `security-review`, `threat-model-generation`, `vulnerability-validation`.
132151

133152
---
134153

135-
## CLI Reference
154+
## CLI Flags
136155

137156
| Flag | Behavior |
138157
|------|----------|
139158
| *(no flags)* | Scan + auto-fix confirmed bugs |
140159
| `src/` or `file.ts` | Scan specific path |
141160
| `--scan-only` / `--review` | Report only, no edits |
142-
| `--fix --approve` / `--safe` | Ask before each fix |
143-
| `--plan-only` / `--plan` | Generate fix strategy, don't edit |
161+
| `--fix --approve` / `--safe` | Approve each fix interactively |
162+
| `--plan-only` / `--plan` | Generate fix strategy without editing |
144163
| `--dry-run` / `--preview` | Preview fixes as diffs |
145164
| `-b branch` | Scan branch diff vs main |
146-
| `--pr` / `--pr 123` / `--pr recent` | Review a PR |
147-
| `--pr-security` | PR security review |
148-
| `--staged` | Scan staged files (pre-commit) |
165+
| `--pr` / `--pr 123` / `--pr recent` | Review a pull request |
166+
| `--staged` | Scan staged files (pre-commit hook) |
149167
| `--deps` | Dependency CVE scan |
150168
| `--threat-model` | STRIDE threat model |
151-
| `--security-review` | Enterprise security workflow |
152-
| `--no-loop` | Single-pass (loop is on by default) |
169+
| `--no-loop` | Single-pass scan (loop is on by default) |
153170
| `--autonomous` | Zero-intervention auto-fix |
154171

155172
All flags compose: `/bug-hunter --deps --threat-model --fix src/`
156173

157174
---
158175

159-
## Output
176+
## Output Files
160177

161178
Every run creates `.bug-hunter/` (add to `.gitignore`):
162179

163-
| File | Contents |
164-
|------|----------|
165-
| `findings.json` | Machine-readable findings for CI/CD |
180+
| File | Purpose |
181+
|------|---------|
182+
| `findings.json` | Machine-readable findings (CI/CD gating, dashboards) |
166183
| `report.md` | Human-readable report |
167-
| `referee.json` | Final verdicts with CVSS scores |
168-
| `fix-strategy.json` | Remediation plan (safe-autofix vs manual-review vs refactor) |
169-
| `fix-plan.json` | Execution plan with canary rollout |
170-
| `fix-report.json` | Fix results for CI/CD gating |
171-
| `triage.json` | File classification and risk map |
172-
| `threat-model.md` | STRIDE threat model (if `--threat-model`) |
173-
| `dep-findings.json` | Dependency CVEs (if `--deps`) |
184+
| `referee.json` | Final verdicts with CVSS scores and PoC payloads |
185+
| `fix-strategy.json` | Remediation classification |
186+
| `fix-plan.json` | Canary rollout execution plan |
187+
| `fix-report.json` | Fix results |
188+
| `triage.json` | File risk classification |
189+
| `threat-model.md` | STRIDE threat model |
190+
| `dep-findings.json` | Dependency CVE results |
174191

175192
---
176193

177194
## Self-Test
178195

179-
Ships with 6 planted bugs in `test-fixture/` and **113 regression tests**:
196+
Ships with 6 planted bugs and **113 regression tests**:
180197

181198
```bash
182-
/bug-hunter test-fixture/ # validate pipeline finds all 6 bugs
183-
npm test # run regression suite
199+
/bug-hunter test-fixture/ # validate pipeline
200+
npm test # run test suite
184201
```
185202

186203
---
@@ -189,16 +206,14 @@ npm test # run regression suite
189206

190207
```
191208
bug-hunter/
192-
├── SKILL.md # Pipeline orchestration logic
193-
├── bin/bug-hunter # CLI (install, doctor, info)
194-
├── skills/ # Agent skills (hunter, skeptic, referee, fixer, recon, + 4 security)
195-
├── modes/ # Execution strategies (single-file → large-codebase, loop, fix)
196-
├── schemas/ # JSON artifact contracts
197-
├── scripts/ # Node.js helpers (triage, state, locking, worktrees, experiments)
198-
│ ├── shared.cjs # Shared utilities
199-
│ └── tests/ # 113 tests
200-
├── templates/ # Subagent dispatch template
201-
└── test-fixture/ # 6 planted bugs for validation
209+
├── SKILL.md # Pipeline orchestration
210+
├── bin/bug-hunter # CLI installer
211+
├── skills/ # 10 agent skills (hunter, skeptic, referee, fixer, recon, + 5 more)
212+
├── modes/ # Execution strategies (single-file → large-codebase)
213+
├── schemas/ # JSON artifact contracts
214+
├── scripts/ # Node.js helpers + 113 tests
215+
├── templates/ # Subagent dispatch template
216+
└── test-fixture/ # 6 planted bugs for validation
202217
```
203218

204219
---

0 commit comments

Comments
 (0)