How protectai/vulnhuntr works
Main Components
a) Core Components:
• Input Handler (handles repository/file paths and CLI arguments)
• Symbol Finder (static code analysis component)
• LLM Integration Layer (manages different LLM providers)
• Vulnerability Analysis Engine
• Output Generator
b) External Services:
• LLM Providers (Claude, GPT, Ollama)
• Target Repository/Files
┌─ Input Layer ─────────────────────────────┐
• CLI Interface Repository/Files │
• Processing Layer ──────────────────────┐ │
• ┌─ Symbol Finder ─┐ ┌─ LLM Layer ─┐ │ │
• Static Analysis │◄──►│ API Client │ │ │
• Engine │ │ Manager │ │ │
• ┬─┘ └─────┬───────┘ │ │
• ┌────────▼───────────▼──────┐ │ │
• Vulnerability Analyzer │ │ │
• ┬──┘ │ │
• ┼─────┘ │
• ┌─ Output Layer ───────────────▼─────┐ │
• Reports Logs PoC Generator │ │
• ┘ │
• ┘
Key Relationships to Highlight
a) Data Flow:
• Repository/File → Symbol Finder
• Symbol Finder ↔ LLM Layer
• LLM Layer → External LLM Services
• Vulnerability Analyzer → Output Generator
b) Control Flow:
• CLI Interface → Input Handler
• Input Handler → Symbol Finder
• Symbol Finder → Vulnerability Analyzer
• Vulnerability Analyzer → Report Generator
Important Details
a) Supported Vulnerability Types:
• LFI
• AFO
• RCE
• XSS
• SQLI
• SSRF
• IDOR
b) LLM Provider Options:
• Claude (Anthropic)
• GPT (OpenAI)
• Ollama (Experimental)
Special Notes
• Iterative nature of the analysis process
• How the tool chains together multiple analyses
• Where the README summary is incorporated
• Progression from initial to secondary analysis
Remember to maintain a balance between detail and clarity, focusing on the tool's unique approach to vulnerability discovery through the combination of static analysis and LLM-powered reasoning.