Metadata-Version: 2.4
Name: rhodawk-bounty-hunter
Version: 2.3.1
Summary: RhodawkAI Bounty Hunter — AI-powered bug bounty hunting, recon to report, in your terminal.
Author-email: RhodawkAI <no-reply@rhodawkai.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/Rhodawk-AI/rhodawk-bounty-hunter
Project-URL: Website, https://rhodawkai.com
Project-URL: Repository, https://github.com/Rhodawk-AI/rhodawk-bounty-hunter
Project-URL: Issues, https://github.com/Rhodawk-AI/rhodawk-bounty-hunter/issues
Keywords: security,bug-bounty,recon,pentest,ai-agent,mcp,rhodawkai
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Operating System :: POSIX
Classifier: Environment :: Console
Classifier: Topic :: Security
Classifier: Intended Audience :: Developers
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: requests>=2.34.2
Requires-Dist: mcp>=2.2.0
Provides-Extra: test
Requires-Dist: pytest>=8.4.2; extra == "test"
Provides-Extra: proxy
Requires-Dist: mitmproxy>=10.0.0; extra == "proxy"
Requires-Dist: dnspython>=2.6.0; extra == "proxy"
Provides-Extra: agent
Requires-Dist: ollama>=0.4; extra == "agent"
Dynamic: license-file

<div align="center">

<img src="https://raw.githubusercontent.com/Rhodawk-AI/rhodawk-bounty-hunter/main/assets/rhodawk_banner.png" alt="RhodawkAI Bounty Hunter" width="100%"/>

<img src="https://raw.githubusercontent.com/Rhodawk-AI/rhodawk-bounty-hunter/main/assets/rhodawk-typing.svg" alt="Typing tagline animation" width="820"/>

🛡️ **AI-powered bug bounty hunting — recon to report, in your terminal.**
🔒 Fail-closed · 🌐 CDN-aware · ⚙️ Deterministic · 🔓 Zero closed-model lock-in.

[![CI](https://github.com/Rhodawk-AI/rhodawk-bounty-hunter/actions/workflows/ci.yml/badge.svg)](https://github.com/Rhodawk-AI/rhodawk-bounty-hunter/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/rhodawk-bounty-hunter?style=for-the-badge&logo=pypi&logoColor=white&color=3775A9)](https://pypi.org/project/rhodawk-bounty-hunter/)
[![npm](https://img.shields.io/npm/v/@rhodawkai/bounty-hunter?style=for-the-badge&logo=npm&logoColor=white&color=CB3837)](https://www.npmjs.com/package/@rhodawkai/bounty-hunter)
[![Python 3.10+](https://img.shields.io/badge/Python-3.10%2B-3776AB?style=for-the-badge&logo=python&logoColor=white)](https://github.com/Rhodawk-AI/rhodawk-bounty-hunter/blob/main/pyproject.toml)
[![License: MIT](https://img.shields.io/badge/License-MIT-22C55E?style=for-the-badge&logo=opensourceinitiative&logoColor=white)](https://github.com/Rhodawk-AI/rhodawk-bounty-hunter/blob/main/LICENSE)

<p align="center">
  <a href="https://github.com/Rhodawk-AI/rhodawk-bounty-hunter/blob/main/PLAYBOOK.md">🚀 5-Min Operator Playbook</a> •
  <a href="https://github.com/Rhodawk-AI/rhodawk-bounty-hunter/blob/main/BENCHMARKS.md">📊 Live Benchmarks</a> •
  <a href="https://github.com/Rhodawk-AI/rhodawk-bounty-hunter/blob/main/FAQ.md">FAQ</a> •
  <a href="https://github.com/Rhodawk-AI/rhodawk-bounty-hunter/blob/main/NOTICE">Attribution</a> •
  <a href="https://github.com/Rhodawk-AI/rhodawk-bounty-hunter/blob/main/LICENSE">MIT License</a>
</p>

**[Get Started](#-get-started-30-seconds) · [Demo](#-live-demo) · [Safe First Run](#-safe-first-run-60-seconds-offline) · [Install](#-install) · [AI Providers](#-ai-providers--setup-recipes) · [Workflows](#-end-to-end-hunting-workflows) · [CLI & Commands](#-complete-cli-reference-slash-commands--agents) · [Security Architecture](#-security-architecture) · [MCP](#-mcp-server) · [What Changed from Upstream](#-what-changed-from-upstream-agentic-bug-hunter) · [Honest Limitations](#️-honest-limitations--responsible-use) · [Credits](#️-credits--attribution)**

</div>

---

## 🚀 Get Started (30 Seconds)

```bash
# 📦 1. Install the CLI (pick one)
pipx install rhodawk-bounty-hunter
#   uv tool install rhodawk-bounty-hunter
#   pip install rhodawk-bounty-hunter

# 🧠 2. Configure an AI provider (Ollama = free & fully offline)
rhodawk setup

# 🎯 3. Compile scope, then hunt 🏹
rhodawk scope-compile <program-handle>
rhodawk recon target.com
```

💬 …or drive it from inside Claude Code / OpenCode:

```text
/recon target.com
/hunt target.com
```

Full reconFTW runs inside the air-gapped 3-plane enclave — see
[Workflow 2b](#-end-to-end-hunting-workflows). The lightweight native engine
(`--fast`) uses external scanners (`subfinder` · `httpx` · `nuclei` · `katana` ·
`ffuf` · `nmap` · …) installed from a `git clone` checkout via
`./install_tools.sh` — see [Install](#-install). All runtime data (recon,
findings, reports, proxy audit logs, credential vault and `config.json`) lives
under `$RHODAWK_HOME` (default `~/.rhodawk`).

---

## 🎬 Live Demo

<p align="center">
  <img src="https://raw.githubusercontent.com/Rhodawk-AI/rhodawk-bounty-hunter/main/assets/rhodawk-demo.gif" alt="RhodawkAI Bounty Hunter live terminal demo" width="100%"/>
</p>

<p align="center">
  <em>Recorded live on an 8-vCPU Ubuntu VPS: <code>rhodawk doctor</code> (<code>0 FAIL</code>, <code>&lt;5s</code>) → fail-closed out-of-scope block (<code>0</code> packets) → live CDN-aware recon on <code>rhodawkai.com</code> → canonical <code>recon_truth.json</code> + AI <code>recon_brief.md</code>.</em>
</p>

## 🛡️ What Is This?

<p align="center">
  <img src="https://raw.githubusercontent.com/Rhodawk-AI/rhodawk-bounty-hunter/main/assets/pipeline-flow.svg" alt="Animated pipeline: Scope, Recon, Hunt, Validate, Report" width="100%"/>
</p>

`rhodawk` is a terminal-first bug bounty agent for authorized bug-bounty
programs. It is an **authorized-testing workflow engine**: it fuses a
deterministic recon pipeline (subdomain enumeration, live-host probing, URL
collection, port and parameter discovery) with an LLM brain that runs fully
local (Ollama) or against any OpenAI-compatible provider. Every stage is
gated:

- 🎯 **Scope first, always.** Active stages refuse to start without a
  hash-verified scope manifest; out-of-scope targets abort with **zero
  packets sent to them**.
- 🛰️ **Full reconFTW, contained.** The full reconFTW engine runs only
  inside a 3-plane air-gapped enclave (HTTP :8080, Scoped DNS :53, Scoped
  SOCKS5 :1080); every byte is authorized against the SHA-256-verified scope
  manifest and written to one hash-chained audit ledger.
- ✅ **A 7-question LLM validation gate, backed by deterministic gates.**
  Findings are promoted only after a 7-question validation pass whose
  verdict is parsed and persisted in code — every standalone
  `rhodawk validate` / `triage` verdict is appended to
  `$RHODAWK_HOME/findings/validate_history.jsonl` (the same persistence hunt
  auto-triage uses), backstopped by the deterministic
  evidence/scope/SSRF gates in `validate_core.py` — see
  [Security Architecture](#-security-architecture) for exactly which parts
  are code-enforced and which are model-judged.

🌍 **Platform coverage:** `rhodawk scope-compile` accepts a HackerOne handle or a
HackerOne / Bugcrowd / Intigriti / YesWeHack program URL (platform
auto-detected; HackerOne uses authenticated paginated REST with a keyless
public fallback). Any program's scope can also be pinned without a platform
using `--scope-domain '*.target.com'` / `--scope-exclude` patterns on
`rhodawk recon` / `rhodawk hunt`.

---

## ✅ Safe First Run (60 Seconds, Offline)

Every new install should pass this before touching a live target. It sends
**zero packets**:

```bash
rhodawk --version && rhodawk-agent --version
rhodawk doctor                              # PASS/WARN/FAIL, <5s
rhodawk proxy chaos-test --mode hermetic    # 120 hostile multi-plane vectors (HTTP+DNS+SOCKS5), offline
```

Optional local practice lab (requires a `git clone` checkout — it is not
shipped in the PyPI/npm package):

```bash
python3 demo/app.py        # intentionally-vulnerable lab on http://127.0.0.1:8080
```

> ⚠️ **Port note:** `demo/app.py` and `rhodawk proxy start` both default to
> port 8080 — when testing both locally, start the proxy with
> `--listen 127.0.0.1:18080` (and point `--proxy http://127.0.0.1:18080` at it).

---

## 📦 Install

### 🧰 Prerequisites

```bash
# macOS
brew install go python3 jq

# Linux (Ubuntu / Debian)
sudo apt install golang python3 jq
```

### 🅰️ Option A — Global CLI (PyPI / npm, no git clone needed)

```bash
pipx install rhodawk-bounty-hunter                    # recommended
uv tool install rhodawk-bounty-hunter                 # or
pip install rhodawk-bounty-hunter                     # or

# Local scope-enforcement PEP support (mitmproxy + dnspython):
pipx install 'rhodawk-bounty-hunter[proxy]'

# Ollama ReAct agent extra (the `ollama` Python client for `rhodawk-agent`):
pipx install 'rhodawk-bounty-hunter[agent]'

# npm — a thin wrapper that chains to the pipx/pip-installed `rhodawk`
# binary (or falls back to `pipx run`); it does NOT bundle the tool itself.
pipx install rhodawk-bounty-hunter      # install the real package first
npm install -g @rhodawkai/bounty-hunter
npx @rhodawkai/bounty-hunter doctor

# Coexistence with a standalone install (v2.1.4): both ship a `rhodawk`
# binary, so `npm install -g` fails with EEXIST while
# /usr/local/bin/rhodawk (from `./install.sh --agent standalone`) exists.
# Pick ONE of:
./uninstall.sh --agent standalone --yes   # (a) remove the standalone link first
npx @rhodawkai/bounty-hunter doctor       # (b) use the npm build without installing
npm install -g --force @rhodawkai/bounty-hunter   # (c) override deliberately
```

### 🅱️ Option B — Full Source Install (external binaries, Docker enclave, scripts)

Scripts like `install_tools.sh` and `scripts/verify_zero_leakage.sh` only
exist in a `git clone` checkout — they are not part of the PyPI/npm package
and a global-CLI install has no access to them.

```bash
git clone https://github.com/Rhodawk-AI/rhodawk-bounty-hunter.git
cd rhodawk-bounty-hunter

./install.sh --agent standalone        # 'rhodawk' + 'rhodawk-agent' on PATH
                                        # (PEP 668-safe venv at ~/.rhodawk/venv)

./install_tools.sh                     # subfinder · httpx · nuclei · katana · ffuf · nmap · …
./install_tools.sh --browser           # managed headless Chromium for --js-crawl (SPA crawling)
./install_tools.sh --with-cicd-scanner        # + GitHub Actions SAST wrapper (sisakulint)
./install_tools.sh --with-credential-attack   # + hashcat, theHarvester, kerbrute, …

# Full reconFTW needs Docker + the locked enclave image:
docker build -f docker/enclave/Dockerfile.reconftw -t rhodawk-enclave-reconftw:latest .
```

### 🔌 Option C — Coding-Agent Plugins & MCP

```bash
./install.sh --agent claude            # skills, commands, agents + the
                                        # hash-verified PreToolUse scope hook
./install.sh --agent claude --project  # same, installed repo-local instead of globally

./install.sh --agent mcp               # MCP client config + 'mcp' SDK install hint
./install.sh --agent mcp --client claude   # also safely merges rhodawk into
                                            # ~/.claude/settings.json (atomic, .bak backup)

./install.sh --agent antigravity       # Google Antigravity / Gemini (~/.gemini/config)
                                        # aliases: gemini, agy
./install.sh --agent opencode          # OpenCode
./install.sh --agent pi                # Pi Agent
./install.sh --agent codex             # Codex
./install.sh --agent agents            # shared Agent Skills -> ~/.agents/skills (alias: generic)
./install.sh --agent all               # every supported target

# Manual / non-venv MCP setup:
pip install 'mcp>=2.2.0'
rhodawk mcp doctor
rhodawk mcp serve
claude mcp add rhodawk -- rhodawk mcp serve
```

### 🧹 Uninstall

```bash
./uninstall.sh --agent standalone              # removes rhodawk + rhodawk-agent
                                                # + the managed venv (~/.rhodawk/venv)
./uninstall.sh --agent standalone --purge-config   # also deletes config.json ($RHODAWK_HOME-aware)
./uninstall.sh --agent mcp --yes               # removes the merged mcpServers["rhodawk"] entry + .bak residue
./uninstall.sh --agent all --yes               # every target, no confirmation prompt

# Supported --agent values: claude · antigravity · opencode · pi · codex · agents · standalone · mcp · all
# (--agent claude / opencode / all also clean the mcpServers["rhodawk"] entry; other user MCP entries are preserved)

./uninstall_tools.sh       # removes the external scanning binaries (git-clone checkout only)
```

`$RHODAWK_HOME/.env` (default `~/.rhodawk/.env`), `config.json`, and all
recon/findings/report data are
preserved unless `--purge-config` is passed (which still only removes
`config.json`).

### 🗺️ Install Matrix

| Path | Command | What you get |
|---|---|---|
| PyPI CLI (recommended) | `pipx install rhodawk-bounty-hunter` | `rhodawk` + `rhodawk-agent` on PATH |
| npm thin wrapper | `npm install -g @rhodawkai/bounty-hunter` | wrapper chaining to the PyPI package |
| Repo standalone install | `./install.sh --agent standalone` | PEP 668-safe venv + PATH symlinks |
| Claude Code plugin + hook | `./install.sh --agent claude` (`--project` for repo-local) | skills, commands, agents + `PreToolUse` scope-guard hook |
| MCP client setup | `./install.sh --agent mcp` (`--client claude` to auto-merge) | MCP client config + SDK install hint |
| Antigravity / Gemini | `./install.sh --agent antigravity` | skills, rules & agents in `~/.gemini/config` |
| Every supported target | `./install.sh --agent all` | all plugin targets + MCP |
| External binary arsenal | `./install_tools.sh` | subfinder, httpx, nuclei, katana, ffuf, nmap, … |
| Full reconFTW enclave image | `docker build -f docker/enclave/Dockerfile.reconftw -t rhodawk-enclave-reconftw:latest .` | non-root (UID 10002) full reconFTW runner |
| Managed headless browser | `./install_tools.sh --browser` | managed Chromium for SPA crawling |
| Local PEP support | `pipx install 'rhodawk-bounty-hunter[proxy]'` | mitmproxy + dnspython for `rhodawk proxy start` |
| Ollama ReAct agent extra | `pipx install 'rhodawk-bounty-hunter[agent]'` | `ollama` Python client for `rhodawk-agent` |

> Optional: `./install_tools.sh --rtw-deps` is only relevant to the legacy
> `--engine native` / `--fast` fallback; full reconFTW in the enclave does not
> need it.

🐳 **There is no official prebuilt Docker image on a public registry.** Rhodawk
builds its own local enclave images (`rhodawk-scope-proxy`,
`rhodawk-enclave-runner`, `rhodawk-enclave-reconftw`) on demand from
`docker/enclave/` — e.g.
`docker build -f docker/enclave/Dockerfile.reconftw -t rhodawk-enclave-reconftw:latest .`
for the reconFTW runner — or automatically the first time you run
`rhodawk proxy up --build` or `rhodawk recon|hunt --sandbox` — see
[Air-Gapped Scope Enforcement Proxy](#air-gapped-scope-enforcement-proxy-3-plane-pep).

---

## 🧠 AI Providers & Setup Recipes

| Provider | Cost | Notes |
|:---|:---|:---|
| **Ollama** | 100% free, fully offline | `ollama pull qwen2.5:14b`, then `rhodawk setup` |
| **NVIDIA NIM** | Open weights, hosted | `NVIDIA_API_KEY` |
| **Groq** | Free tier | `GROQ_API_KEY` — fastest cloud option |
| **DeepSeek** | Very cheap | `DEEPSEEK_API_KEY` |
| **Cerebras** | Hosted | `CEREBRAS_API_KEY` |
| **Mistral** | Hosted | `MISTRAL_API_KEY` |
| **Google Gemini / Antigravity** | Included with Gemini AI Pro | `rhodawk login` (Google OAuth, no API key) or `GEMINI_API_KEY` |
| **Claude** | Paid | `ANTHROPIC_API_KEY` |
| **OpenAI** | Paid | standard OpenAI key |
| **Grok (xAI)** | Paid | xAI console key |
| **OpenRouter** | Pay-as-you-go | 100+ models |
| **OrcaRouter** | Pay-as-you-go | `ORCAROUTER_API_KEY` |
| **LiteLLM** | Uses your existing provider keys | opt-in via `LITELLM_API_KEY` |
| **Requesty** | Pay-as-you-go | `REQUESTY_API_KEY`, optional `REQUESTY_BASE_URL` for EU routing |

`rhodawk setup` persists the chosen provider and model in `config.json`
(`$RHODAWK_HOME/config.json`, default `~/.rhodawk/config.json`;
`$RHODAWK_CONFIG_FILE` overrides the path for tests/CI). API keys persist in
the credential vault `$RHODAWK_HOME/.env` (default `~/.rhodawk/.env`; file
`chmod 600`, directory `chmod 700`). A key typed at the
`rhodawk setup` prompt is currently saved in `config.json` (also `chmod 600`).

⌨️ **Interactive setup:**
```bash
rhodawk setup
```

🤖 **Non-interactive setup:**
```bash
rhodawk setup --provider ollama --model qwen2.5:14b
```

🆓 **Zero-cost, fully offline:**
```bash
curl -fsSL https://ollama.ai/install.sh | sh
ollama pull qwen2.5:14b
rhodawk setup --provider ollama --model qwen2.5:14b
```

⚡ **Free cloud (Groq):**
```bash
export GROQ_API_KEY="gsk_..."
rhodawk setup --provider groq
```

🟩 **Hosted open-weight (NVIDIA NIM):**
```bash
export NVIDIA_API_KEY="nvapi-..."
rhodawk setup --provider nvidia
```

🔑 **Google OAuth (Antigravity / Gemini AI Pro — no API key):**
```bash
rhodawk login
```

🔀 **One-off override** (put the global flag *before* the subcommand):
```bash
rhodawk --provider ollama --model qwen3:14b recon target.com
rhodawk --provider nvidia --model "nvidia/nemotron-3-ultra-550b-a55b" hunt target.com
```

🔎 **Optional recon & intel API keys** (not an LLM provider — just better recon coverage):
```bash
export CHAOS_API_KEY="..."   # ProjectDiscovery Chaos subdomain dataset
export PDCP_API_KEY="..."    # ProjectDiscovery Cloud (subfinder/httpx sources)
```

---

## ⚡ End-to-End Hunting Workflows

**🎯 Workflow 1 — Standard Scoped Hunt (process-level guardrails):**
```bash
rhodawk scope-compile <program-handle>
rhodawk recon target.com --js-crawl     # --js-crawl is optional (SPA crawling)
rhodawk hunt target.com
rhodawk validate "<finding description>"
rhodawk chain
rhodawk report

# No platform manifest? Pin scope explicitly (repeatable / comma-separated):
rhodawk recon target.com --scope-domain '*.target.com' --scope-exclude blog.target.com
rhodawk recon target.com --scope-manifest ~/.rhodawk/recon/<program-handle>/scope/compiled_scope.json
```

**🐳 Workflow 2 — Air-Gapped Enclave Hunt (network-level containment, requires a repo checkout + Docker):**
```bash
rhodawk scope-compile <program-handle>
rhodawk recon target.com --sandbox --js-crawl
rhodawk hunt target.com --sandbox          # or: export RHODAWK_SANDBOX=1
rhodawk proxy verify-audit ~/.rhodawk/proxy/<program-handle>/audit/audit_chain.jsonl
```
The enclave is **network-level containment** — even `curl --noproxy '*'` or
`node -e "fetch(...)"` inside the enclave cannot leave it. This is different
from the local PEP below, which only governs traffic that voluntarily uses it.

**🛰️ Workflow 2b — FULL reconFTW inside the 3-Plane Enclave (v2.2.0, Docker host):**

```bash
# One-time: build the locked non-root (UID 10002) reconFTW runner image from
# your git-clone checkout. There is NO prebuilt public image — the Dockerfile
# wraps your chosen upstream reconFTW checkout (override with
# --build-arg RECONFTW_IMAGE=..., default six2dez/reconftw:main), normalizes
# it to the runner contract and fails the build when reconftw.sh is missing.
docker build -f docker/enclave/Dockerfile.reconftw -t rhodawk-enclave-reconftw:latest .

# Compile the SHA-256 scope manifest, then run the full reconFTW engine
# STRICTLY inside the air-gapped enclave: every byte crosses the 3-plane PEP —
# HTTP :8080, Scoped DNS :53, Scoped SOCKS5 :1080 — and the whole run lands
# in ONE hash-chained audit chain.
rhodawk scope-compile <program-handle>

# Passive recon (-p): every active-exploit module force-disabled.
rhodawk recon target.com --sandbox --engine reconftw --mode p

# Full recon (-r default for recon) or the full/active hunt default (-a);
# --fast runs the lightweight native engine with no Docker.
rhodawk recon target.com --sandbox --engine reconftw --mode r
rhodawk hunt target.com --sandbox --engine reconftw --mode a
rhodawk recon target.com --fast

# Outputs: the full reconFTW tree (including reconFTW v4.1's nested
# <out>/<target>/ layout) is fused into the canonical recon_truth.json +
# delta.json (out-of-scope records quarantined, osint/js secrets redacted)
# so the MCP tools serve the full fused data.
rhodawk proxy verify-audit ~/.rhodawk/proxy/<program-handle>/audit/audit_chain.jsonl
```

🎛️ **`--mode` cheat-sheet** (`rhodawk recon|hunt --engine reconftw --mode …`):

| Mode | Meaning |
|:---:|:---|
| `-p` | 🕶️ passive — recon only, zero active-exploit modules |
| `-r` | 🔭 recon — the `rhodawk recon` default |
| `-s` | 🌿 subdomains only |
| `-n` | 🕵️ osint only |
| `-w` | 🕸️ webs only |
| `-a` | 💥 all — the only mode that runs active-exploit modules (the `rhodawk hunt` default) |
| `-z` | 🧘 zen — lightweight recon |

On `rhodawk recon`, every mode except `-a` forces the active-exploit modules
off (recon must never exploit); `rhodawk hunt` defaults to `-a`.

🔄 **Standalone enclave lifecycle** (optional — `--sandbox` brings the enclave
up and tears it down automatically; use these to manage it manually):

```bash
rhodawk proxy up --scope <program-handle> --profile reconftw   # or: --reconftw
rhodawk proxy status            # containers + all 3 planes + audit-chain status
rhodawk proxy exec --scope <program-handle> -- bash
rhodawk proxy verify-audit ~/.rhodawk/proxy/<program-handle>/audit/audit_chain.jsonl
rhodawk proxy down --scope <program-handle>
```

**🔬 Workflow 3 — Persistent Enclave, Local Loopback PEP & Live Proof:**
```bash
# Persistent enclave
rhodawk scope-compile <program-handle>
rhodawk proxy up --scope <program-handle> --build
rhodawk proxy up --scope <program-handle> --profile reconftw   # + reconFTW runner
rhodawk proxy exec --scope <program-handle> -- curl -s https://target.com/
rhodawk proxy status            # shows all 3 planes: HTTP :8080, DNS :53, SOCKS5 :1080
rhodawk proxy verify-audit ~/.rhodawk/proxy/<program-handle>/audit/audit_chain.jsonl
rhodawk proxy down --scope <program-handle>

# Local loopback PEP (no Docker, requires the [proxy] extra)
rhodawk scope-compile <program-handle>
rhodawk proxy start --scope <program-handle> --listen 127.0.0.1:8080 --enable-dns --enable-socks
rhodawk recon target.com --proxy http://127.0.0.1:8080

# Zero-leakage proof: 120 hostile multi-plane vectors (HTTP + Scoped DNS +
# Scoped SOCKS5), offline and deterministic (<2s)
rhodawk proxy chaos-test --mode hermetic
rhodawk proxy chaos-test --mode enclave --report chaos_report.json   # live probes against the running PEP

# Full VPS wire-level receipt (tcpdump + enclave + audit chain; git-clone checkout only)
sudo bash scripts/verify_zero_leakage.sh
```

**🤖 Workflow 4 — Autonomous ReAct Agent (`rhodawk-agent`, v2.3.0 multi-provider):**
```bash
# Ollama (local, default when no provider is configured):
rhodawk-agent --target target.com -d target.com --time 2 --max-steps 20
# Any configured cloud provider (NVIDIA NIM, OpenAI-compatible, Anthropic, Gemini):
rhodawk-agent --target target.com --scope acme-program -p nvidia \
    -m nvidia/nemotron-3-ultra-550b-a55b
# Signed scope + scope proxy + 3-plane enclave tool execution:
rhodawk-agent --target target.com --scope acme-program \
    --proxy http://127.0.0.1:8080 --sandbox --max-cost-usd 2.50
rhodawk-agent --target target.com --endpoint-budget 6 --reasoning-model <tier2-model>
rhodawk-agent --resume <session-id>
rhodawk-agent --list-models                       # per resolved provider (REST)
rhodawk-agent --list-models -p groq
rhodawk-agent --bump <session-dir> "focus on the OAuth flow"   # inject guidance mid-run
# Token spend visibility (agent + brain, per target):
rhodawk telemetry --target target-com --days 1
```
Scope is **required** before any tool that sends traffic will run: pass a
signed `--scope <handle|compiled_scope.json>` (SHA-256-verified before any
session state exists — tampered/out-of-scope/metadata targets exit 3 with an
audit row) or explicit `-d/--domain` patterns; with neither, the agent starts
but blocks every traffic-sending tool (fail-closed).

The agent now speaks **native tool calling with every provider configured via
`rhodawk setup` / `$RHODAWK_CONFIG_FILE`** (Ollama over REST `/api/chat`,
OpenAI-compatible `/chat/completions` incl. NVIDIA NIM / Groq / DeepSeek /
OpenRouter / Cerebras / Mistral + custom `--base-url`, Anthropic
`/v1/messages`, Gemini `generateContent`) and never blindly assumes Ollama
when a cloud provider is configured. The `ollama` pip package is **no longer
required** (only `--langgraph` still needs it). Every LLM turn is metered in
`$RHODAWK_HOME/telemetry/<target>/token_ledger.jsonl` and the **pre-turn
budget circuit breaker halts cleanly with exit 4** (no over-budget request is
ever sent) when the rolling 24h spend per target reaches `--max-cost-usd`
(default **$5.00/day**, `RHODAWK_MAX_DAILY_COST_USD`). When
`recon_truth.json` exists, ephemeral `<=4 KB` per-endpoint workers (fresh
history per endpoint, `--endpoint-budget` turns each) hunt the top endpoints
using the repo's `skills/*/SKILL.md` playbooks, persisting only structured
candidates. `--sandbox` keeps LLM reasoning + provider API keys host-side
while scanners execute inside the 3-plane enclave.

---

## 💻 Complete CLI Reference, Slash Commands & Agents

### 🖥️ `rhodawk` Master CLI

| Command | Alias | What it does |
|---|---|---|
| `rhodawk --help` | | Full help (`rhodawk <command> --help` for per-command flags) |
| `rhodawk --version` / `-V` | | Print version and exit |
| `rhodawk setup [--provider P] [--model M]` | `init` | Configure and persist provider/model |
| `rhodawk login [--no-browser\|--status\|--logout]` | `auth` | Google OAuth login (Gemini AI Pro) |
| `rhodawk providers` | `p` | Show all providers + API key status |
| `rhodawk models` | `m` | List models for the active provider |
| `rhodawk status` | `s` | Show hunt pipeline status (+ 24h token spend summary when telemetry exists) |
| `rhodawk telemetry [--target T] [--days N] [--json]` | `telem` | Token/USD spend report per target — turns, tokens, estimated cost, avg cost/turn, WITHIN_BUDGET / OVER_BUDGET vs the $5.00/day default (v2.3.0) |
| `rhodawk doctor [--strict] [-q/--quiet]` | | PASS/WARN/FAIL environment diagnostic |
| `rhodawk chat` | `ask` | Interactive AI shell |
| `rhodawk scope-compile <handle> [--output] [--h1scope-csv] [--huntdeck-db] [--bbscope-cache]` | `sc` | Compile a SHA-256 scope manifest (HackerOne REST/GraphQL today; Bugcrowd/Intigriti/YesWeHack URLs auto-detected for handle parsing) |
| `rhodawk recon <target> [--quick] [--engine {auto,reconftw,native}] [--fast] [--mode {r,p,s,n,w,a,z}] [--sandbox] [--proxy URL] [--scope-manifest PATH] [--scope-domain PAT] [--scope-exclude PAT] [--js-crawl] [--no-scope-check]` | `r` | Scoped recon + AI surface analysis (`--engine reconftw --sandbox` = full reconFTW in the 3-plane enclave) |
| `rhodawk hunt <target> [--quick] [--engine {auto,reconftw,native}] [--fast] [--mode {r,p,s,n,w,a,z}] [--sandbox] [--proxy URL] [--scope-manifest PATH] [--scope-domain PAT] [--scope-exclude PAT] [--js-crawl] [--no-scope-check]` | `h` | Full hunt pipeline (recon → hypothesis → verify) |
| `rhodawk validate ["<finding>"] [--allow-unverified]` | `v` | 7-Question Gate on a finding (also reads stdin) |
| `rhodawk triage ["<finding>"] [--allow-unverified]` | `t` | Fast triage (alias behavior of validate) |
| `rhodawk report [--findings-dir DIR]` | `rep` | Write a submission-ready report |
| `rhodawk chain [--findings-dir DIR] ["<finding>"]` | `c` | Build an A→B→C exploit chain |
| `rhodawk mcp [serve\|doctor\|tools]` | | MCP server (stdio) / doctor / tool catalog (default: `serve`) |
| `rhodawk proxy start\|up\|down\|status\|exec\|verify-audit\|chaos-test` | | Scope-enforcement proxy & enclave control — see the sub-rows below and [Workflow 2/3](#-end-to-end-hunting-workflows) |
| `rhodawk proxy start --scope <handle\|manifest> [--listen 127.0.0.1:8080] [--enable-dns] [--enable-socks] [--policy PATH] [--audit-log PATH]` | | Local 3-plane PEP supervisor, no Docker: HTTP :8080 always; `--enable-dns` adds Plane 2 (Scoped DNS :53), `--enable-socks` adds Plane 3 (Scoped SOCKS5 :1080) |
| `rhodawk proxy up --scope <handle\|manifest> [--build] [--profile reconftw \| --reconftw] [--policy PATH] [--subnet CIDR] [--port N]` | | Docker enclave: scope-proxy + rhodawk-runner; `--build` rebuilds the enclave images first; `--reconftw` is shorthand for `--profile reconftw` (+ the FULL reconFTW runner) |
| `rhodawk proxy down --scope <handle>` | | Tear the enclave down (the hash-chained audit receipt is retained) |
| `rhodawk proxy status [--scope <handle>]` | | Enclave containers + **all 3 planes** (HTTP :8080, Scoped DNS :53, SOCKS5 :1080) + audit-chain status (JSON) |
| `rhodawk proxy exec --scope <handle> -- <cmd...>` | | Execute a command inside `rhodawk-runner` (pentest_net) |
| `rhodawk proxy verify-audit <audit_chain.jsonl> [--json]` | | Verify the hash-chained audit ledger (exit 0 valid / 1 tampered) |
| `rhodawk proxy chaos-test [--mode {hermetic,enclave}] [--scope <handle\|manifest>] [--policy PATH] [--proxy-url URL] [--report PATH]` | | 120 hostile multi-plane breakout vectors across 6 categories (hermetic: offline, <2s; enclave: live probes against the running PEP) |

`--scope-domain` / `--scope-exclude` are repeatable (or comma-separated) and are
the explicit scope authority when no compiled manifest exists; `--no-scope-check`
is for local demo testing only.

v2.2.0 recon/hunt flags: `--engine {auto,reconftw,native}` picks the pipeline.
`auto` (the default) selects the reconftw engine **only when `--sandbox` is
set** and the enclave runner image is present — a plain `rhodawk recon
target.com` without `--sandbox` always runs the native engine. `reconftw` =
full reconFTW inside the 3-plane enclave: it requires `--sandbox` (passing it
without `--sandbox`, with `RHODAWK_SANDBOX` unset, fails closed with exit 2)
and exits 1 with the build one-liner when the image is missing —
it never silently bypasses containment. `--fast` is shorthand for
`--engine native` (lightweight pipeline, no Docker); `--mode {r,p,s,n,w,a,z}`
selects the reconFTW run mode (see the cheat-sheet under
[Workflow 2b](#-end-to-end-hunting-workflows)).

Global flags (before the subcommand): `-p/--provider <P>`, `-m/--model <M>`,
`--no-banner`, `-V/--version`. `recon` / `hunt` also accept `--provider` /
`--model` after the subcommand. `rhodawk hunt` defaults to `--mode a`;
`rhodawk recon` defaults to `--mode r`.

### 🤖 `rhodawk-agent` (autonomous ReAct agent — multi-provider since v2.3.0)

| Flag | Meaning |
|---|---|
| `--version` / `-V` | Print version and exit |
| `--target` | Domain to hunt |
| `--scope HANDLE\|PATH` | Compiled scope authority — SHA-256 verified BEFORE any session state; failures exit 3 with an audit row (v2.3.0) |
| `-d/--domain` (repeatable) | In-scope domain(s) (alternative to `--scope`) |
| `-x/--exclude-domain` (repeatable) | Explicitly excluded domain(s) |
| `--proxy URL` | Route scanner transport through the scope proxy; LLM API hosts bypass via NO_PROXY (v2.3.0) |
| `--sandbox` | Execute scanners inside the 3-plane enclave; LLM keys stay host-side (v2.3.0) |
| `-p/--provider` | LLM provider (ollama, nvidia, openai, openrouter, groq, deepseek, grok, cerebras, mistral, litellm, orcarouter, requesty, claude, gemini, ...) — defaults to the persisted provider in `$RHODAWK_CONFIG_FILE` (v2.3.0) |
| `-m/--model` | Model override (provider-native name) |
| `--base-url` | Custom OpenAI-compatible base URL |
| `--reasoning-model` | Tier-2 model for hypothesis synthesis over `<=4 KB` endpoint slices (v2.3.0) |
| `--max-cost-usd` | Hard 24h token budget per target (default 5.00; over-budget halts with exit 4 BEFORE the next LLM call) (v2.3.0) |
| `--endpoint-budget` | Turns per ephemeral `<=4 KB` per-endpoint worker (default 8; 0 disables) (v2.3.0) |
| `--time` | Time budget in hours (default 2) |
| `--max-steps` | Max ReAct iterations (default 20) |
| `--cookie` | Session cookie for POST discovery |
| `--scope-lock` | Stick to the exact target only |
| `--max-urls` | Max URLs in recon (default 100) |
| `--langgraph` | Use the real LangGraph backend (still Ollama-based; needs the `ollama` package) |
| `--resume` | Resume a session by ID |
| `--list-models` | List models for the resolved provider (REST) |
| `--bump SESSION_DIR MESSAGE` | Inject operator guidance mid-run |

### ⚡ Slash Commands (Claude Code / OpenCode — 42 shipped)

**🚀 Core Workflow**

| Command | What it does |
|:---|:---|
| `/recon target.com` | Full scoped recon pipeline + AI surface analysis |
| `/hunt target.com` | Active vulnerability hunt (auto-runs recon first if missing) |
| `/validate` | 7-Question Gate + 4-gate checklist on a finding |
| `/triage` | Faster go/no-go 7-Question Gate pass |
| `/chain` | Build an exploit chain from an existing bug |
| `/report` | Write a submission-ready H1/Bugcrowd/Intigriti/Immunefi report |
| `/verify` | Report gate — independently re-derives a finding from its PoC bundle |
| `/autopilot target.com [--paranoid\|--normal\|--yolo]` | Full autonomous loop with configurable checkpoints |

<details>
<summary><b>🔭 Recon, Enumeration & Scope</b></summary>

| Command | What it does |
|:---|:---|
| `/scope <asset>` | Checks if an asset is in scope before you test it |
| `/scope-aggregate <program-handle>` | Compiles every in-scope asset into a verified manifest |
| `/surface target.com` | Ranked attack surface from recon + hunt memory |
| `/cloud-recon --keyword <name> \| --cf-bypass <domain>` | Public S3/Azure/GCP buckets + CloudFlare-bypass origin IPs |
| `/param-discover <url>` | Hidden HTTP parameters via Arjun/x8 |
| `/secrets-hunt --filesystem\|--git\|--js-bundle\|--github-org` | Leaked credentials in source, git history, JS bundles, or a GitHub org |
| `/takeover <subdomains-file>` | Subdomain takeover candidates |
| `/scan-cves <host> [--year]` | Focused nuclei CVE sweep |
| `/bypass-403 <url>` | 403/401 bypass technique matrix |
| `/portscan <host>` | Open ports + non-HTTP services (SSH, DBs, Redis, Docker API, RDP) |
| `/screenshot -l urls.txt` | Visual triage gallery for live hosts |
| `/pickup target.com` | Resume a previous hunt, untested endpoints first |
| `/intel target.com` | CVEs + disclosed reports relevant to a target |
| `/osint-employees <target.com> [--with-linkedin]` | Employee names/email patterns for spray prep |
| `/wordlist-gen <target>` | Company-specific password wordlist |

</details>

<details>
<summary><b>🧪 Scanners (Web + LLM)</b></summary>

| Command | What it does |
|:---|:---|
| `/cors <url>` | CORS misconfiguration (origin reflection, null-origin, credentialed) |
| `/crlf <url>` | CRLF / response-splitting + host-header injection |
| `/nosqli --login <url>` | NoSQL injection (operator bypass, `$where` timing) |
| `/jwt-scan <token>` | Offline JWT toolkit — alg:none, RS256→HS256, secret crack |
| `/oob --payloads <oob-domain>` | Out-of-band listener for blind SSRF/XXE/SQLi/RCE/Log4Shell |
| `/sast <path>` | Semgrep security rulesets over fetched JS/source |
| `/domxss "<url>"` | Confirms DOM XSS in a real headless browser |
| `/llm-redteam --url <endpoint>` | Prompt-injection / jailbreak / exfil corpus runner |
| `/llm-app-audit <agent-url-or-product>` | Black-box audit of a deployed AI agent |
| `/oracle train\|rank\|score\|eval` | Self-learning lead prioritizer trained on hunt memory |

</details>

<details>
<summary><b>⛓️ Smart Contract (Web3)</b></summary>

| Command | What it does |
|:---|:---|
| `/web3-audit <contract.sol>` | 10-class smart contract audit + Foundry PoC template |
| `/token-scan <contract>` | Rug-pull scanner (mint authority, LP lock, honeypot, bonding curve) |

</details>

<details>
<summary><b>🔐 Session, Credential & Utility</b></summary>

| Command | What it does |
|:---|:---|
| `/dashboard [--port 8777]` | Local Hunt Dashboard — leads, surface, findings, reports, screenshots |
| `/poc capture <url>` | Reproducible PoC evidence (curl, HAR, screenshot, redacted by default) |
| `/breach-check <wordlist>` | HIBP k-anonymity breach-count enrichment for a password wordlist |
| `/spray <url> --mode <mode>` | Password spray with hard guards (fails closed without scope) |
| `/arsenal [tool]` | Lists installed external tools or prints an install hint |
| `/remember` | Logs the current finding/signal to hunt memory |
| `/memory-gc` | Inspects or rotates hunt-memory JSONL files |

</details>

### 🧑‍💻 Specialist AI Agents (9 shipped)

| Agent | Role |
|:---|:---|
| `recon-agent` | Subdomain enumeration + live host discovery under a verified scope manifest |
| `recon-ranker` | Ranks attack surface by IDOR likelihood, API surface, past-success tech-stack match |
| `validator` | Runs the 7-Question Gate + 4-gate checklist; kills weak/theoretical findings |
| `report-writer` | Impact-first H1/Bugcrowd/Intigriti/Immunefi reports, no "could potentially" language |
| `chain-builder` | Finds B/C findings to chain with an existing bug for higher severity |
| `autopilot` | Full autonomous hunt loop with configurable checkpoints |
| `web3-auditor` | Smart contract audit across 10 bug classes, ordered by real-world frequency |
| `token-auditor` | Meme-coin/token rug-pull and security audit (EVM + Solana) |
| `credential-hunter` | Chains wordlist-gen → osint-employees → breach-check, then hard-stops before spray |

### 🐞 Vulnerability Coverage

<details>
<summary><b>🌐 26 Web2 Vulnerability Classes</b></summary>

IDOR/BOLA · Auth Bypass · XSS (stored/reflected/DOM) · SSRF · Business Logic ·
Race Conditions · SQL Injection · OAuth/OIDC · File Upload→RCE · GraphQL Auth
Bypass · LLM/Prompt Injection · API Misconfiguration (mass assignment, JWT,
CORS) · Account Takeover · SSTI · Subdomain Takeover · Cloud/Infra Exposure ·
HTTP Request Smuggling · Cache Poisoning · MFA/2FA Bypass · SAML/SSO Attack ·
Error Disclosure/Debug Endpoints · CSS Injection · LFI→RCE · Insecure
Deserialization · Dependency Confusion/Supply Chain · Padding Oracle/Crypto
Misuse.

</details>

<details>
<summary><b>⛓️ 10 Web3 / Smart Contract Bug Classes</b></summary>

Accounting Desync · Access Control · Incomplete Code Path · Off-By-One ·
Oracle Manipulation · ERC4626 Share Inflation · Reentrancy · Flash Loan Attack
· Signature Replay · Proxy/Upgrade.

</details>

### 📜 Core Hunting Rules

| # | Rule |
|:-:|:---|
| 1 | Read full scope first — only test what the program authorizes |
| 2 | Real bugs only — "can an attacker do this right now?" If no, stop |
| 3 | Kill weak findings early — a 30-second check saves hours of wasted reporting |
| 4 | Never go out of scope — one wrong request can get you banned |
| 5 | 5-minute rule — no progress after 5 minutes on a lead? Move on |
| 6 | Validate before report — `/validate` before writing 30 minutes of report |
| 7 | Impact first — test the worst-consequence bugs first |

### 🤝 Contributing

```bash
git checkout -b feature/your-contribution
git commit -m "feat: short description"
git push origin feature/your-contribution
```

---

## 🔐 Security Architecture

Not every boundary below is enforced the same way. Read the split before your
first hunt.

🔒 **Code-enforced (deterministic — no model judgment involved):**

| Boundary | Mechanism |
|---|---|
| **Scope authority** | Paginated, SHA-256-verified `CompiledScopeManifest` (`recon/<handle>/scope/compiled_scope.json`) — tampered manifest = hard block |
| **Scope checker** | Fail-closed `ScopeChecker` host/IP/path matcher — `exit 3` in the recon engines, `SCOPE_REQUIRED` in MCP |
| **Pre-flight gate** | `recon_engine.sh` refuses manifest-less / out-of-scope runs **before any packet**; every block is audited to `hunt-memory/audit.jsonl` |
| **Post-enumeration filter** | Discovered hosts/URLs are re-checked before probing; out-of-scope entries quarantined to `scope/dropped_oos.txt`; checker crash aborts the run |
| **Per-scanner gate** | `_scope_gate.sh` sourced by 10 scanners (vuln, secrets, 403, params, CVE, OSINT, takeover, cloud, GraphQL, wordlists) |
| **Tool-call hooks** | Deterministic `PreToolUse` scope guard (`SCOPE_HOOK_BLOCK`) wired through `hooks/hooks.json` — unparseable input or missing/tampered manifest blocks |
| **Spray hard-stop** | `_spray_oauth.py` / `_spray_http_form.py` fail closed (`exit 3`, 0 requests sent) without a compiled scope manifest, unless `RHODAWK_SPRAY_UNSAFE=1` is explicitly set |
| **SSRF / hop-0** | `initial_host_blocked` gates verifier fetches, PoC capture and the fuzzer before any socket or browser launch (metadata/private/loopback always blocked) |
| **CDN quarantine** | Pre-probe dnsx 3rd-party SaaS CNAME quarantine drops `*.zendesk.com`-style edge hosts before any packet leaves |
| **3-plane air-gapped egress PEP** | `rhodawk-scope-proxy`: HTTP/HTTPS 9-gate policy engine + Scoped DNS + Scoped SOCKS5, all authorized against the SHA-256-verified manifest + `ProxyPolicyOverlay`; DNS-rebinding-resistant CNAME/IP gate with IP pinning; one fail-closed supervisor and ONE hash-chained audit ledger; 120-vector zero-leakage harness (`rhodawk proxy chaos-test`) |
| **Credential vault** | `chmod 600 $RHODAWK_HOME/.env` (default `~/.rhodawk/.env`; directory `0700`), atomic writes |
| **Report gate** | Report-ready requires verifier-confirmed status **and** linked evidence **and** enforced scope |
| **Data home** | Recon, findings, reports, proxy audit logs, the vault AND `config.json` live under `$RHODAWK_HOME` (default `~/.rhodawk`), never the package install tree — `config.json` resolves to `$RHODAWK_HOME/config.json` in engine and brain; `$RHODAWK_CONFIG_FILE` overrides the path for tests/CI |

🧠 **Model-assisted (prompt-level — NOT hard boundaries):**

| Layer | Reality |
|---|---|
| **7-Question Gate verdict** | Questions live in prompt text; code parses and persists the `VERDICT:` line (standalone `rhodawk validate` / `triage` runs append their verdict to `$RHODAWK_HOME/findings/validate_history.jsonl`) — SUBMIT/CHAIN/DROP is the model's judgment, with the deterministic gates above as backstop |
| **Data-plane isolation** | `<untrusted_target_data>` wrapping is declared in the agent prompts (`rhodawk/prompts/kernel.md`); it constrains the model's interpretation, not the kernel |
| **Session scope reminders** | SessionStart/Stop hooks are echo-only reinforcement |
| **Arbitrary Bash beyond fetch/scanner shapes** | The `PreToolUse` hook is a command-level guardrail, not a network security boundary: it classifies command shapes (curl/wget fetches, direct scanner invocations, active recon tools) and blocks out-of-scope ones, but it cannot see inside obfuscated one-liners and it never inspects the traffic itself |

![Architecture](https://raw.githubusercontent.com/Rhodawk-AI/rhodawk-bounty-hunter/main/assets/architecture.png)

### Air-Gapped Scope Enforcement Proxy (3-Plane PEP)

Process-level guardrails (the table above) gate what the tooling *tries to
do*; a misbehaving subprocess with raw sockets can still touch the network.
**The enclave is a network containment boundary.** `rhodawk recon|hunt
--sandbox` runs the pipeline in a Docker enclave whose runner containers have
**zero direct internet** (`pentest_net` is `internal: true`). All egress
crosses `rhodawk-scope-proxy`, a three-plane Policy Enforcement Point:

| Plane | Listener | Behavior |
|---|---|---|
| 🌐 **1 — HTTP/HTTPS** | `:8080` | 9-gate mitmproxy PEP: re-authorizes every request/CONNECT/redirect against the SHA-256-verified manifest + optional `ProxyPolicyOverlay`; DNS/CNAME/IP classification with IP pinning; L7 path and destructive-verb firewalls; per-host rate limits; mandatory-header stamping. **Plane 1b:** read-only (`GET`/`HEAD`) passive-intel API allowlist with no `X-Bug-Bounty` stamping on third-party OSINT hosts, plus explicit opt-in `collab_hosts`. |
| 📡 **2 — Scoped DNS** | `:53` UDP+TCP | Pure-stdlib asyncio resolver. Out-of-scope / exfil queries get `REFUSED` (0 upstream packets); private, IMDS, CGNAT and SaaS-CNAME answers are scrubbed. |
| 🧦 **3 — Scoped SOCKS5** | `:1080` | Pure-stdlib asyncio L4 forwarder with IP pinning; non-web ports are allowed to origin hosts only. |

- 🚨 **Fail-closed supervisor:** `supervisor.py` verifies the SHA-256 manifest
  before binding any plane and exits non-zero if any plane dies.
- 📒 **One ledger:** all three planes append to a single `fcntl.flock`-guarded,
  SHA-256 hash-chained `audit_chain.jsonl` (`rhodawk proxy verify-audit`
  proves no entry was edited; exit 0 valid / 1 tampered).
- 🔐 **Locked non-root runners:** `rhodawk-enclave-runner` (native / `--fast`)
  and `rhodawk-enclave-reconftw` (UID 10002, `cap_drop: [ALL]`,
  `no-new-privileges`, `proxychains4`, `pentest_net` internal). The full
  reconFTW tree is compiled deterministically (`reconftw_compiler.py`) and
  fused (`recon_fusion.py`) into `recon_truth.json` + `delta.json` with
  out-of-scope records quarantined and osint/js secrets redacted.

Two containment tiers — be honest with yourself: **the enclave is network
containment** (even `curl --noproxy '*'` or `node -e "fetch(...)"` cannot
leave it); **the local PEP (`rhodawk proxy start`, optionally with
`--enable-dns --enable-socks`) is a policy check on traffic that voluntarily
crosses it** — a hostile process that bypasses the proxy env vars is not
contained. For untrusted prompt-injection conditions, use `--sandbox`.

Everything is parameterized (`$RHODAWK_PROXY_SUBNET`, `$RHODAWK_PROXY_IP`,
`$RHODAWK_PROXY_PORT`, `$RHODAWK_PROXY_POLICY_FILE`, …) — no hardcoded
targets, subnets or paths; fixtures use RFC 2606/5737 documentation names
only. See `docker/enclave/.env.example` and
`rhodawk/proxy/chaos_egress_test.py --help`.

---

## 🤝 MCP Server

The bundled `rhodawk-mcp` server exposes the engine as **29 typed MCP tools**
(`rhodawk mcp tools` prints the live catalog with scope / approval / active /
read-only metadata). **5 tools are active-testing** and require a scope source
plus `approve=true` — `rhodawk_recon`, `rhodawk_hunt`, `rhodawk_hunt_class`,
`rhodawk_research` and the legacy-engine `rhodawk_run_rtw_capability`; without
scope they return `SCOPE_REQUIRED`. `rhodawk_validate` is additionally
**approval-gated** (it also demands scope + `approve=true`) but only returns
stored verification results — it never touches the target. The other 23 are
read-only or state tools that never touch the target — including
`rhodawk_compile_scope`, `rhodawk_scope_check`, `rhodawk_generate_report`,
`rhodawk_attack_surface`, `rhodawk_list_findings`,
`rhodawk_prioritized_surface` and `rhodawk_inspect_endpoint_slice`, which
serve the full fused `recon_truth.json` produced by the enclave
reconFTW run.

```bash
pip install 'mcp>=2.2.0'
rhodawk mcp doctor
rhodawk mcp tools
rhodawk mcp serve                   # stdio server (default action of `rhodawk mcp`)
claude mcp add rhodawk -- rhodawk mcp serve
```

**The MCP server accepts caller-supplied scope with approval.** A caller can
declare its own `scope_domains` instead of compiling a verified manifest; the
declaration is audited (`caller-supplied-scope`) but is not independently
checked against a program's actual policy — prefer `rhodawk_compile_scope` /
`rhodawk scope-compile` plus a verified manifest whenever the program is on a
supported platform.

---

## 🔍 What Changed from Upstream `Agentic-Bug-Hunter`

RhodawkAI Bounty Hunter is a standalone edition of the MIT-licensed
[Agentic-Bug-Hunter](https://github.com/awarexone/Agentic-Bug-Hunter)
framework. Attribution is preserved in [NOTICE](https://github.com/Rhodawk-AI/rhodawk-bounty-hunter/blob/main/NOTICE). Verified headline
deltas:

| Area | Upstream | RhodawkAI Edition |
|---|---|---|
| **Scope intake** | Substring handle matching, wildcards stripped, truncated results | `rhodawk scope-compile`: HackerOne (authenticated paginated REST, keyless fallback), Bugcrowd, Intigriti and YesWeHack URLs; exact-handle match; SHA-256-sealed `CompiledScopeManifest`; tamper ⇒ hard block |
| **Scope enforcement** | Recon ran with minimal guardrails | Fail-closed pre-flight gate (`exit 3`, 0 packets), post-enumeration quarantine filter, `_scope_gate.sh` in 10 scanners, `PreToolUse` hook (`SCOPE_HOOK_BLOCK`) |
| **MCP scope authority** | Caller could self-authorize silently | Caller-supplied `scope_domains` are audited and active modes additionally require `approve=true`; a verified manifest stays the preferred authority — a policy guardrail, not a hard boundary (see [Honest Limitations](#️-honest-limitations--responsible-use)) |
| **SSRF / hop-0** | Partial coverage | One canonical hop-0 gate before any socket/browser launch in verifiers, PoC bundler and fuzzer; scope mandatory, fail-closed |
| **TLS** | Fallback insecure context in one spray path | Always `ssl.create_default_context()` |
| **Secrets** | Tokens passed on the CLI; no managed vault | `$RHODAWK_HOME/.env` vault (default `~/.rhodawk/.env`; `0600`/`0700`, atomic writes); tokens via env/temp header files, never argv |
| **Validation** | Evidence optional | Evidence **mandatory**; report-ready additionally requires `scope_enforced` |
| **Recon output** | Flat text files | Canonical `recon_truth.json` + run-over-run `delta.json`, always under `$RHODAWK_HOME` |
| **Full reconFTW + 3-plane air-gapped enclave** | — | FULL reconFTW runs inside a non-root (UID 10002) enclave behind a 3-plane PEP (HTTP :8080, Scoped DNS :53, Scoped SOCKS5 :1080), deterministic `reconftw_compiler.py`, tree fusion into `recon_truth.json` + `delta.json` (OOS quarantine, secret redaction), one hash-chained audit ledger, 120-vector zero-leakage harness |
| **LLM providers** | Fewer providers, env-only | Expanded provider set (Ollama, NVIDIA NIM, Groq, DeepSeek, Cerebras, Mistral, Gemini/Antigravity OAuth, Claude, OpenAI, Grok, OpenRouter, OrcaRouter, LiteLLM, Requesty); provider/keys persist in `config.json`/`.env` |

See [BENCHMARKS.md](https://github.com/Rhodawk-AI/rhodawk-bounty-hunter/blob/main/BENCHMARKS.md) and [CHANGELOG.md](https://github.com/Rhodawk-AI/rhodawk-bounty-hunter/blob/main/CHANGELOG.md) for
versioned numbers and reproducible methodology — this table stays evergreen
on purpose and doesn't pin specific commits or file counts.

---

## 📁 Project Structure

```
rhodawk/                  the Python package
├── engine.py             standalone CLI ('rhodawk' entry point)
├── agent.py              LangGraph-style ReAct hunting agent ('rhodawk-agent')
├── brain.py              multi-provider LLM layer
├── agents/               9 specialist agent prompts (recon-agent, validator, …)
├── proxy/                3-plane PEP: config, dns_guard, addon (HTTP), dns_server,
│                         socks_server, supervisor, enclave, policy, audit,
│                         chaos_egress_test
├── mcp/                  rhodawk-mcp server + Burp/Caido/HackerOne MCP clients
├── prompts/              kernel.md and other agent system prompts
├── tools/                scanner + pipeline modules (incl. reconftw_compiler.py,
│                         recon_fusion.py, scope_compiler.py)
└── wordlists/            curated wordlists

commands/                 42 agent slash commands (/recon /hunt /validate /report …)
skills/                   25 methodology + toolkit skills
hooks/hooks.json          PreToolUse deterministic scope hook
docker/enclave/           Dockerfiles (proxy, runner, reconftw) + docker-compose.yml
scripts/                  verify_zero_leakage.sh, full_hunt.sh, dork_runner.py
demo/                     intentionally-vulnerable local practice lab (demo/app.py)
tests/                    pytest regression suite
docs/                     deep-dive documentation
web3/                     smart contract audit guide
site/                     project landing page
```

---

## ⚠️ Honest Limitations & Responsible Use

Read this before your first hunt — several boundaries are prompt-level, and
a few caveats are structural.

⚠️ **Limitations:**

- **Authorized targets only.** The scope gate is fail-closed: a
  manifest-less run blocks with `exit 3` before any probe (unless
  `RHODAWK_SCOPE_UNSAFE=1` is set explicitly for authorized local testing),
  and non-loopback `curl`/`wget` without a resolvable manifest are blocked
  by the `PreToolUse` hook unless `RHODAWK_HOOK_ALLOW_UNSCOPED_FETCH=1`.
  IP/CIDR targets self-scope. **You are the authorization layer of last
  resort.**
- **Scope manifests are tamper-evident, not signed.** The SHA-256 detects
  modification, not authorship: whoever can write `compiled_scope.json` (a
  `0700`/`0600` home) can authorize that scope. Protect your
  `$RHODAWK_HOME`.
- **`rhodawk-agent` is multi-provider with per-provider caveats (v2.3.0).**
  Native tool calling is adapter-tested for Ollama (`/api/chat`), the
  OpenAI-compatible `/chat/completions` family (incl. NVIDIA NIM reasoning
  shapes), Anthropic (`/v1/messages`) and Gemini (`generateContent`) — but
  provider tool-calling quality varies wildly by model: small local models
  and free-tier endpoints frequently emit malformed tool calls, and the
  ReAct loop degrades to its text fallback (or stalls) accordingly. The
  `--langgraph` backend remains Ollama-based. Token/USD costs are
  ESTIMATES from a built-in pricing table (`rhodawk telemetry`); override
  `$RHODAWK_HOME/pricing_overrides.json` when your contract prices differ.
- **The `PreToolUse` hook is a command-level guardrail, not a network
  security boundary.** It classifies command text; it does not inspect
  packets or constrain processes it fails to classify. Treat it as an audit
  trail with teeth for common accidental cases, not as a sandbox.
- **The MCP server accepts caller-supplied scope with approval** — see
  [MCP Server](#-mcp-server). Prefer a
  verified manifest whenever the program is on a supported platform.
- **Operator-supplied spray targets fail closed by default.**
  `_spray_oauth.py` / `_spray_http_form.py` send 0 requests without a
  compiled scope manifest unless `RHODAWK_SPRAY_UNSAFE=1` is explicitly set
  — point them only at programs whose policy allows credential-spray
  testing.
- **7-Question Gate verdicts are model-judged** (SUBMIT/CHAIN/DROP); the
  deterministic evidence/scope/SSRF gates in `validate_core.py` are the
  backstop. Never submit without reading the evidence yourself.
- **Enclave images are built locally.** There is no official prebuilt
  Docker image on a public registry — build them on demand from
  `docker/enclave/`. `--engine reconftw` requires `--sandbox` and exits 1
  with the build one-liner when the image is missing; it never silently
  bypasses containment.
- **Benchmarks are environment-specific.** Treat [BENCHMARKS.md](https://github.com/Rhodawk-AI/rhodawk-bounty-hunter/blob/main/BENCHMARKS.md)
  as reproducible methodology, not a guarantee.

🤝 **Responsible use:**

1. Hunt **only** programs whose policy authorizes you — `scope-compile`
   exists so you never have to trust a pasted target list.
2. Respect `max_rps` and `mandatory_headers` from the program policy — the
   manifest enforces them as pipeline defaults.
3. Validate before reporting: a finding without linked evidence is never
   report-ready; use `rhodawk validate` and attach the PoC bundle.
4. Keep upstream attribution ([NOTICE](https://github.com/Rhodawk-AI/rhodawk-bounty-hunter/blob/main/NOTICE)) intact — this edition is
   built on an MIT-licensed framework.

---

## ❤️ Credits & Attribution

RhodawkAI Bounty Hunter is a standalone edition built on the MIT-licensed
[Agentic-Bug-Hunter](https://github.com/awarexone/Agentic-Bug-Hunter)
framework. Upstream attribution is preserved in [NOTICE](https://github.com/Rhodawk-AI/rhodawk-bounty-hunter/blob/main/NOTICE) — please
keep it intact in redistributions.

## License

MIT — see [LICENSE](https://github.com/Rhodawk-AI/rhodawk-bounty-hunter/blob/main/LICENSE). Hunt only what you are authorized to hunt.
