How tracehanami/aiva-ks works
AIVA-KS is a kernel-behavior security monitoring and investigation platform. Its principal workflow observes syscall telemetry, turns it into behavioral features and an attack graph, maps evidence to ATT&CK, and presents risk, explanations, and response recommendations to analysts. The README documents the intended collector/Kafka flow, while the sampled demo confirms the analysis-to-response stages. Backend persistence and the dashboard/API are additional product branches. Kafka, feature extraction, and prediction are documented capabilities but their runtime wiring is not shown in sampled source.
Main entry points: main.py Security engine API · api REST and WebSocket routes · graph_builder.py Behavioral graph · mapping_engine.py MITRE mapping
Components 21
Telemetry
- Linux kernel
- eBPF sensors
ebpf/src - Go collector
ebpf/userspace/collector.go - Kafka stream
Security Analysis
- Feature extraction
ai/feature_extraction - Behavioral graph
ai/graph_engine/graph_builder.py - Intent prediction
ai/intent_prediction - MITRE mapping
ai/mitre_mapping/mapping_engine.py - Evidence and narrative
ai/explainability/explainer.py - Threat heatmap
ai/threat_heatmap/heatmap_engine.py
Response
- Policy engine
response-engine/policy_engine.py - Response executor
response-engine/policy_engine.py
API and Storage
- Security engine API
backend/app/main.py - REST and WebSocket routes
backend/app/api - Copilot service
backend/app/services/copilot_service.py - Incident replay
backend/app/services/replay_service.py - Alert service
backend/app/services/alert_service.py - Persistence models
backend/app/models/orm.py - PostgreSQL database
backend/app/db/session.py
Analyst Interface
- React dashboard
frontend/src/App.tsx
Other components
- Security analyst
Connections 24
- Linux kernel → eBPF sensors: emits syscalls
README.md - eBPF sensors → Go collector: streams events
README.md - Go collector → Kafka stream: publishes events
README.md - Kafka stream → Feature extraction: feeds telemetry
README.md - Feature extraction → Behavioral graph: enriches events
README.md - Behavioral graph → MITRE mapping: provides evidence
demo_full_pipeline.py - MITRE mapping → Evidence and narrative: grounds narrative
ai/explainability/explainer.py - Behavioral graph → Threat heatmap: supplies risk graph
ai/threat_heatmap/heatmap_engine.py - Behavioral graph → Security engine API: maintains graph state
backend/app/main.py - Security engine API → Behavioral graph: ingests events
backend/app/main.py - Security engine API → MITRE mapping: maps events
backend/app/main.py - Security engine API → Threat heatmap: computes scores
backend/app/main.py - Security engine API → Evidence and narrative: generates explanations
backend/app/main.py - Security engine API → Policy engine: evaluates response
backend/app/main.py - MITRE mapping → Policy engine: provides technique matches
response-engine/policy_engine.py - Policy engine → Response executor: returns actions
response-engine/policy_engine.py - REST and WebSocket routes → Security engine API: serves security state
- REST and WebSocket routes → Alert service: handles alert operations
backend/app/api/alerts.py - REST and WebSocket routes → Copilot service: routes chat
- REST and WebSocket routes → Incident replay: routes replay
- Alert service → Persistence models: queries alerts
backend/app/services/alert_service.py - Persistence models → PostgreSQL database: persists records
- React dashboard → REST and WebSocket routes: requests dashboard data
- Security analyst → React dashboard: investigates and approves
frontend/src/App.tsx