How capture0x/redwitness works
RedWitness is a self-hosted LLM application penetration-testing platform. Operators configure a target and sign a bounded authorization scope, then choose test cases and launch a scan. The engine sends probes through target adapters under governor limits, judges responses, and replays suspected violations before recording findings. Operators review evidence and can produce client reports. The graph includes major documented scan capabilities; several specialized scanners and UI-to-API links are represented at their source paths, but their internal wiring was not sampled, so uncertain links are omitted.
Main entry points: engine.py Scan engine · main.py HTTP API · clientreport.py Client reports · page.tsx Scope setup
Components 22
Authorization
- Scope setup
frontend/app/scopes/page.tsx - Signed scope
backend/llm_redteam/scope.py - Scope signing
backend/llm_redteam/signing.py - Request governor
backend/llm_redteam/governor.py
Scan execution
- Target setup
frontend/app/targets/page.tsx - Target adapters
backend/llm_redteam/targets.py - Test target
- Probe library UI
frontend/app/library/page.tsx - Probe library
backend/llm_redteam/library.py - Specialized scans
backend/llm_redteam - Scan engine
backend/llm_redteam/engine.py
Analysis and reporting
- Response judge
backend/llm_redteam/evaluator.py - Replay verification
backend/llm_redteam/verifier.py - OWASP mapping
backend/llm_redteam/owasp.py - Finding risk
backend/llm_redteam/risk.py - Remediation
backend/llm_redteam/remediator.py - Client reports
backend/llm_redteam/clientreport.py - Run review
frontend/app/runs/[id]/page.tsx
Platform operations
- HTTP API
backend/main.py - Run and scope store
backend/llm_redteam/store.py - User authentication
backend/llm_redteam/auth.py
Other components
- Operator
Connections 24
- Operator → Scope setup: configures
- Scope setup → Signed scope: defines limits
- Signed scope → Scope signing: signs content
backend/llm_redteam/scope.py - Operator → Target setup: configures
- Operator → Probe library UI: chooses probes
- Operator → HTTP API: starts scan
- HTTP API → User authentication: checks access
backend/main.py - HTTP API → Run and scope store: loads scope
backend/main.py - HTTP API → Scan engine: starts run
backend/main.py - Scan engine → Run and scope store: records evidence
backend/llm_redteam/engine.py - Scan engine → Probe library: executes cases
backend/llm_redteam/engine.py - Scan engine → Request governor: checks requests
backend/llm_redteam/engine.py - Scan engine → Target adapters: sends probes
backend/llm_redteam/engine.py - Target adapters → Test target: sends requests
- Scan engine → Response judge: evaluates replies
backend/llm_redteam/engine.py - Scan engine → Replay verification: confirms findings
backend/llm_redteam/engine.py - Probe library → Specialized scans: includes scenarios
backend/llm_redteam/library.py - Response judge → OWASP mapping: maps categories
backend/llm_redteam/evaluator.py - Client reports → OWASP mapping: summarizes coverage
backend/llm_redteam/clientreport.py - Client reports → Finding risk: scores findings
backend/llm_redteam/clientreport.py - Client reports → Remediation: uses guidance
- Operator → Run review: reviews results
- HTTP API → Client reports: builds reports
backend/main.py - HTTP API → Specialized scans: offers scan capabilities
backend/main.py