- 🚨 Disclaimer
- ✨ Features
- 🔬 Core Methodology
- 🏗️ Architecture
- 🛠️ Technology Stack
- 🚀 Getting Started
- 🤖 AI Assistant Setup (MCP)
- ⚙️ Configuration
- 📊 Output
- 📜 License
🏆 The First Agentic Framework Intelligently Designed for Bug Bounty Hunting
BugTraceAI-CLI is an autonomous offensive security framework that combines LLM-driven analysis with deterministic exploitation tools. Unlike passive analysis tools, BugTraceAI-CLI actively exploits vulnerabilities using real payloads, SQLMap integration, and browser-based validation to deliver confirmed, actionable findings.
The core philosophy is "Think like a pentester, execute like a machine, validate like an auditor" - using AI for intelligent hypothesis generation, but relying on real tools for exploitation and validation.
This tool is for authorized security testing only.
BugTraceAI-CLI performs active exploitation including:
- Real SQL injection payloads via SQLMap
- XSS payload execution in browsers
- Template injection testing
- Server-side request forgery probing
By using this tool, you acknowledge and agree that:
- You will only test applications for which you have explicit, written permission
- You understand this tool sends actual attack payloads to targets
- The creators assume no liability for any misuse or damage caused
Unauthorized access to computer systems is illegal.
BugTraceAI-CLI implements a 6-phase pipeline that mirrors a professional penetration testing workflow.
- 🕷️ GoSpider Integration: Fast async crawling with JavaScript rendering and sitemap parsing
- 🔍 Parameter Extraction: Automatic identification of injectable parameters
- 🌐 API Endpoint Enrichment: Detail URL discovery from list endpoints
- 🧭 SPA Route Inference: Infers API endpoints from frontend routes
- 🧠 Multi-Persona Analysis: 6 different AI "personas" analyze each URL (bug bounty hunter, code auditor, pentester, etc.)
- ✅ Consensus Voting: Requires 4/5 agreement from analysis personas to reduce false positives
- 🔎 Skeptical Review: The 6th "Skeptical" persona (Claude Haiku) performs final filtering
- 🎯 Nuclei CVE Scanning: Template-based detection of known vulnerabilities (runs in parallel)
- 🛡️ Parallel Execution: All personas analyze simultaneously for speed
- 🎯 ThinkingConsolidationAgent: Central brain that routes findings to specialists
- 🔄 Deduplication: Eliminates redundant findings across URLs
- ⚡ Priority Routing: High-confidence findings get tested first
- 🛡️ SQLi Bypass: SQL injection candidates always reach SQLMap (tool decides, not LLM)
- 🧩 Auto-Dispatch: Framework detection triggers specialist agents automatically (e.g., Angular → CSTIAgent)
Real tools, real payloads, real results — 14 autonomous specialist agents:
| Agent | Target | Method |
|---|---|---|
| 🔥 XSSAgent | Cross-Site Scripting | Playwright browser + 6-level escalation pipeline |
| 💉 SQLiAgent | SQL Injection | SQLMap with WAF bypass tamper scripts |
| 🎭 CSTIAgent | Client/Server-Side Template Injection | AngularJS, Vue, Jinja2, Twig, Mako |
| 🌐 SSRFAgent | Server-Side Request Forgery | OOB callback verification |
| 📄 XXEAgent | XML External Entity | DTD injection + OOB exfiltration |
| 🔓 IDORAgent | Insecure Direct Object Reference | ID manipulation + path segment testing |
| 📁 LFIAgent | Local File Inclusion | Path traversal with filter evasion |
| 🧩 PrototypePollutionAgent | Prototype Pollution | Browser-based property verification |
| 🔌 APISecurityAgent | API Security | Broken Object Level Authorization (BOLA) testing |
| 🔑 JWTAgent | JWT Vulnerabilities | Algorithm confusion, weak secrets, token forging |
| 🔀 OpenRedirectAgent | Open Redirect | HTTP 3xx + DOM-based redirect detection |
| 💀 RCEAgent | Remote Code Execution | Command injection + deserialization testing |
| 📨 HeaderInjectionAgent | Header Injection | CRLF injection + response splitting |
| 📦 MassAssignmentAgent | Mass Assignment | Parameter pollution + privilege escalation |
- 🖥️ Chrome DevTools Protocol: Low-level browser verification for XSS
- 👁️ Vision AI: Screenshot analysis confirms visual vulnerabilities
- 📸 Evidence Capture: Every confirmed finding includes proof
- 📊 AI-Powered Reports: LLM-generated executive and technical assessments
- 📝 Multiple Formats: JSON (machine-readable), Markdown, and HTML reports
- 🔬 PoC Enrichment: Batch proof-of-concept generation for confirmed findings
- 📁 Specialist Audit Trail: Per-agent WET/DRY/Results traceability
- 🔀 LLM Shifting: Automatic fallback through model tiers (Gemini → DeepSeek → Claude → Qwen)
- 🛡️ WAF Detection: Identifies Cloudflare, Akamai, AWS WAF, ModSecurity
- 🎯 Adaptive Bypass: Encoding, chunking, and case mixing strategies per WAF type
BugTraceAI-CLI uses a multi-layered approach to maximize accuracy while minimizing false positives.
Instead of a single AI scan, each URL is analyzed by 6 different "personas" providing diverse perspectives:
- Bug Bounty Hunter: Focuses on high-impact, reward-worthy issues (RCE, SQLi, SSRF)
- Code Auditor: analyzing code patterns, input validation, and logic flaws
- Pentester: Standard attack-surface mapping and OWASP Top 10 exploitation
- Security Researcher: Novel attack vectors, race conditions, and edge cases
- Red Team Operator: Advanced attack chains, privilege escalation, and lateral movement
- Skeptical Reviewer: A separate "critic" agent that aggressively filters false positives
5 Analysis Personas run in parallel
↓
Consensus voting (Agreement analysis)
↓
6th Persona "Skeptical Agent" Review (Claude Haiku)
↓
Passed to specialist agents
The key differentiator: AI hypothesizes, tools validate.
- SQLi findings → SQLMap confirms with real injection
- XSS findings → Playwright executes payload in browser
- All findings → CDP + Vision AI provides evidence
This eliminates the "hallucination problem" of pure-AI scanners.
┌──────────────────────────────────────────────────────────────────────┐
│ BUGTRACE REACTOR │
├──────────────────────────────────────────────────────────────────────┤
│ │
│ ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐ │
│ │ Phase 1 │ │ Phase 2 │ │ Phase 3 │ │ Phase 4 │ │
│ │ Recon │ → │ Discovery │ → │ Strategy │ → │Exploitation│ │
│ │ GoSpider │ │ DASTySAST │ │ ThinkingAg.│ │ 14 Agents │ │
│ │ URL Enrich │ │ 6 Personas │ │ Dedup │ │ SQLMap │ │
│ │ SPA→API │ │ + Nuclei │ │ Routing │ │ Playwright │ │
│ └────────────┘ └────────────┘ └────────────┘ └─────┬──────┘ │
│ │ │
│ ▼ │
│ ┌────────────┐ │
│ │ Phase 5 │ │
│ │ Validation │ │
│ │ CDP │ │
│ │ Vision AI │ │
│ └─────┬──────┘ │
│ │ │
│ ▼ │
│ ┌────────────┐ │
│ │ Phase 6 │ │
│ │ Reporting │ │
│ │JSON/MD/HTML│ │
│ └────────────┘ │
└──────────────────────────────────────────────────────────────────────┘
Each phase runs with independent concurrency:
| Phase | Concurrency | Configurable | Notes |
|---|---|---|---|
| Reconnaissance | 1 | No | GoSpider is already fast |
| Discovery | 5 | Yes | Parallel DAST per URL |
| Strategy | 1 | No | Sequential dedup + routing |
| Exploitation | 10 | Yes | Parallel specialist agents |
| Validation | 1 | No | CDP limitation (hardcoded) |
| Reporting | 1 | No | Sequential report generation |
Why is Validation = 1? Chrome DevTools Protocol doesn't support multiple simultaneous connections. Additionally,
alert()popups from XSS payloads block CDP indefinitely. Single-threaded with timeouts prevents crashes.
- Language: Python 3.10+
- AI Provider: OpenRouter (Gemini, Claude, DeepSeek, Qwen)
- Local AI: BAAI/bge-small-en-v1.5 (SOTA Embeddings & Semantic Search)
- Browser Automation: Playwright (exploitation), Chrome CDP (validation)
- SQL Injection: SQLMap via Docker
- Crawling: GoSpider via Docker
- CVE Scanning: Nuclei via Docker
- Database: SQLite with WAL mode
- Async: asyncio + aiohttp
- For Docker: Docker & Docker Compose
- For Local: Python 3.10+, Docker (for some agents), nmap (optional)
- OpenRouter API key (get one here)
Use the interactive installation wizard for automatic setup:
# Clone the repository
git clone https://github.com/BugTraceAI/BugTraceAI-CLI
cd BugTraceAI-CLI
# Run the installation wizard
./install.shThe wizard will:
- ✅ Check system requirements automatically
- 🔍 Detect and use free ports for Docker (no conflicts!)
- ⚙️ Set up environment configuration
- 🐳 Build and start Docker containers OR configure local Python environment
- 🎨 Provide beautiful, interactive terminal UI
Installation Options:
- Local Installation - Python virtual environment (best for development)
- Docker Installation - Containerized deployment (best for production)
Click to expand manual installation instructions
# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Install browser
playwright install chromium
# Configure environment
cp .env.example .env
# Edit .env and add your OPENROUTER_API_KEY# Configure environment
cp .env.example .env
# Edit .env and add your OPENROUTER_API_KEY
# Build and start
docker-compose up -d
# View logs
docker-compose logs -f# Full scan
./bugtraceai-cli scan https://target.com
# Clean scan (reset database)
./bugtraceai-cli scan https://target.com --clean
# Resume interrupted scan
./bugtraceai-cli scan https://target.com --resume
# Start API server (for Web UI)
./bugtraceai-cli serve --port 8000Docker Users:
# API is already running at http://localhost:8000
# (or whatever port was auto-selected during installation)
# Execute scans via API or Web UI
curl http://localhost:8000/healthBugTraceAI is MCP-compatible — control your security scans directly from your AI assistant through natural conversation.
Works with OpenClaw (Telegram-based AI assistant), Claude Code, Cursor, and any MCP-compatible client. Deploy once, control from anywhere.
BugTraceAI exposes its scanning engine as MCP tools via the Model Context Protocol — the open standard for connecting AI assistants to external tools. Your AI assistant can start scans, monitor progress, query findings, and retrieve reports — all through chat.
Using OpenClaw or another AI assistant? Just tell it:
Clone https://github.com/BugTraceAI/BugTraceAI-CLI and deploy it with Docker. Copy
.env.exampleto.envand ask me for theOPENROUTER_API_KEY. Rundocker compose up -dto start both the API and MCP server. Then add the MCP server to your config with base URLhttp://localhost:8001/sse.
# 1. Clone and configure
git clone https://github.com/BugTraceAI/BugTraceAI-CLI
cd BugTraceAI-CLI
cp .env.example .env
# Edit .env → add your OPENROUTER_API_KEY
# 2. Start services (API + MCP)
docker compose up -d
# 3. Verify endpoints
curl -f http://localhost:8000/health # API health check
curl -sf http://localhost:8001/sse # MCP SSE endpointAdd BugTraceAI to your MCP client configuration:
{
"mcpServers": {
"bugtraceai": {
"baseUrl": "http://localhost:8001/sse",
"description": "BugTraceAI Security Scanner"
}
}
}Once connected, your AI assistant can use these tools:
| Tool | Description |
|---|---|
start_scan |
Start a security scan on a target URL |
get_scan_status |
Check scan progress and current phase |
query_findings |
Retrieve vulnerability findings with filtering |
stop_scan |
Stop a running scan gracefully |
export_report |
Get scan report (summary, critical findings, or full) |
- Docker & Docker Compose installed and running
- OpenRouter API key (get one here)
- An MCP-compatible AI assistant (OpenClaw, Claude Code, Cursor, or any MCP client)
| Service | Port | Description |
|---|---|---|
| API | 8000 | REST API + health check |
| MCP | 8001 | SSE transport for AI assistants |
All settings in bugtraceaicli.conf:
[API]
OPENROUTER_API_KEY = sk-or-v1-xxxxx
[SCAN]
MAX_URLS = 100
MAX_CONCURRENT_ANALYSIS = 5
MAX_CONCURRENT_SPECIALISTS = 10
[SCANNING]
MANDATORY_SQLMAP_VALIDATION = True
STOP_ON_CRITICAL = False
[VALIDATION]
CDP_ENABLED = True
VISION_ENABLED = True[LLM_MODELS]
DEFAULT_MODEL = google/gemini-2.0-flash-thinking-exp:free
SKEPTICAL_MODEL = anthropic/claude-3.5-haiku:beta
VISION_MODEL = google/gemini-2.0-flash-thinking-exp:freeGenerated in /reports/:
report_*.json- Machine-readable findingsreport_*.md- Markdown summaryreport_*.html- Executive presentation
Located in /logs/:
execution.log- Detailed tracellm_audit.jsonl- Every AI prompt/responseerrors.log- Error tracking
CANDIDATE → PENDING_VALIDATION → CONFIRMED / FALSE_POSITIVE → PROBE_VALIDATED
AGPL-3.0 License
Copyright (c) 2026 BugTraceAI
See LICENSE for details.
Made with ❤️ by Albert C. @yz9yt