Bug Hunter
An adversarial code-audit skill for AI coding agents: a multi-role pipeline finds security vulnerabilities, logic errors, and runtime bugs — scan-only by default, with fixing gated behind explicit permission.
- Source repo
- codexstar69/bug-hunter
- Stars
- ★ 557
- Last updated
- 12d ago
- License
- MIT
- Primary language
- JavaScript
- FA score
- 76/100 · Good
At a glance
- How it runs
- Works with
- Universal · cross-platformCodex · Claude CodeClaude.ai (Unsupported)
- Cost
- Free software; you pay for model usage
- Setup effort
- Low · running in minutes
- You'll need
- Typical use
- A development team wanting a read-only security and logic audit of an entire repository before release without letting the AI touch code — just run /bug-hunter.
- Not a fit if
- Teams wanting a standalone CLI scanner: scans start through an installed coding agent
- Projects needing Python, Go, or Rust dependency CVE auditing: those return scanner-unsupported
- Token-budget-sensitive large repos: benchmark median is ~12,090 tokens per true positive
- Maintenance
- Commits in the last 30 dayslast commit 2026-10-29latest release v3.2.1 (2026-10-29)+1.1 ★/day over 7 days
- Source review
- 76/100 · Good
What does this agent do, and when should you use it?
Bug Hunter is an installable code-audit skill for file-based AI coding agents including Claude Code, Codex, Cursor, GitHub Copilot, Kiro, Windsurf, OpenCode, and Factory Droid CLI. Its pipeline combines deterministic risk triage, architecture recon, and hypothesis-driven retrieval with three adversarial roles: a Hunter makes evidence-backed bug claims, a Skeptic tries to disprove each one, and a Referee issues REAL_BUG, NOT_A_BUG, or MANUAL_REVIEW verdicts. The default run is scan-only and single-pass; source edits, autonomous fixing, and commits each require separate explicit permission. Every phase writes schema-validated JSON artifacts under .bug-hunter/, consumable by CI/CD, security dashboards, and PR gates. v3.2.0 adds a measurable quality gate covering precision, recall, F1, calibration, and repeat stability, plus fast/balanced/assurance adaptive execution profiles. The fix workflow uses canary-first rollout, inter-batch verification, a failure-rate circuit breaker, and rollback on a dedicated fix branch.
The installed skill is invoked through your coding agent (e.g. sending /bug-hunter src/auth), not by running a scan in a shell. First scripts/triage.cjs performs a deterministic, model-free risk triage that selects scan scope and order. Recon maps the stack, architecture, and trust boundaries; the Hunter reads production code for reachable bugs — wrong conditions, off-by-one errors, races, injection, XSS, SSRF, path traversal, resource leaks — and every claim must carry a source location, evidence, and a runtime trigger. The Skeptic re-traces code with 14 hard exclusions for recurring non-bugs; the Referee independently re-verifies and delivers verdicts, enriching Critical/High security findings with STRIDE category, CWE identifiers, and CVSS 3.1 vectors. Hybrid verification runs argv-only tests, type checks, static checks, and fuzz checks, failing closed when required checks fail. Optional flags extend scope: --deps scans npm/pnpm/Yarn/Bun lockfiles for CVEs with reachability classification, --threat-model generates a STRIDE threat model, and --pr/--pr-security audit pull requests and changed code. Confirmed findings are classified in fix-strategy.json as safe-autofix, manual-review, etc.; --plan produces a fix plan without edits, while --fix --approve executes canary fixes with batch verification and rollback on a dedicated branch, recording results in fix-report..
- A development team wanting a read-only security and logic audit of an entire repository before release without letting the AI touch code — just run /bug-hunter.
- An engineer reviewing pull requests who uses --pr or --pr-security to narrow the audit to the diff about to merge, with STRIDE and dependency context.
- A JavaScript/TypeScript team using --deps to scan npm, pnpm, Yarn, or Bun lockfiles for high/critical CVEs and classify reachability.
- A security lead who needs a STRIDE threat model before launch, generated via --threat-model into .bug-hunter/threat-model.md with trust boundaries, assets, and threats.
- A developer who wants reviewed, automated fixes for confirmed bugs using --fix --approve, getting a verified canary rollout with rollback on a fix branch.
- A team wiring audit results into CI/CD gates or security dashboards by consuming machine-readable artifacts like .bug-hunter/scan-report..
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Config files
scan-report.json- Runtime
- Node.js 22
How do you install or deploy this agent?
Requires Node.js 22 or newer and a supported file-based coding agent. Install from the current GitHub source (matches the docs): npx --yes https://github.com/codexstar69/bug-hunter/archive/refs/heads/main.tar.gz install --agent codex, replacing --agent with claude-code, codex, cursor, copilot, kiro, windsurf, opencode, droid, or agents. Then verify: npx --yes https://github.com/codexstar69/bug-hunter/archive/refs/heads/main.tar.gz doctor --agent codex. For the latest published npm release (may lag GitHub main): npm exec --yes --package=@codexstar/bug-hunter@latest -- bug-hunter install --agent codex. Always pass --agent explicitly when multiple coding agents are installed. Restart the agent if it was open during installation. Removal is manual.
How do you use this agent?
From the repository you want to audit, send a natural-language prompt through your coding agent, e.g.: "Use the bug-hunter skill to scan this repository. Do not edit files. Return the final report and call out every item that needs manual review." That is the recommended first run — scan-only and single-pass. Slash-command syntax also works: /bug-hunter (full repo, one pass), /bug-hunter src/auth (specific path), --staged, --pr, --pr-security, --deps, --threat-model, --plan (plan without edits), --fix --approve (reviewed fixes), --loop (complete queued coverage). No flags means scan-only; --autonomous and --auto-commit grant unattended fixing and commit permission respectively and should be used deliberately. Results are written to .bug-hunter/ (add it to .gitignore), with scan-report.json and report.md as the primary outputs.
What are this agent's strengths and limitations?
- The adversarial Hunter/Skeptic/Referee structure, plus hard evidence requirements and the Skeptic's 14 exclusions, systematically cuts false positives; unsettled results surface explicitly as MANUAL_REVIEW instead of looking clean.
- Scan-only by default with fixing and committing as separate, explicitly granted permissions; the fix path adds a dedicated branch, canary rollout, batch verification, a circuit breaker, and rollback — fail-closed throughout.
- Every phase emits schema-validated JSON artifacts (scan-report.json, fix-plan.json, etc.) that plug directly into CI/CD, PR gates, and security dashboards.
- One skill covers source auditing across 14 languages plus STRIDE threat modeling, npm/pnpm/Yarn/Bun dependency CVE scanning, and PR/change review, installable into eight or more coding agents.
- Ships a deterministic regression benchmark fixture and quality gate (precision, recall, F1, calibration, stability) verifiable via pnpm quality:world-class.
- It depends on an already-installed file-based coding agent as the runtime; it is not a standalone CLI scanner, and scans start through the agent rather than a bug-hunter scan command.
- Dependency auditing only supports JavaScript/TypeScript (npm, pnpm, Yarn, Bun lockfiles); Python, Go, and Rust return scanner-unsupported and are never reported clean.
- Requires Node.js 22+, and larger scans consume significant model tokens (the benchmark fixture records a median of ~12,090 tokens per true positive), so heavy use has real cost.
- Automatic rollback requires commit-backed checkpoints; runs without commit permission may need manual restoration, and line-range, symlink, and submodule compliance is not independently verified after a patch.
- Autonomous-fix flags (--autonomous, --auto-commit) carry sensitive authority boundaries; the project advises reading SECURITY.md before autonomous fixing in a sensitive repository, and misuse can broaden write access.
How does this agent compare with similar options?
The README contrasts Bug Hunter with generic AI code-review tools and security scanners that produce long lists of candidate issues for developers to triage themselves: its differentiator is that every finding must survive a Skeptic challenge and an independent Referee verdict, with uncertain results shown explicitly rather than presented as clean. No specific competitors are named.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| Bug Hunter This agent | 76 · Good | Agent plugin / skillFree + model costs | ★ 557 | 12d ago | JavaScript | Codex · Claude Code |
| OpenCode Swarm | 53 · Major gaps | Agent plugin / skillFree + model costs | ★ 522 | 1d ago | TypeScript | — |
| Deepsec Security Scanner | 73 · Some gaps | CLIFree + model costs | ★ 8.4k | 4d ago | TypeScript | OpenAI API |
| ECC Engineering Harness | 63 · Some gaps | Agent plugin / skillFreemium | ★ 301k | 2d ago | JavaScript | Codex · Claude Code |
How does FollowAgents rate this agent?
Why each dimension lost points
SKILL.md limits defaults to scan-only, single-pass behavior and requires explicit intent for loops, edits, or commits. Fixer scope is limited to Referee-confirmed findings authorized by an immutable scope manifest, supporting high least-privilege and confirmation scores. README, the usage guide, and SECURITY.md describe artifacts, trust boundaries, and a vulnerability-reporting channel. The packet does not detail every data-transfer path, secret-handling practice, or external command execution path, so those criteria lose points. Dependency-security evidence is limited to the Node requirement, a small set of development dependencies, and lockfile-install guidance. Fix verification and rollback safeguards are described but not fully evidenced here. Repository and security contact attribution are visible, but publisher identity remains unknown.
README, SKILL.md, and package scripts describe structured artifacts, coverage states, and fail-closed handling of verification failures. However, README says v3.2.0, package.json says 3.2.1, and installation docs say npm latest was 3.0.8 as of 2026-10-29, reducing self-consistency. Node 22+, a pinned pnpm version, optional Context Hub, and a Context7 fallback document some dependency conditions and alternatives; the product still depends on a host coding agent and external documentation services. Missing or malformed artifacts, unsupported scanners, and verification failures have described handling, but the packet does not show full error-message behavior.
The docs cover code audits, security reviews, PRs, dependency scans, threat modeling, plans, and fixes, with installation targets and both natural-language and command examples for multiple agents. Boundaries for read-only versus mutation behavior, scope, role authority, and unsupported dependency ecosystems are explicit; trigger descriptions are focused on code review and security defects. Environment fit is limited by Node 22+, Git for some workflows, and the requirement for an agent that can read skill files and run checks.
README, skill files, installation, getting-started, usage, security policy, and license have clear roles. Install, update, verification, removal, workflows, examples, and known limitations are documented well. The MIT license text is complete. Naming is mostly stable, but version claims conflict; the provided excerpts do not include changelog content that can be checked. Repository details, a security-reporting channel, and maintenance workflow are visible, but publisher identity is unverified, so responsibility and update attribution are incomplete.
The Hunter, Skeptic, and Referee roles, canonical JSON artifacts, reports, and unresolved-result categories are designed to support review and workflow integration. The docs describe measurable benchmarks, retrieval, and verification, but explicitly limit the cited metrics to the bundled fixture; they do not establish general performance on real repositories. Independent evidence for marginal improvement over ordinary review, or for the balance between model cost, latency, and benefit, is limited.
Many claims point to scripts, schemas, artifact names, workflows, and explicit decision rules. README distinguishes bundled-fixture metrics from independent benchmarking, and the docs generally separate claims from limitations. The packet is mostly documentation, package metadata, and CI configuration; it omits most runtime source and complete test results, so cross-source corroboration is partial. Conflicting version claims also weaken traceability to the current release.
- Version information conflicts: README identifies v3.2.0, package.json says 3.2.1, and the installation guide records npm latest as 3.0.8 as of 2026-10-29. Confirm which release corresponds to the target revision.
- Benchmark figures describe the bundled deterministic regression fixture; they are not independent evidence of performance on real repositories or models.
- This assessment uses limited static materials and did not execute installation, scans, or tests; runtime behavior remains to be verified as needed.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
Release notes excerpt
Bug Hunter 3.2.1 is the npm release of [3.2.0](https://github.com/codexstar69/bug-hunter/releases/tag/v3.2.0). It contains all of 3.2.0's changes plus three fixes. The 3.2.0 publish run stopped before npm, so 3.2.0 was never published there. Fixed - npm 12 package check. The publish job now passes with npm 12. npm 12 changed the format of npm pack --json output, and pnpm verify:package failed to read it. It now reads both the old and the new format. …View on GitHub ↗ -
v3.2.0 v3.2.0 — Leaner, faster, fail-closed
Release notes excerpt
Bug Hunter 3.2.0 makes the skill cheaper to load and faster to run. It also makes verification safer and the benchmark honest. Highlights (measured on this repo) - Less instruction text before any source is read. It drops 59–63% in the delegated modes and 29% in local-sequential: | Mode | Before (bytes) | After (bytes) | |---|---|---| | small scan | 70,170 | 26,103 | | single-file | 59,059 | 24,130 | | large-codebase | 77,859 | 29,499 | | local-sequential | 65,559 | 46,833 | Role skills shrink from 51,815 to 42,811 bytes. …View on GitHub ↗ -
v3.1.0 v3.1.0 — Complete Safety and Reliability Hardening
Release notes excerpt
Complete end-to-end audit remediation for Bug Hunter. - Scan-only, single-pass defaults with explicit fix, autonomous, and commit authority - Fail-closed worktree, installer, lock, process, state, and release safeguards - Canonical validated artifacts and Referee-only Fixer authorization - Complete triage, dependency, delta, indexing, evaluation, and packaging proof - 167 regression tests across Node.js 22 and 24 See CHANGELOG.md for the complete release details.View on GitHub ↗
FAQ
Will a scan modify my code?
How does it avoid the usual flood of AI-review false positives?
Which languages and package managers are supported?
Can an automated fix break my repository?
What does a scan cost?
Is Bug Hunter open source?
Is Bug Hunter safe to use?
Is Bug Hunter still maintained?
Who makes Bug Hunter?
Thanks — we use this to improve the page.