How biniamf/ai-reverse-engineering works
Rev·Deck is a local static-analysis workstation for examining binaries through Ghidra and asking an evidence-citing LLM copilot bounded questions. The user uploads a binary, confirms any plain-text warning, and starts an analysis job; the app proxies requests to Ghidra, then presents deterministic evidence and optional assistant workflows. The browser talks only to Flask. The graph preserves the distinct upload, analysis, evidence-browsing, and assistant stages, plus the tool/context layer. Some route wiring is inferred from the README because the sampled server excerpts are partial.
Main entry points: app.py API routes · ghidra_assistant.py Assistant agent · app.js Workspace UI · ghidra_client.py Ghidra client
Components 18
Browser workspace
- Workspace UI
webui/static/js/app.js - Job controls
webui/static/js/jobs.js - Evidence views
webui/static/js/analysis.js - Chat workspace
webui/static/js/chat.js
Flask application
- API routes
webui/app.py - Upload checks
webui/file_preflight.py - Request validation
webui/validation.py
Analysis services
- Ghidra client
webui/ghidra_client.py
Assistant runtime
- Assistant agent
webui/ghidra_assistant.py - Tool registry
webui/tools.py - Workflow modes
webui/workflows.py - Bounded context
webui/context.py - Citation handling
webui/citations.py
Application state
- Chat history
webui/chat_store.py - Summary cache
webui/cache.py
Other components
- Analyst
- Ghidra service
- LLM endpoint
Connections 22
- Analyst → Workspace UI: uses
- Workspace UI → Job controls: creates
- Workspace UI → Evidence views: creates
- Workspace UI → Chat workspace: creates
- Job controls → API routes: job requests
- Evidence views → API routes: evidence requests
- Chat workspace → API routes: chat requests
- API routes → Upload checks: checks uploads
- API routes → Request validation: validates input
- API routes → Ghidra client: proxies analysis
- Ghidra client → Ghidra service: requests analysis
- API routes → Assistant agent: runs chat
- Assistant agent → Tool registry: dispatches tools
- Assistant agent → Workflow modes: selects workflow
- Assistant agent → Bounded context: bounds messages
- Assistant agent → Ghidra client: fetches evidence
- Assistant agent → LLM endpoint: sends prompts
- LLM endpoint → Assistant agent: returns output
- Assistant agent → Chat history: persists history
- API routes → Chat history: reads history
- API routes → Citation handling: validates citations
- API routes → Summary cache: uses summaries