Architecture Overview
Deep architectural breakdown of the Kavach Control Plane, Data Plane runners, OPA Policy Engine, and MCP Security Gateway.
Control Plane vs. Data Plane Topology
Kavach follows a strictly decoupled control-plane and data-plane architecture. The Control Plane (FastAPI + PostgreSQL + Next.js) coordinates policy, projects, and cryptographic audit ledgers. The Data Plane consists of ephemeral worker nodes that execute security scanners, compile Abstract Syntax Trees, and sandbox patch executions.
Deterministic OPA Policy Engine
All access decisions and CI/CD merge gating are evaluated against Open Policy Agent (OPA) WebAssembly modules. Rego rules define non-negotiable thresholds: e.g. "Deny merge if any CRITICAL vulnerability with reachable call-graph path exists in production branch".
Persistence & Cryptographic Ledgers
All project configurations, findings, scan manifests, and agent tool execution events are persisted in PostgreSQL with SHA-256 integrity hashes. This ensures full traceability required for SOC 2 Type II, ISO 27001, and HIPAA compliance.
