Security Monitor
How the Platform Works
A deep dive into the 100% private, local-first security pipeline โ 50+ CIS Benchmark controls, zero cloud storage, local AI via Ollama, and CVE matching via OSV.dev.
System Architecture
Security Tools Hardener โ Cloud Security Pipeline
Data Flow โ Step by Step
API Routes Reference
/api/monitor/agent/download
Returns Python agent script (macOS / Linux) or .bat / .ps1 (Windows) with session_id baked in
/api/monitor/agent/upload
Receives CIS findings from agent (agent_mode=cis-deterministic), persists to Supabase, returns view_url
/api/monitor/agent/pending
Browser polls this to retrieve latest scan payload for the current session_id (Supabase relay)
/api/monitor/agent/collect
Collects raw snapshot data from agent โ pre-processes before CIS analysis
/api/monitor/scan/stream
SSE โ re-runs 50+ CIS rules + AI multi-pass via Claude, streams findings + hardening checklist
/api/monitor/validate
Runs read-only verification command on machine โ whitelisted safe commands only
/api/monitor/remediate
Executes AI-generated fix command with dry-run mode and rollback command recorded
/api/monitor/cve/check
Batch CVE lookup via OSV.dev for installed packages (Homebrew / Debian / npm)
/api/phishguard-scan
PhishGuard email scanner โ checks links, OAuth scopes, BEC signals via Claude (server-side)
/api/monitor/chat
AI security assistant (Claude) โ answers questions about the machine's security posture
/api/monitor/settings
Loads / saves persisted scanner settings (AI preferences, thresholds, notifications)
50+ CIS Benchmark Controls
Every control shown with pass/fail/manual_review โ macOS, Linux & Windows supported
Real Verification
Run Check executes actual shell commands and shows real output inline
Claude AI Engine
Claude (Anthropic) powers deep analysis, remediation, and PhishGuard email scanning
CVE matching via OSV.dev
Free, no API key, Homebrew + Debian + npm package support
Tech Stack
Data Sovereignty
Sensitive system data is stored only in Supabase (your own project) and browser IndexedDB. The agent script runs locally โ findings are POSTed directly to your session. Nothing is processed by third-party cloud services.
Local AI Intelligence
Ollama runs entirely on your machine. The /api/ai/proxy route forwards requests to localhost:11434, so AI enrichment, remediation scripts, and chat all happen without a single byte of config leaving your network.
CVE Matching
macOS: outdated Homebrew packages detected via the formulae.brew.sh API โ shows installed vs. latest version. Linux: packages batch-checked against OSV.dev (Debian ecosystem) for real CVE IDs and CVSS scores. No API key required for either.
PhishGuard
Phishing Detection Pipeline
Multi-layer email analysis โ client-side heuristics, DNS-over-HTTPS SPF/DMARC validation, RDAP domain age, AI deep-analysis (BYOK), and screenshot vision scanning โ all without storing your email content.
Analysis Pipeline โ Step by Step
PhishGuard API Routes
/api/phishguard-scan
SPF/DMARC lookup via Cloudflare DoH, domain extraction, saves scan result to Supabase
/api/phishguard-enrich
RDAP domain age check via rdap.org โ flags newly registered domains (free, no key)
/api/phishguard-analyze
BYOK AI proxy โ routes to Anthropic or OpenAI with user-provided key, key never stored
/api/phishguard-vision
Screenshot analysis via AI vision model โ detects spoofed login pages and brand impersonation
/api/phishguard-report
Retrieves saved scan result for report rendering and PDF export
/api/phishguard-generate-report
Generates full structured report with indicator breakdown and AI explanation
BYOK โ No Key Stored
Your Anthropic/OpenAI key is passed per-request over HTTPS and used immediately โ never persisted
DNS-over-HTTPS
SPF & DMARC checked via Cloudflare 1.1.1.1 DoH โ no plaintext DNS leakage
RDAP Domain Age
Newly registered domains (<30 days) flagged as high-risk using free rdap.org API
No Email Body Stored
Raw email content is never sent to the server โ analysis runs client-side or via proxied AI key