BugTraceAI-CLI

April 7, 2026 Β· View on GitHub

Website Wiki Documentation License Status Python Docker MCP Made with


πŸ“‘ Table of Contents


πŸ† 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.

🚨 Disclaimer

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.

✨ Features

BugTraceAI-CLI implements a 6-phase pipeline that mirrors a professional penetration testing workflow.

Phase 1: Reconnaissance

  • πŸ•·οΈ 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

Phase 2: Discovery (DASTySAST)

  • 🧠 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

Phase 3: Strategy

  • 🎯 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)

Phase 4: Exploitation

Real tools, real payloads, real results β€” 14 autonomous specialist agents:

AgentTargetMethod
πŸ”₯ XSSAgentCross-Site ScriptingPlaywright browser + 6-level escalation pipeline
πŸ’‰ SQLiAgentSQL InjectionSQLMap with WAF bypass tamper scripts
🎭 CSTIAgentClient/Server-Side Template InjectionAngularJS, Vue, Jinja2, Twig, Mako
🌐 SSRFAgentServer-Side Request ForgeryOOB callback verification
πŸ“„ XXEAgentXML External EntityDTD injection + OOB exfiltration
πŸ”“ IDORAgentInsecure Direct Object ReferenceID manipulation + path segment testing
πŸ“ LFIAgentLocal File InclusionPath traversal with filter evasion
🧩 PrototypePollutionAgentPrototype PollutionBrowser-based property verification
πŸ”Œ APISecurityAgentAPI SecurityBroken Object Level Authorization (BOLA) testing
πŸ”‘ JWTAgentJWT VulnerabilitiesAlgorithm confusion, weak secrets, token forging
πŸ”€ OpenRedirectAgentOpen RedirectHTTP 3xx + DOM-based redirect detection
πŸ’€ RCEAgentRemote Code ExecutionCommand injection + deserialization testing
πŸ“¨ HeaderInjectionAgentHeader InjectionCRLF injection + response splitting
πŸ“¦ MassAssignmentAgentMass AssignmentParameter pollution + privilege escalation
πŸ’€ KaliAgentAdvanced ExploitationFull Kali Linux terminal toolset via MCP (Nmap, Metasploit, etc.)
πŸ•΅οΈ ReconAgentAutomated ReconFully automated ReconFTW orchestration for deep reconnaissance

Phase 5: Validation

  • πŸ–₯️ Chrome DevTools Protocol: Low-level browser verification for XSS
  • πŸ‘οΈ Vision AI: Screenshot analysis confirms visual vulnerabilities
  • πŸ“Έ Evidence Capture: Every confirmed finding includes proof

Phase 6: Reporting

  • πŸ“Š 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

Intelligence Systems

  • πŸ”€ 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
  • πŸ›‘οΈ Ecosystem Robustness: Built-in circuit breakers for infinite loops, adaptive rate-limiting, and cross-interface (LAN/Remote) compatibility.

πŸ”¬ Core Methodology

BugTraceAI-CLI uses a multi-layered approach to maximize accuracy while minimizing false positives.

Multi-Persona Analysis

Instead of a single AI scan, each URL is analyzed by 6 different "personas" providing diverse perspectives:

  1. Bug Bounty Hunter: Focuses on high-impact, reward-worthy issues (RCE, SQLi, SSRF)
  2. Code Auditor: analyzing code patterns, input validation, and logic flaws
  3. Pentester: Standard attack-surface mapping and OWASP Top 10 exploitation
  4. Security Researcher: Novel attack vectors, race conditions, and edge cases
  5. Red Team Operator: Advanced attack chains, privilege escalation, and lateral movement
  6. Skeptical Reviewer: A separate "critic" agent that aggressively filters false positives

Consensus + Skeptical Review

5 Analysis Personas run in parallel
        ↓
Consensus voting (Agreement analysis)
        ↓
6th Persona "Skeptical Agent" Review (Claude Haiku)
        ↓
Passed to specialist agents

Tool-Based Validation

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.

πŸ—οΈ Reactor Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         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β”‚   β”‚
β”‚                                                     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Parallelization Control

Each phase runs with independent concurrency:

PhaseConcurrencyConfigurableNotes
Reconnaissance1NoGoSpider is already fast
Discovery5YesParallel DAST per URL
Strategy1NoSequential dedup + routing
Exploitation10YesParallel specialist agents
Validation1NoCDP limitation (hardcoded)
Reporting1NoSequential 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.

πŸ› οΈ Technology Stack

  • 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

πŸš€ Getting Started

Prerequisites

  • 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.sh

The 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:

  1. Local Installation - Python virtual environment (best for development)
  2. Docker Installation - Containerized deployment (best for production)

πŸ“– Manual Installation

Click to expand manual installation instructions

Local Installation

# 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

Docker Installation

# 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

Quick Start

# 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 8000

Docker 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/health

πŸ€– AI Assistant Setup (MCP)

BugTraceAI 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.

How It Works

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.

Quick Setup for AI Agents

Using OpenClaw or another AI assistant? Just tell it:

Clone https://github.com/BugTraceAI/BugTraceAI-CLI and deploy it with Docker. Copy .env.example to .env and ask me for the OPENROUTER_API_KEY. Run docker compose up -d to start both the API and MCP server. Then add the MCP server to your config with base URL http://localhost:8001/sse.

Manual MCP Setup

# 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 endpoint

Connect Your AI Assistant

Add BugTraceAI to your MCP client configuration:

{
  "mcpServers": {
    "bugtraceai": {
      "baseUrl": "http://localhost:8001/sse",
      "description": "BugTraceAI Security Scanner"
    }
  }
}

Available MCP Tools

Once connected, your AI assistant can use these tools:

ToolDescription
start_scanStart a security scan on a target URL
get_scan_statusCheck scan progress and current phase
query_findingsRetrieve vulnerability findings with filtering
stop_scanStop a running scan gracefully
export_reportGet scan report (summary, critical findings, or full)

Prerequisites

  • 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)

Ports

ServicePortDescription
API8000REST API + health check
MCP8001SSE transport for AI assistants

βš™οΈ Configuration

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

Model Configuration

[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:free

πŸ“Š Output

Reports

Generated in /reports/:

  • report_*.json - Machine-readable findings
  • report_*.md - Markdown summary
  • report_*.html - Executive presentation

Logs

Located in /logs/:

  • execution.log - Detailed trace
  • llm_audit.jsonl - Every AI prompt/response
  • errors.log - Error tracking

Finding Status Flow

CANDIDATE β†’ PENDING_VALIDATION β†’ CONFIRMED / FALSE_POSITIVE β†’ PROBE_VALIDATED

πŸ“œ License

AGPL-3.0 License

Copyright (c) 2026 BugTraceAI

See LICENSE for details.


Made with ❀️ by Albert C. @yz9yt

bugtraceai.com