Autonomous bug bounty agent driven by autobb reconnaissance. A Telegram bot forwards alerts and chat messages to Claude Code CLI, which actively pentests targets using the host MongoDB (recon data) and a persistent knowledge wiki.
The agent doesn't just summarize — it picks targets, runs real probes, reports only verified findings, and keeps its own wiki of programs, hosts, tech, techniques, findings and dead-ends across sessions.
- Python 3.12+ (only when running outside Docker)
- Docker (recommended)
- MongoDB with database
autobbdb(populated by autobb) reachable from the host - Claude Code CLI — installed and authenticated
- Telegram Bot Token (via @BotFather)
git clone https://github.com/rivalsec/autobb-analyst && cd autobb-analyst
cp config.dist.yaml config.yamlEdit config.yaml:
db:
uri: "mongodb://host.docker.internal:27017"
database: "autobbdb"
telegram:
token: "123456:ABC-DEF..." # token from BotFather
chat_id: "-1001234567890" # chat/group ID
autobb_bot_id: 1871687898 # autobb bot user ID
ignore_patterns: # optional: skip noisy messages
- "Is something wrong with nuclei templates?"
claude:
cli_path: "claude"
timeout: 300claude setup-token
echo "CLAUDE_CODE_OAUTH_TOKEN=<your-token>" > .envdocker build -t autobb-analyst .
docker run -d \
--name autobb-analyst \
--env-file .env \
-v $(pwd)/config.yaml:/app/config.yaml:ro \
-v $(pwd)/claude_workdir:/app/claude_workdir \
--add-host=host.docker.internal:host-gateway \
autobb-analystCheck logs:
docker logs -f autobb-analystHost MongoDB is reachable from the container at
host.docker.internal:<port>. The container is isolated from the rest of the host network (no--network host).
claude_workdiris mounted from the host so agent instructions, slash commands, persistent memory and the knowledge wiki survive restarts and are editable without rebuilding the image.
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python bot.py- Alert from autobb → the bot automatically invokes Claude Code with
/analyze-alert <alert text>. The agent consults the wiki, queries MongoDB, actively pentests, and reports only verified findings. - Free-form user message → passed to Claude Code as-is.
- Reply / quoted message → the quoted content is included as context in the user prompt.
- On startup → any pending Telegram updates accumulated while the bot was offline are batched into one
/analyze-alertcall (avoids spamming the chat with one response per queued alert). .txtattachments → downloaded and used as the message text (caption is ignored).
The agent uses a stream-json Claude CLI output to log every tool use, thinking, and result in real time, and sends a "typing…" indicator in Telegram while working.
For active reconnaissance: nmap, dig / nslookup, whois, curl, wget, httpie, openssl, netcat, traceroute, ping, jq.
For JS-rendered pages, SPA apps, login flows and screenshots: Playwright (Python) with a bundled Chromium browser. The agent can drive a headless browser via inline Python when static HTTP tools aren't enough.
Mounted from the host — persistent across container restarts. Contents:
CLAUDE.md— the agent's system prompt (role, principles, available tools, wiki rules, response format).dbquery.py— CLI utility for MongoDB reads (also usable directly via pymongo)..claude/commands/— slash commands:/analyze-alert <text>— triggered on autobb alerts (wiki-first pentest flow)./hunt [scope]— autonomous hunt cycle (pick a target, test, record).
.memory/— behavior rules (preferences, feedback)..wiki/— domain knowledge base the agent maintains itself:programs/— per bug bounty programhosts/— per target host (tech stack, tested vectors, status)tech/— per technology (CVE status, common misconfigs)techniques/— reusable pentest playbooksfindings/— archive of confirmed vulnerabilities (PoC required)dead-ends/— thoroughly tested hosts with nothing found (revisit rules)INDEX.md— always-loaded root index with counts and rules
See claude_workdir/.wiki/<category>/README.md for each page template.
python dbquery.py scopes # list scopes with stats
python dbquery.py recent --hours 24 --scope example.com # recent findings
python dbquery.py vulns --severity critical # vulnerabilities
python dbquery.py host api.example.com # everything on a host
python dbquery.py search "admin.*example" # domain regex search
python dbquery.py probes --juicy 10 --hours 12 # interesting HTTP probes
python dbquery.py changes --hours 6 # probes with diffs
python dbquery.py query domains --filter '{"scope":"example.com"}' --limit 10For anything beyond these wrappers, the agent connects directly with pymongo (read-only).
| Collection | Description |
|---|---|
domains |
Subdomains (host, a[], cname[], scope, add_date, _diffs_history) |
http_probes |
HTTP services (url, status_code, title, tech[], tls{}, juicy_weight, juicy_info, _diffs_history) |
ports |
Open ports (host, ip, port, scope) |
nuclei_hits |
Active vulnerabilities from Nuclei |
nuclei_passive_hits |
Passive Nuclei findings |
db:
uri: "mongodb://host.docker.internal:27017"
database: "autobbdb"
telegram:
token: "..."
chat_id: "..."
autobb_bot_id: 1871687898
ignore_patterns: # substrings (case-insensitive) to ignore from autobb
- "Is something wrong with nuclei templates?"
claude:
cli_path: "claude"
timeout: 300 # Claude CLI timeout (seconds)