How mrfrazer25/ai-osint-security-analyzer works
Project type and purpose
• This is a full-stack Python application with a Streamlit front-end (app.py) and a backend AI orchestration module (ai.py). Its goal is to perform autonomous OSINT (Open-Source Intelligence) security investigations by calling multiple external intelligence APIs and then presenting a synthesized risk assessment in a web UI.
File structure
• Top-level scripts:
• app.py – Streamlit entry point (presentation layer)
• ai.py – Core AI agent logic and orchestration (business logic layer)
• setup.py / pyproject.toml / requirements.txt – Installation, environment setup, and packaging
• Configuration:
• .streamlit/config.toml – Streamlit runtime settings
• .env (generated via setup.py) – API key storage (session-only environment variables)
• No persistent storage or database directories—analysis is entirely in memory.
Extract architectural hints from the README
• The AI agent “automatically selects tools, executes them in sequence, correlates findings, and synthesizes reports.”
• Integrations include Cohere Command A, Shodan, VirusTotal, AbuseIPDB, CVE-Search, CISA KEV, NVD.
• UI complexity levels (Quick Scan, Deep Dive) invoke the same core toolset.
Main components and their interactions
a. Components:
• User / Browser (Streamlit UI)
• Streamlit Server (app.py)
• AI Agent Orchestrator (ai.py)
• External OSINT Services (Cohere, Shodan, VirusTotal, etc.)
• Configuration Store (.env / Streamlit secrets)
b. Relationships & data flow:
– User submits target → Streamlit UI
– UI invokes AI Agent → loads config (API keys)
– AI Agent calls multiple external APIs in a defined sequence
– Responses returned to AI Agent → correlation & synthesis
– Final report fed back to UI → rendered in browser
c. Architectural patterns:
– Layered design (Presentation → Business Logic → Integration)
– Pipeline/orchestration pattern for multi-step tool execution
– In-memory processing (no database)
d. Key technologies:
– Python 3.8+
– Streamlit (front-end)
– Cohere Command A (AI model)
– Shodan, VirusTotal, AbuseIPDB, CVE-Search, CISA KEV, NVD (external APIs)