Open-source AI Security Operations Center: alert fusion, LLM-agent triage, MITRE ATT&CK investigation, and a replayable decision ledger for every agent step. Self-hostable, runs with no API keys, MIT licensed. Ships an MCP server for Claude, Cursor and Continue.
Python agentic-aiai-securityalert-triageblue-teamcybersecuritydetection-engineeringincident-responselanggraphllm-agentsmcpmitre-attackmodel-context-protocolpurple-teamsecurity-operationsself-hostedsiemsoarsocthreat-detectionthreat-intelligence
perf(4.4): publish a realistic-mix run, and the defect the first one found
Beenu Aroraf6bd7071a21f
diff --git a/apps/docs/docs/operations/performance.md b/apps/docs/docs/operations/performance.mdindex c88cae3d7..869dabb9e 100644--- a/apps/docs/docs/operations/performance.md+++ b/apps/docs/docs/operations/performance.md@@ -107,6 +107,65 @@ there is no `go.mod` -- the producer is its own module -- so the subprocessfailed before starting. Earlier published figures must have come from aprebuilt `--producer-bin`, which needs no module context.+## Single host, Docker Compose, realistic mix, 2026-10-11++Every run above pushes one event shape, and every instance of it becomes+an alert. No estate looks like that. In a real deployment almost all+telemetry is routine, and the work fusion does is evaluating the detection+corpus against traffic that matches nothing — so an all-alerting harness+over-measures the alert path and under-measures detection.++This run is **one alerting event in every hundred** (`--alert-every 100`).+The other ninety-nine are routine authentication telemetry: successful+sign-ins, satisfied MFA challenges, read-only console views.++| | Saturation, 1-in-100 mix |+|---|---|+| Events pushed | 6,000 (60 alerting, 5,940 routine) |+| Ingest accepted | 122.6 events/s |+| Event-to-alert p50 | 946 ms |+| Event-to-alert p95 | **1,195 ms** |+| Event-to-alert p99 | 1,503 ms |+| Event-to-alert max | 1,503 ms |+| Peak consumer lag | 15 messages |+| Lag after drain | 0 messages |+| Routine events that raised an alert | **0 of 5,940 (0.00)** |+| Alerting events that raised no alert | 0 of 60 |+| Alerting events that raised more than one | 0 |+| Dead-letter rate | 0.00 |++Artefact: `docs/perf/results/2026-10-11-compose-realistic-mix.json`.+**Not an SLO.** One deployment, the machine named at the top of this page,+that date.++### What the first attempt at this measured, and why it is worth knowing++The first run of this mix reported a routine-event alert rate of **1.00**:+every one of the 3,960 "benign" events became an alert. Not because the+detection corpus fired on them — because of where they entered.++The load path sends an undeclared connector type. The ingest normalizer's+generic fallback files an undeclared connector as class 2001, Security+Finding, and the promoter promotes OCSF category 2 unconditionally.+**Eight of the twelve declared connector profiles are category 2**, so on+those connectors no event can be routine whatever it contains.++The routine population is therefore sent as `okta_system_log`, class 3002+(Authentication), where promotion needs `severity_id >= 4` — a property of+the event rather than of the connector. That is what the 0.00 above is+measuring.++### Two things this run is not++**It is not a measure of the rule index.** The stack it ran against is the+published image set, not a build of the branch that added the index to+fusion. The index is measured separately and in process: 2,511 rules,+797 candidates for a routine cloud event (a 68.3% reduction), and+2.760 ms/event down to 1.066 ms/event over 2,000 iterations — a 2.6x+improvement on detection evaluation alone.++**It is not a cloud-hardware run.** See the note at the end of this page.+## Three-node Kubernetes (kind), 2026-09-27Installed from `infra/helm/aisoc` with `values-ha.yaml` and@@ -191,3 +250,38 @@ appearing on the promotion hot path. They are deliberately not set near themeasured values: GitHub runners are shared, throttled and noisy, and a gatethat fires on runner jitter gets disabled within a week. **A passing perf jobis not evidence that any number on this page still holds on your hardware.**++## No cloud-hardware run exists yet, and that is a gap++The depth plan asks for a run on stated cloud hardware, aiming at a+sustained 5,000 events/s through detection at p95 under 2 seconds on one+documented instance size.++**Not measured.** Every figure on this page comes from a laptop — one+18-core Apple-silicon host and one 6-CPU Linux VM on it — or from a kind+cluster on the same machine. No cloud instance has been provisioned for+this project, so there is no row here for one, and no number on this page+should be read as describing one. A laptop VM's disk, network and CPU+scheduling are not an instance type's, and extrapolating from one to the+other is how a figure becomes a promise nobody can keep.++What is needed to close it is an account and an instance, not code: the+harness already records the hardware fingerprint, the load shape and the+commit into every result file, and `scripts/check_perf_results.py` already+refuses a result that drops any of them. Running++```bash+python3 scripts/perf/load_harness.py \+ --target compose --events 500000 --workers 32 --batch 100 \+ --alert-every 100 --target-eps 5000 --drain-timeout 1800 \+ --assert-benign-alert-rate-max 0.001 \+ --out docs/perf/results/<date>-<instance-type>-realistic-mix.json+```++on a named instance type produces the row, and the result file carries the+machine it came off so it cannot later be quoted as something else.++Until then the honest statement is the one at the top of this page: these+are measurements of specific deployments on specific hardware on specific+dates, they are not a service-level objective, and the 5,000 events/s+target remains an aim rather than a result.diff --git a/docs/perf/results/2026-10-11-compose-realistic-mix.json b/docs/perf/results/2026-10-11-compose-realistic-mix.jsonnew file mode 100644index 000000000..239509ee5--- /dev/null+++ b/docs/perf/results/2026-10-11-compose-realistic-mix.json@@ -0,0 +1,174 @@+{+ "schema": "aisoc.load_harness/v1",+ "measured_at": "2026-10-11T06:01:33+00:00",+ "hardware": {+ "os": "Darwin 25.5.0",+ "arch": "arm64",+ "python": "3.11.15",+ "cpu_count": 18,+ "cpu": "Apple M5 Max",+ "memory_bytes": "137438953472",+ "container_runtime": "docker 29.5.2",+ "runtime_cpus": "6",+ "runtime_memory_bytes": "16732983296"+ },+ "deployment": "docker-compose",+ "not_a_production_slo": true,+ "slo_disclaimer": "These are measurements of one deployment on the hardware named above, on the date named above. They are not a service-level objective and no support commitment is derived from them. Sustained throughput on other hardware, other storage and other event mixes will differ. The regression floors in perf.yml are set well below the measured values so they fire on a catastrophic regression rather than on runner jitter.",+ "run": {+ "run_id": "p91698437",+ "attempted_events": 6000,+ "accepted_events": 6000,+ "alerts_observed": 60,+ "distinct_events_alerted": 60,+ "alerting_events_sent": 60,+ "benign_events_sent": 5940,+ "benign_events_that_alerted": 0,+ "alert_every": 100,+ "missing_events": 0,+ "duplicate_alert_rows": 0,+ "push_wall_seconds": 48.954691958,+ "drain_wall_seconds": 0.08662676811218262,+ "drain_settled": true,+ "clock_offset_seconds": -0.22664189338684082,+ "clock_offset_spread_seconds": 0.0026655197143554688,+ "producer": {+ "run_id": "p91698437",+ "mode": "load",+ "marker_prefix": "aisoc-load",+ "benign_marker_prefix": "aisoc-load-benign",+ "alert_every": 100,+ "alerting_events_sent": 60,+ "benign_events_sent": 5940,+ "ingest_url": "http://localhost:8081/v1/ingest/batch",+ "tenant": "00000000-0000-0000-0000-000000000001",+ "started_at": "2026-10-11T06:00:38.013462Z",+ "ended_at": "2026-10-11T06:01:26.968153958Z",+ "wall_seconds": 48.954691958,+ "workers": 6,+ "batch_size": 25,+ "target_eps": 0,+ "requested_events": 6000,+ "attempted_events": 6000,+ "accepted_events": 6000,+ "rejected_events": 0,+ "refused_events": 0,+ "transport_error_events": 0,+ "accepted_eps": 122.56230730953465,+ "http_status_counts": {+ "200": 299+ },+ "seq_low": 0,+ "seq_high": 5999+ },+ "shape": {+ "batch_size": 25,+ "workers": 6,+ "target_eps": 0,+ "commit_sha": "6b6370a1b2d1effeddc528e2950daa26920a0f71",+ "hosts": 1,+ "fusion_replicas": 1,+ "kafka_partitions": 3+ },+ "total_wall_seconds": 55.91636610031128+ },+ "metrics": {+ "benign_alert_rate": {+ "unit": "fraction",+ "measured": true,+ "samples": 5940,+ "value": 0.0+ },+ "consumer_lag_drained": {+ "unit": "messages",+ "measured": true,+ "samples": 1,+ "value": 0.0+ },+ "consumer_lag_in_flight": {+ "unit": "messages",+ "measured": true,+ "samples": 1,+ "value": 15.0+ },+ "dead_letter_rate": {+ "unit": "fraction",+ "measured": true,+ "samples": 6000,+ "value": 0.0+ },+ "delivery_ratio": {+ "unit": "fraction",+ "measured": true,+ "samples": 60,+ "value": 1.0+ },+ "ingest_accepted_eps": {+ "unit": "events/s",+ "measured": true,+ "samples": 6000,+ "value": 122.56230730953465+ },+ "latency_max_ms": {+ "unit": "ms",+ "measured": true,+ "samples": 60,+ "value": 1502.7973651885986+ },+ "latency_p50_ms": {+ "unit": "ms",+ "measured": true,+ "samples": 60,+ "value": 946.2060928344727+ },+ "latency_p95_ms": {+ "unit": "ms",+ "measured": true,+ "samples": 60,+ "value": 1195.3771114349365+ },+ "latency_p99_ms": {+ "unit": "ms",+ "measured": true,+ "samples": 60,+ "value": 1502.7973651885986+ },+ "pipeline_eps": {+ "unit": "alerts/s",+ "measured": true,+ "samples": 60,+ "value": 1.2785342195121945+ }+ },+ "resources": [+ {+ "at": "2026-10-11T06:01:27+00:00",+ "containers": {+ "agents": {+ "cpu": "0.21%",+ "memory": "217.5MiB / 15.58GiB"+ },+ "api": {+ "cpu": "0.13%",+ "memory": "231MiB / 15.58GiB"+ },+ "fusion": {+ "cpu": "0.26%",+ "memory": "86MiB / 15.58GiB"+ },+ "ingest": {+ "cpu": "0.00%",+ "memory": "26.2MiB / 15.58GiB"+ },+ "kafka": {+ "cpu": "0.72%",+ "memory": "1.057GiB / 1.5GiB"+ },+ "postgres": {+ "cpu": "0.08%",+ "memory": "229.4MiB / 15.58GiB"+ }+ }+ }+ ]+}diff --git a/scripts/perf/load_harness.py b/scripts/perf/load_harness.pyindex 6af836ca2..3347f7908 100644--- a/scripts/perf/load_harness.py+++ b/scripts/perf/load_harness.py@@ -588,7 +588,13 @@ def build_report(for row in alerts:seen[row.seq] = seen.get(row.seq, 0) + 1duplicates = sum(count - 1 for count in seen.values() if count > 1)- missing = accepted - len(seen)+ # Against the population that was supposed to alert, not against every+ # accepted event. With a realistic mix the benign majority raises+ # nothing by design, and counting it as missing would report a perfect+ # run as having lost 99% of its events — and `--assert-no-loss` would+ # fail every mix run for the thing the mix exists to do.+ alerting_population = summary.alerting_sent if summary.alerting_sent is not None else accepted+ missing = max(0, alerting_population - len(seen))latencies_ms: list[float] = sorted(((row.created_epoch + clock_offset) - row.sent_epoch) * 1000.0 for row in alerts)diff --git a/services/demo-producer/main.go b/services/demo-producer/main.goindex af02dcfae..838529590 100644--- a/services/demo-producer/main.go+++ b/services/demo-producer/main.go@@ -425,30 +425,26 @@ const BenignMarkerPrefix = "aisoc-load-benign"// path and *under*-measures detection, which is the stage parity 6.9 is// about.//-// Deliberately shaped like real cloud/identity telemetry rather than as a-// near-miss of the alerting event: a benign event built by mutating the-// malicious one shares its field namespace, so it exercises the same-// handful of rules and tells you nothing about the corpus. These carry the-// fields a CloudTrail or Okta event carries, so the rule index resolves-// them the way production traffic would.+// Deliberately shaped like real telemetry rather than as a near-miss of+// the alerting event: a benign event built by mutating the malicious one+// shares its field namespace, so it exercises the same handful of rules+// and tells you nothing about the corpus.//-// `severity: info` and an ordinary event type keep it below the promoter's-// bar as well as the detection corpus's, so an alert from one of these is-// a real finding about the pipeline rather than an artefact of the fixture.+// Identity telemetry specifically, and that is a finding rather than a+// preference. The first run of this mix reported a benign alert rate of+// **1.00**: every "benign" event became an alert, because the load path+// sends an undeclared connector type, the ingest normalizer's generic+// fallback files it as class 2001 Security Finding, and the promoter+// promotes OCSF category 2 unconditionally. Eight of the twelve declared+// profiles are category 2, so on those connectors *no event can be+// benign* whatever it contains. `okta_system_log` is class 3002+// (Authentication), where promotion depends on `severity_id >= 4` — on+// the event rather than on the connector — so a routine sign-in is+// routine. `severity: info` keeps these below that bar and below the+// detection corpus's, which is what makes an alert from one of them a+// real finding about the pipeline rather than an artefact of the fixture.func benignLoadEvent(runID string, seq int64, sentNanos int64) map[string]interface{} {shapes := []map[string]interface{}{- {- "event_type": "s3.GetObject",- "description": "GetObject succeeded",- "user": fmt.Sprintf("svc-reporting%03d", seq%50),- "src_ip": fmt.Sprintf("10.%d.%d.%d", seq%250, (seq/250)%250, (seq/60000)%250),- "action": "allow",- "outcome": "success",- "region": "us-east-1",- "account_id": "123456789012",- "user_agent": "aws-sdk-go/1.44",- "resource": "arn:aws:s3:::reports",- },{"event_type": "user.session.start","description": "sign-in succeeded",@@ -461,14 +457,24 @@ func benignLoadEvent(runID string, seq int64, sentNanos int64) map[string]interf"user_agent": "Mozilla/5.0",},{- "event_type": "http.request",- "description": "200 GET /healthz",- "src_ip": fmt.Sprintf("10.20.%d.%d", seq%250, (seq/250)%250),- "status_code": 200,- "method": "GET",- "path": "/healthz",- "bytes_out": 128,+ "event_type": "user.authentication.auth_via_mfa",+ "description": "MFA challenge satisfied",+ "user": fmt.Sprintf("analyst%03d", seq%200),+ "src_ip": fmt.Sprintf("198.51.100.%d", seq%250),+ "action": "allow",+ "outcome": "success",+ "factor": "webauthn",+ "app": "okta",+ },+ {+ "event_type": "user.session.access_admin_app",+ "description": "read-only console view",+ "user": fmt.Sprintf("analyst%03d", seq%200),+ "src_ip": fmt.Sprintf("198.51.100.%d", seq%250),+ "action": "allow","outcome": "success",+ "app": "okta",+ "target": "reporting",},}event := map[string]interface{}{}@@ -500,6 +506,55 @@ func loadEventFor(runID string, seq int64, sentNanos int64, alertEvery int64) (mreturn benignLoadEvent(runID, seq, sentNanos), false}+// BenignConnectorType is the connector the benign population is sent as.+//+// Class 3002 (Authentication) in the ingest normalizer, where the promoter+// requires `severity_id >= 4`. That makes promotion a property of the+// event rather than of the connector, which is the only way a benign+// event can stay benign: eight of the twelve declared profiles are+// category 2 and are promoted unconditionally.+const BenignConnectorType = "okta_system_log"++// AlertingConnectorType is the historical load connector.+const AlertingConnectorType = "crowdstrike"++// postPopulations sends each population under its own connector type.+//+// Both halves are counted into the same stats, because the harness's+// ingest throughput figure is about the whole mix. An empty half is+// skipped rather than sent as an empty batch: an empty request is a+// round trip that measures the network.+func postPopulations(+ ctx context.Context,+ client *http.Client,+ opts options,+ alerting []map[string]interface{},+ benign []map[string]interface{},+ st *stats,+) error {+ for _, population := range []struct {+ events []map[string]interface{}+ connectorType string+ }{+ {alerting, AlertingConnectorType},+ {benign, BenignConnectorType},+ } {+ if len(population.events) == 0 {+ continue+ }+ err := postBatch(ctx, client, opts, ingestRequest{+ ConnectorID: "load-" + opts.runID,+ ConnectorType: population.connectorType,+ SourceFormat: "json",+ Events: population.events,+ }, st)+ if err != nil {+ return err+ }+ }+ return nil+}+type loadSummary struct {RunID string `json:"run_id"`Mode string `json:"mode"`@@ -588,23 +643,26 @@ func runLoad(ctx context.Context, opts options) loadSummary {}}batch := make([]map[string]interface{}, 0, size)+ benignBatch := make([]map[string]interface{}, 0, size)now := time.Now().UnixNano()for i := 0; i < size; i++ {next := seq.Add(1) - 1event, alerting := loadEventFor(opts.runID, next, now, opts.alertEvery)if alerting {alertingSent.Add(1)+ batch = append(batch, event)} else {benignSent.Add(1)+ benignBatch = append(benignBatch, event)}- batch = append(batch, event)}- err := postBatch(ctx, client, opts, ingestRequest{- ConnectorID: "load-" + opts.runID,- ConnectorType: "crowdstrike",- SourceFormat: "json",- Events: batch,- }, st)+ // Two requests, not one, when the mix is on. The+ // connector type is a property of the request and the+ // ingest normalizer picks the OCSF class from it, so a+ // single batch would force both populations through one+ // profile — which is how the first run of this mix+ // reported every benign event as an alert.+ err := postPopulations(ctx, client, opts, batch, benignBatch, st)if err != nil && ctx.Err() == nil {fmt.Fprintf(os.Stderr, "[load] %v\n", err)if isFatalRequest(err) {