ARTEX's way of working, inside Claude Code:
autonomous, evidence-first bug bounty hunting where a planner splits the goal into
exploration intents, workers test them with real tools, an adversarial verifier tries to
break every candidate, and a reporter writes up what survives. There is no server, no API
key and nothing to install beyond Python: Claude Code does the reasoning, and a small
broker (hunt.py) holds the state and enforces the rules.
Use it only on programs you are authorized to test, inside the scope and rules they publish. The framework refuses to start without a recorded authorization basis and keeps every request inside the recorded scope, but the responsibility stays yours.
Claude Code ARTEX is an independent community project. It is not affiliated with or endorsed by Anthropic or by the ARTEX authors; it adapts ARTEX's open architecture (see NOTICE).
Open this folder in Claude Code and ask, in your own words:
Use Claude Code ARTEX to find vulnerabilities in the example.com bug bounty program.
Read and understand the program first.
dengan framework ini bantu aku untuk mencari kerentanan pada program example.com,
baca dan pahami program tersebut
The claude-bug-hunter skill takes it from there:
- Reads the program. A goals subagent finds the official program page, reads all of
it, and records the authorization basis, every in-scope and out-of-scope asset, the
rules (rate limits, banned techniques, account rules, required headers), the
not-eligible list and known issues, and a measurable goal. It writes
PROGRAM.mdso you can check it understood the program. If no official program exists, it stops and asks you for one. - Hunts. The session joins the broker and loops: a planner subagent queues intents, worker subagents test them in parallel through the gateway, a verifier subagent tries to break each candidate, a reporter subagent writes each confirmed result up.
- Ends honestly on one of four outcomes:
done(every goal met on evidence),exhausted(nothing uncovered remains),blocked(it needs you: an account, an approval, a cleared halt) orbudget. Zero findings stated precisely is a valid end.
Nothing is ever submitted by an agent. You read each report against the recorded traffic and submit it yourself.
Requirements: Claude Code (desktop app or CLI), Python 3.10+ on PATH, and a POSIX sh
for the hook (Git for Windows provides it on Windows).
git clone <this repository> claude-code-artex
cd claude-code-artex
python -I hunt.py doctor # python3 on macOS/LinuxOpen the folder in Claude Code and run the same doctor command from a session there:
every line must pass, including hook ran for this very command: yes. Then type your
prompt.
python -I hunt.py demo setup # creates engagement "demo"
python -I hunt.py demo serve # a deliberately vulnerable app on 127.0.0.1:8765Then ask Claude Code: "Use the claude-bug-hunter skill on the demo engagement and hunt until it is done." The demo app holds made-up data, one real access-control bug and a few controls that hold, so the whole loop can be watched end to end.
flowchart LR
P[operator prompt] --> S[skill claude-bug-hunter]
S --> G[hunter-goals: read the program]
G --> B[(broker: state.db)]
S --> E[engine session: inbox / next / wait]
E -- plan --> PL[hunter-planner]
E -- intent --> W[hunter-worker x N]
E -- verify --> V[hunter-verifier]
E -- report --> R[hunter-reporter]
E -- retest --> RT[hunter-retester]
PL --> B
W -- every request --> GW[gateway: scope, pacing, 4xx budget, HALT, log] --> T[(target)]
W --> B
V --> B
R --> B
RT --> B
| ARTEX | Claude Code ARTEX |
|---|---|
| goal decomposer | hunter-goals: program intake, constraints, exclusions, goals |
| planner, woken on graph changes plus a heartbeat | hunter-planner, one fresh subagent per round, due after planner-relevant events or when the floor applies |
| N concurrent workers claiming intents | hunter-worker, one fresh subagent per intent, claimed under a lease, capped per host |
| adversarial gate before a finding counts | hunter-verifier: five axes plus every program exclusion, structural gates in the broker |
| reporter triggered by each finding | hunter-reporter, from the recorded evidence only |
| retester | hunter-retester, queued with result retest-request |
| main agent | the session you talk to |
| asset graph + exploration graph + anchors | assets, intents, facts, results linked by ids; coverage computed from them |
| recording proxy and traffic store | the gateway's log: every request has a seq that results must cite |
| scope gate, noise governor, budgets | scope rules, shared pacing, a rolling 4xx budget, HALT, run budgets |
| untrusted-output boundary | target bodies printed between nonce-tagged UNTRUSTED markers |
The engine session never does the work itself. Each turn it reads its inbox, claims work
with next (each claim prints the subagent to spawn), and arms wait in the background;
wait exits when something it cares about happens, and that exit wakes the session for
the next turn. Leases expire when a session disappears, and every claim has a hard time
limit, so work held by a session or subagent that died returns to the queue.
More in docs/architecture.md.
| Layer | What it enforces |
|---|---|
| Authorization | an engagement is created only from an official program URL or your written scope |
| Scope first | no intent, fact or result is recorded until goals and allow/deny rules exist |
| Gateway | the only path to target hosts: scope check, read-only hosts, no redirects followed, normal-sized requests, shared pacing, a rolling 4xx-per-minute budget |
| HALT | a 429, a WAF block page, a 5xx, a slow answer or a broken connection stops target traffic for every agent until you clear it; it is never routed around |
| PreToolUse hook | refuses curl, wget, scanners, raw HTTP libraries and the browser against recorded targets outside the gateway, and any agent access to creds/; join and every subagent brief refuse to start if the hook is not running |
| Provenance | what the target says about itself, or the agent's own inference, cannot close a goal |
| Evidence | an executed-live result must cite gateway seq numbers or an evidence file |
| Verification | a confirm needs a measured impact, an executed proof, all five adversarial axes, every exclusion checked and a severity; without impact or execution it is forced to rejected |
| Secrets | cookies, tokens and keys are masked in logs and refused in every record and report |
| People | agents never create accounts, handle passwords or one-time codes, or submit reports |
Agents use it constantly; you rarely need to. python -I hunt.py --help lists everything.
| You want | Command |
|---|---|
| check the setup | doctor |
| see a hunt | -e <name> status, situation, show <id>, log, view (HTML snapshot) |
| steer it | -e <name> hint add --text "...", steer <intent> --text "...", intent cancel <intent> --reason "..." |
| unblock it | -e <name> handoff answer <H> --text "...", halt clear --as <you> --reason "...", intent approve <I> --as <you> |
| re-check a finding | -e <name> result retest-request <R> --reason "..." |
| tune pacing | -e <name> config set min_interval_s 2, config set max_4xx_per_min 2 |
| set budgets | -e <name> budget set --max-rounds 20 --max-hours 6 |
Exit codes: 0 ok, 1 usage or local error, 3 refused by a gate, 4 not found,
5 halted, 6 back off (pacing full).
One session is enough: it runs several subagents at once. To split the context load,
hunt.py -e <name> topology prints session layouts (solo, duo, full) with each
session's start prompt; every session joins the same broker with some of the roles.
Forks work, with one rule. Each session name is bound to the Claude Code session that
joined with it, so a fork of a running engine session cannot carry on as the original by
accident: it is refused until it joins under its own name (for example hunter-2) and
then works as an extra session. Work items never go to fork subagents; they go to fresh
hunter-* subagents, because the briefs depend on a clean context. A session that died
for good can be replaced with join --as <name> --takeover.
- The hook catches the common ways of reaching a target without the gateway; it is a guard, not a sandbox. A script that builds the hostname at run time gets through.
- The gateway speaks HTTP(S) and DNS-over-HTTPS. Other protocols, mobile apps and source code are recorded as scope but tested with other tools under the same rules.
- Duplicate detection between intents is lexical; telling two differently worded directions apart is the planner's job.
- Pacing is per engagement. Two engagements against the same target pace separately.
python -m unittest discover -s testsThe tests are mostly gates rather than happy paths: authorization, scope, provenance,
evidence, verification, reports, leases and fencing, concurrency caps, the floor and the
four outcomes, the gateway (pacing, 4xx budget, HALT, redaction), the hook and its
wrapper, many processes at once, every brief rendering, and one multi-session run against
the demo target from intake to done and a retest.
The architecture adapts patterns from ARTEX (AGPL-3.0); see NOTICE. The code here is original. Claude Code is Anthropic's product; this project only runs inside it.