How saberops/ai_pentest_agent_2 works
AI Pentester is an authorized security-assessment starter with a CLI and FastAPI entry point. Both expose scan requests through the shared scan service, which validates module selection and invokes a LangGraph workflow; the README cautions that scanner modules are placeholders, so this is not yet an executing scanner pipeline. The product also includes scope allowlisting and JSON-to-HTML reporting. Edges reflect shown calls or explicit README statements; scanner execution and database wiring are not evidenced, and the workflow graph excerpt is empty.
Main entry points: main.py Typer CLI · scan.py Scan command · scan_service.py Scan service · report.py Report command
Components 19
User entry points
- Typer CLI
cli/main.py - FastAPI API
backend/app/main.py - Scan command
cli/commands/scan.py
Scan workflow
- Scan service
backend/app/services/scan_service.py - LangGraph workflow
backend/app/agents/graph.py - Scan state
backend/app/schemas/scan.py - Finding schema
backend/app/schemas/finding.py
Assessment modules
- Network scanner
backend/app/modules/network/scanner.py - HTTP scanner
backend/app/modules/http/scanner.py - SQLi scanner
backend/app/modules/sqli/scanner.py - XSS scanner
backend/app/modules/xss/scanner.py
Controls and reporting
- Scope validator
backend/app/core/scope_validator.py - App configuration
backend/app/core/config.py - Tools command
cli/commands/tools.py - Report command
cli/commands/report.py
Other components
- Assessment operator
- JSON scan result
- HTML report
- OpenRouter
Connections 15
- Assessment operator → Typer CLI: runs commands
cli/main.py - Assessment operator → FastAPI API: submits scans
README.md - Typer CLI → Scan command: registers
cli/main.py - Typer CLI → Report command: registers
cli/main.py - Typer CLI → Tools command: registers
cli/main.py - Scan command → Scan service: calls
cli/commands/scan.py - FastAPI API → Scan service: calls
backend/app/main.py - Scan service → LangGraph workflow: invokes
backend/app/services/scan_service.py - Scan state → Finding schema: uses
backend/app/schemas/scan.py - Scan command → JSON scan result: writes JSON
cli/commands/scan.py - Scan command → HTML report: writes HTML
cli/commands/scan.py - JSON scan result → Report command: reads JSON
cli/commands/report.py - Report command → HTML report: writes HTML
cli/commands/report.py - Scope validator → Scan service: gates requests
README.md - App configuration → OpenRouter: configures