Repository navigation
Architecture
flowchart LR
A[JSON / CSV / EVTX] --> B[Normalize and extract indicators]
B --> C[Threat intelligence and correlation]
C --> D[Sanitize and Groq triage]
D --> E[Assessment and uncertainty]
B --> F[Sigma / hunting]
K[Registered file snapshots] --> Y[Optional YARA scan]
E --> G[SQLite / optional PostgreSQL]
F --> G
Y --> G
L[Independent labels] --> H[Evaluation]
E --> H
H --> G
G --> I[FastAPI and analyst dashboard]
I --> J[Human review]
Labels, model assessments, rule detections and analyst dispositions remain distinct. Stored evidence references are structural links, not proof that a model claim is factually supported. See architecture decisions.
For example, a synthetic process event is normalized into an alert, its extracted indicators can be enriched, and related alerts become a timeline. A sanitized timeline can produce a Groq assessment; if independent labels are available, the evaluator scores it. The dashboard presents the evidence, model output and any separate analyst review. Provider failures are recorded as unavailable outcomes. The correlation engine defaults to a 30-minute gap and a 100-event cap; shared identifiers support grouping but do not prove that events belong to one incident.
src/engine/llm.py owns shared privacy, prompt and cache processing;
src/engine/groq.py owns the active provider's request/response contract.
The pipeline's implementation is verified offline. An operator-checked three-case
CLI/database/API/dashboard run matched stored counts (three unavailable outcomes,
zero scored; 2026-11-09). Successful-verdict display and broader interactive UI
verification were not established by that run; it does not establish AI quality.
Later synthetic browser checks are recorded in TASKS.md.
- Human Analyst Authority: AI output provides structured evidence and suggested response actions, never autonomous remediation.
- Independent Ground Truth (ADR-008): AI predictions and reference labels are stored and evaluated separately. The prompt serializer recursively filters structured evaluation/provenance metadata beneath allow-listed telemetry fields, including nested lists and key variants (ADR-040). Original evidence and independent provider detection counts are preserved. Dataset adapters must keep labels and provenance out of free-form observable text; see the prompt-isolation verification.
- Prompt Injection Boundaries (ADR-023): Evidence is delimited as untrusted input and the model is instructed not to follow instructions in it. This does not guarantee resistance to prompt injection.
- PII and Secret Scrubbing (ADR-018, ADR-019): Masking targets credentials, private keys, emails and other supported patterns before external transmission; it cannot guarantee removal of every sensitive value.
- Measurable Confidence Calibration (ADR-025): Model confidence scores are evaluated using Brier scores and Expected Calibration Error (ECE) across 5 probability bins.
- SQL Injection Defense (ADR-015, ADR-019): KQL-style hunting filter expressions are compiled to parameterized queries for the supported SQLite and PostgreSQL dialects.