Decision Graphs & Judges
Versioned YAML graphs with bounded CEL predicates, probability gauges, 16 curated graphs, and replay diff.
Interactive Isometric Architecture Simulators
Deterministic CEL Decision Graph → Calibrated Judge → Signed Alert Outbox
See how noisy kernel streams become high-precision cases and reliable multi-channel alerts under strict UTC budgets.
Ring 0 kernel event commits to append-only SQLite WAL
Tetragon emits a ptrace / privilege-escalation event over Unix gRPC. Ometsuke normalizes untrusted strings through printable() and persists entry #ev-9084 into WAL SQLite.
entry_id: #ev-9084 (node: prod-eu-01)
hook: security_ptrace_access_check
binary: /tmp/.cache/helper -> target pid 1 (systemd)
sanitized: printable() applied before storage & UIStatus (v0.1.0+). The decision engine evaluates matching live and replayed entries across all five step kinds (read, judged, investigated, check, and action). The binary embeds exec-in-container plus 16 curated decision graph templates (/graphs/catalog), supports comparative replay across revisions and thresholds (/graphs/compare), and provides a sealed live visual/YAML Graph editor (/graphs/editor) with 0600 persistence and hot-reload. Embedded graph
#1. Why a decision graph instead of an unconstrained agent
- Inspectable routes: Every opened case preserves the exact path traversed, each step's answer, and its cited ledger entries.
- Low-cost filtering: Fast bounded CEL
readsteps filter benign events before invoking a probability judge or language model. - Deterministic boundaries: Event text is hostile data; graph structure, available exits, and terminal proposals come strictly from operator-owned YAML files.
- Testable before rollout: Comparative replay (
/graphs/compare) evaluates candidate revisions or threshold adjustments against stored events before saving.
#2. Step kinds
| Kind | Evaluates | Exits |
|---|---|---|
read | Bounded CEL predicate over the event, process, container, overlay diff, and related entries | yes, no |
judged | Pinned probability judge (jev, Liquid AI) compared against ordered no_at / yes_at thresholds | yes, no, uncertain |
investigated | Bounded LLM investigation over numbered, redacted evidence (requires configured LLM) | yes, no, uncertain |
check | Bounded CEL predicate that can inspect route_confidence accumulated so far | yes, no |
action | Terminal proposal (isolate-container, kill-process, review) opening a waiting case for a human seal | Ends evaluation |
#3. Graph file format and curated catalog
Graphs are single YAML files loaded from embedded graphs/*.yaml and overridden or extended by -graphs <dir> (and sealed edits saved under <data>/graphs/). Duplicate graph names in the same directory, unknown keys, unreachable steps, cycles, or invalid CEL expressions are rejected on load.
The console ships 16 curated templates in graphs/catalog/ covering container escape, credential theft, fileless memfd chains, cloud IMDS SSRF, crypto-miner egress, SSH lateral movement, LD_PRELOAD hijacks, BPF rootkit watch, io_uring evasion, kernel module tampering, sysctl tampering, log evasion, overlay-dropper egress, and runtime package drift — each linked to its MITRE ATT&CK techniques and required monitor-first TracingPolicies.
#Shipped exec-in-container example
graph: exec-in-container
revision: 1
about: Checks executables started inside containers under /tmp, /var/tmp, or /dev/shm.
judge: {name: jev, version: jev-1.14.0}
enter:
when: event.kind == "exec" && process.container_id != ""
settle: 3s
start: writable-path
steps:
writable-path:
kind: read
ask: Was the program started from a directory anyone can write to?
expr: process.binary.startsWith("/tmp/") || process.binary.startsWith("/dev/shm/") || process.binary.startsWith("/var/tmp/")
yes: dropped
no: close
says: {yes: ran from a writable directory, no: not from a writable directory}
dropped:
kind: judged
ask: Was it put there and then executed by the same session?
proposition: Within the entries shown, a program was copied or downloaded into a world-writable directory, made executable, and then executed.
evidence: {scope: process-tree, window: 60s, max_entries: 40}
no_at: 0.15
yes_at: 0.85
yes: called-out
no: close
uncertain: to-a-person
says: {yes: put there and executed, no: not dropped by this session, uncertain: may have been dropped}
called-out:
kind: read
ask: Did it open a connection to the outside?
expr: entries.exists(e, e.kind == "kprobe" && e.hook == "tcp_connect" && e.binary == process.binary)
yes: confident
no: propose-kill
says: {yes: called out, no: made no connection}
confident:
kind: check
ask: Is the route confidence 0.90 or more?
expr: route_confidence >= 0.90
yes: propose-isolate
no: to-a-person
says: {yes: confident route, no: not confident enough}
propose-isolate: {kind: action, ask: Propose to isolate the container, propose: isolate-container}
propose-kill: {kind: action, ask: Propose to kill the process, propose: kill-process}
to-a-person: {kind: action, ask: Bring it to a person, propose: review}#Top-level and step keys
| Key | Scope | Meaning |
|---|---|---|
graph, revision, about | Top-level | Kebab-case identifier, integer revision ≥ 1, operator summary |
judge {name, version} | Top-level | Exact pinned judge and model version required for judged steps (-latest/-preview refused) |
enter {when, settle} | Top-level | CEL entry predicate and settle window (up to 60s) before walking |
start, steps | Top-level | Entry step ID and ordered step map (max 32 steps, acyclic, all reachable) |
kind, ask | All steps | Step kind (read, judged, investigated, check, action) and operator-readable question |
expr | read, check | Bounded CEL boolean predicate |
proposition, evidence {scope, window, max_entries} | judged, investigated | Claim to score or investigate over process-tree or container evidence (1s–1h, max 40 entries) |
no_at, yes_at | judged | Ordered thresholds (0 <= no_at < yes_at <= 1) |
yes, no, uncertain | Non-terminal | Next step ID or close (uncertain applies to judged and investigated) |
propose | action | isolate-container, kill-process, or review — opens a waiting case; never auto-executes |
says {yes, no, uncertain} | Optional | Short overview labels (≤ 40 chars each) |
#4. Bounded CEL expression environment
Expressions compile with cel.dev/cel-go against read-only event maps:
| Variable | Fields exposed |
|---|---|
event | kind, hook, args, policy, tags, action, severity |
process | binary, args, cwd, pid, uid, in_init_tree, container_id |
container | id, name, image |
image | added_files (read-only Docker overlay diff GET /containers/{id}/changes when Docker is enabled) |
entries | Related ledger entries (kind, hook, args, policy, action, binary, process_args, pid) |
route_confidence | Cumulative confidence across judged hops (double) |
Hard bounds: ≤ 1,024 chars at compile; only has, all, exists, exists_one macros (no map/filter); 100,000 evaluation cost cap; 100 ms soft deadline; ≤ 64 KiB per string, ≤ 256 list items, ≤ 128 related entries, ≤ 1 MiB total text. Any bound violation aborts evaluation rather than silently returning false.
#5. Rules, replay comparison and live editing
- Route confidence: Multiplies judged exit probabilities (
ponyes/uncertain,1 - ponno,0if unjudged). - Fail-safe uncertainty: Unreachable judges/LLMs or exhausted UTC daily budgets (under
personfallback) route downuncertainso unfamiliar activity is surfaced for human review rather than dropped or auto-blocked. - Comparative replay (
/graphs/compare): Evaluates two graph revisions, candidate YAML, or threshold overrides against stored ledger entries without creating cases or mutating state. - Sealed Graph editor (
/graphs/editor): Validates syntax, DAG topology, and CEL rules viaPOST /api/v1/graphs/validate, then writes an owner-only (0600) YAML revision under an operator seal viaPUT /api/v1/graphs/{name}and hot-reloads active evaluators.