Autonomous Resilient Kubernetes SRE Incident Remediation Engine Engineered for Mission-Critical Infrastructure & Kerala Police Cyberdome Digital Forensics
Zervox is an out-of-band, high-availability SRE resilience engine engineered to survive catastrophic Kubernetes control-plane failures. Operating strictly outside the clusters it protects, Zervox autonomously ingests alerts, conducts AI and deterministic root-cause analysis, preserves tamper-evident forensic memory traces, enforces unbypassable hardware and OPA security gates, and self-heals its own leadership topology via active-standby mTLS heartbeats.
Building this in the open β if it saves you time, a star helps others find it. Found a bug, or have an idea? Open an issue. New here? Start with a good first issue. New remediation patterns and OPA policy packs welcome.
The Zervox UI is built on a clean, modern SaaS design system (inspired by Linear and Vercel) with dedicated, spacious routes and high-contrast Light/Dark mode accessibility:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β‘ Zervox SRE [Overview] [Incidents] [Forensics & Air-Gap] [Chaos] β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Route | Page Name | Core Capabilities & Components |
|---|---|---|
/ |
System Dashboard & Telemetry | β’ Dual-Engine Watchdog: Telemetry cards for Primary Engine (Track A) & Backup Engine (Track B) with round-trip latency, uptime, and peer mTLS status. β’ Autonomous Engine Mode: Real-time AI (cloud LLM) vs Deterministic Fallback status. β’ Split-Brain Sentinel Graph: Full-width interactive network topology map with one-click mTLS heartbeat sever simulation. β’ 8-Point KPI Matrix: Live health checkpoints for Commander, State, Mode, Hardware, Uptime, Incidents, OPA, and K8s. |
/incidents |
Incident Control & Remediation | β’ Glass Box Root Cause Trail: 4-step visualizer revealing raw alert payload, prompt construction, LLM reasoning chain vs 1.2ms fallback execution, and OPA policy evaluation. β’ Remediation Timeline: Vertical SQLite WAL audit ledger displaying tamper-evident Merkle hashes, execution times, and one-click cryptographic snapshot downloads. |
/forensics |
Air-Gap Defense & Forensic Vault | β’ Forensic Freeze Frame: Pre-remediation /proc memory dumps and open socket dumps sealed with SHA-256 Merkle trees before container restarts.β’ Optical QR Data Diode: Fullscreen camera-scannable QR beacon transmitting telemetry across physical air-gaps without network cables. β’ Ed25519 Attestation Beacon: Continuous cryptographic signature rotating every 3s with active socket breach detection. β’ OPA Rego Diff Modal: Visual comparison of blocked destructive actions vs safe remediation alternatives. |
/chaos |
Judges Chaos Simulation Bench | β’ One-Click Injections: Pod Crash Loop (01), Malicious RBAC Deletion (02), Node Cordon Dual-Key (03), Repeating Attack Adaptive Immune Quarantine (04). β’ Live Feedback Banners: Instant visual confirmation with direct deep-links to WAL ledger and forensic snapshots. β’ Primary Host Kill Simulator: Heartbeat failover test ensuring sub-3s backup promotion with zero data loss. |
- Light Mode: Crisp white (
#ffffff) surface with deep slate typography (#0f172a,#334155) and deep teal accents (#0f766e) passing strict WCAG AAA contrast standards. - Dark Mode: Deep slate (
#020617) canvas with subtle gray borders (rgba(255,255,255,0.08)) and soft teal glowing accents. - Class-Based Switching: Fully synchronized
.darkclass anddata-themeattribute powered bydarkMode: 'class'in Tailwind to eliminate OS preference conflicts and FOUC.
[ OUT-OF-BAND SRE DOMAIN ]
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β ββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββ β
β β Next.js Control Plane β β STANDBY DORMANT NODE β β
β β (Port 3000) ββββ[ REST Telemetry ]ββββ€ [ zervox-core --backup ] β β
β β β’ Forensic Vault UI β β β β
β β β’ Air-Gap Optical QR β ββββββββββββββββ²ββββββββββββββββ β
β β β’ Proof Simulation Bar β β β
β βββββββββββββ²βββββββββββββ β (mTLS Heartbeat) β
β β βΌ β
β βββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββ β
β β ACTIVE PRIMARY LEADER (zervox-core --primary) β β
β β β β
β β [ Ingestion Gate ] (JWT Auth / Alertmanager / Fuzz-Tested) β β
β β β β β
β β βββββββββββββββββββββββββββββββββββββββββββ β β
β β βΌ βΌ β β
β β [ AI Engine ] βββ(10s Wall Clock / Cut)βββΊ [ Local Fallback ] β β
β β (gpt-4o-mini) (Deterministic Rules) β β
β β β β β β
β β ββββββββββββββββββ¬βββββββββββββββββββββββββ β β
β β βΌ β β
β β [ OPA Rego Security Gate ] βββββββββΊ [ Embedded OPA Server ] β β
β β (Immutable Blast-Radius) (localhost:8181) β β
β β β β β
β β [ Adaptive Immune System ] β β
β β (30-Min Dynamic Quarantine on Repeating Attacks) β β
β β β β β
β β ββββββββββββββββββ΄βββββββββββββββββββββββββ β β
β β βΌ βΌ β β
β β [ Forensic Freeze Vault ] [ Hardware Circuit-Breaker ] β β
β β (SHA-256 Memory Snapshot) (ESP32-C3 / RISC-V Dual-Key) β β
β β β β β β
β β ββββββββββββββββββ¬βββββββββββββββββββββββββ β β
β β βΌ β β
β β [ Kubernetes Executor ] (Server-Side Apply force) β β
β β β β β
β β βΌ β β
β β [ SQLite WAL Store ] (5s Busy Timeout / Retry Backoff) β β
β βββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββ
β KUBERNETES CLUSTER β (kube-rs via TLS) β
β βΌ β
β [ Prometheus ] ββ(Webhook Alerts)βββΊ (victim-api / Deployments / Nodes) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
See full technical documentation in docs/INNOVATIONS.md and pending tasks in TODO.md.
-
Forensic Freeze Frame (Immutable Evidence Snapshot Before Remediation):
- Problem: Standard auto-healing instantly deletes broken pods, permanently destroying volatile memory, active network sockets, and attacker artifacts.
- Innovation: On threat detection, captures
/procmemory dumps and network sockets into an immutable SHA-256 Merkle tree, writing to an append-only ledger before container teardown. - Policy Guarantee: Rego gate enforces
remediate == true only if evidence_hash != null.
-
Glass Box Root Cause Trail (LLM Reasoning Chain Visualizer):
- Problem: SOC teams distrust black-box AI remediation because nobody can audit why actions fired.
- Innovation: Emits a structured chain-of-thought decision graph with live confidence percentages. If the LLM exceeds a 10s deadline, the graph visibly reroutes to the deterministic rule engine in 1.2ms.
-
Policy Firewall Replay (Rego Gate "Blocked Action" Theater):
- Problem: Zero-trust automation demos only show the happy path, never proving the safety ceiling.
- Innovation: Staged attack replay with live diff modal: proposed destructive action (strikethrough) vs allowed alternative, citing exact Rego rule
REG-001.
-
Split-Brain Sentinel (Live Failover Visualization):
- Problem: HA claims are difficult to prove without causing chaos in production.
- Innovation: Real-time topology map connected by an mTLS heartbeat link (
TCP 9000). Severing primary triggers automated sub-3s backup promotion with zero dropped incidents via replicated SQLite WAL.
-
Air-Gap Attestation Beacon (Cryptographic Isolation Proof):
- Problem: Regulated facilities (critical infra, police crime labs) require proof of zero internet egress.
- Innovation: Continuous Ed25519 cryptographic attestation signed every 3s into the immutable ledger, with real-time breach detection if an unauthorized socket is opened.
Zervox analyzes raw Kubernetes control plane behavior rather than just hardware telemetry, correlating multi-stage attacks across an uncompromisable out-of-band sliding window:
Ingests standard Kubernetes Audit Webhook JSON batches (EventList, single Event, or arrays) and executes real-time signature matching:
SIG-DESTRUCTIVE-API(+80 Score): Malicious or unauthorized deletion of namespaces or cluster nodes.SIG-PRIV-CONTAINER(+50 Score): Spawning privileged containers,hostPID/hostNetworkescapes, or host root filesystem mounts.SIG-RBAC-TAMPER(+40 Score): Unauthorized patching or creation ofClusterRole,Role,ClusterRoleBinding, orRoleBinding.SIG-SECRET-SWEEP(+30 Score): Bulk unauthorized reconnaissance or sweeping access to cluster secrets (GET /api/v1/secrets).SIG-UNKNOWN-IDENTITY(+20 Score): Anomalous access patterns from unauthenticated subjects or unrecognized service accounts.
Suspicious events are buffered in a thread-safe sliding window (5-minute TTL) keyed by normalized actor identities (ServiceAccount > Source IP > User). Cumulative threat scores determine autonomous escalation:
0 β 30(LOW): Passive logging & baseline observation.31 β 60(MEDIUM): Automatic alert elevation, SOC notification, and forensic memory snapshotting.61 β 80(HIGH): Targeted workload containment (safe pod eviction / replica restart).81 β 100+(CRITICAL): Immediate automated cluster isolation via zero-trust network quarantine.
-
Dynamic NetworkPolicy Quarantine: When critical attacks or repeat violations occur, Zervox dynamically synthesizes and applies a default-deny Ingress and Egress
NetworkPolicytargeting the compromised workload usingkube-rsandk8s-openapi. -
Post-Action Polling Loop: Following any remediation action (e.g.
RestartPod), the engine polls the Kubernetes API until the target workload reaches desired state (Pod phase == Runningand conditionReady == True), avoiding assumption-based healing. -
Automated Escalation Matrix: If post-remediation polling times out or fails (e.g., container crashloops or threat score keeps rising), Zervox automatically escalates containment:
$$\text{RestartPod Failure} \longrightarrow \text{NetworkPolicy Quarantine} \longrightarrow \text{Node Cordon}$$
| Endpoint | Method | Description |
|---|---|---|
/healthz |
GET |
Health probe returning role, cluster state, and uptime |
/api/status |
GET |
Telemetry payload (engine mode, peer status, incident feed, hardware state) |
/api/telemetry |
GET |
Next.js server-side unified telemetry route (zero CORS / zero browser shields issue) |
/api/action |
POST |
Next.js server-side chaos & simulation proxy route |
/api/v1/audit |
POST |
Kubernetes Audit Webhook ingestion for threat signatures & correlation |
/api/grafana_webhook |
POST |
Prometheus / Alertmanager / Grafana webhook ingestion endpoint |
/api/v1/alerts |
POST |
Prometheus native alert webhook endpoint |
/api/simulate_attack |
POST |
Security simulation trigger (evaluates OPA / Immune gate) |
/api/incidents/:id/forensics |
GET |
Retrieve cryptographic SHA-256 forensic snapshot package |
/api/immune/status |
GET |
Inspect workloads currently under active 30-minute quarantine |
/api/immune/reset |
POST |
Operator override to release workload from quarantine |
/api/hardware/status |
GET |
Query physical RISC-V / ESP32 coprocessor armed state |
/api/hardware/toggle |
POST |
Toggle hardware circuit-breaker arm/disarm simulation |
cd zervox-core
cargo test --all- Unit Tests: 34/34 PASSED (Policy OPA rules, Threat signatures, Correlation sliding window, NetworkPolicy quarantine, Closed-loop verification & escalation, Hardware breaker, SQLite WAL retry, Watchdog promotion)
- Fuzz Tests: 1/1 PASSED (Arbitrary byte Grafana webhook payload fuzzing)
- Integration Tests: 6/6 PASSED (E2E Webhook, Audit Webhook threat detection & correlation, Security policy rejection, Health check, Status telemetry)
- Total: 41/41 passing tests with 0 failures.
Run the interactive terminal orchestrator to demonstrate all 6 scenarios live to judges:
chmod +x scripts/demo-runbook.sh
./scripts/demo-runbook.sh- Scenario 1: Organic Pod OOM Crash β Forensic Freeze & Auto-Restart
- Scenario 2: Malicious RBAC Namespace Deletion β OPA Gate Blocked
- Scenario 3: Total WAN Cut β Instant Deterministic Local Fallback
- Scenario 4: Primary Node SIGKILL β Dormant Standby Watchdog Promotion (<6s)
- Scenario 5: Node Cordon β Physical Dual-Key Hardware Circuit-Breaker Verification
- Scenario 6: Repeating Attack β Adaptive Immune System 30-Minute Quarantine
Launch the complete 4-service stack:
docker compose up --build -d| Service | Endpoint | Description |
|---|---|---|
| Control Plane UI | http://localhost:3000 | Next.js 14 App Router Multi-Page Control Plane |
| Primary Core Engine | http://localhost:8080 | Active Leader (Ingestion, OPA, WAL, TCP 9000 Heartbeat) |
| Backup Core Engine | http://localhost:8081 | Dormant Standby Sentinel (mTLS Polling Listener) |
| OPA Policy Server | http://localhost:8181 | Rego Zero-Trust Policy Decision Engine |
To view live service logs:
docker compose logs -f zervox-ui zervox-primary