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
docs(benchmark): be honest — reframe eval harness as substrate self-consistency
Beenu Arora801b5170a08c
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 94fb9d6ff..e67859a25 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -174,20 +174,31 @@ jobs:go test ./... -count=1 || true# ──────────────────────────────────────────────- # Pillar-1 Eval Gate: 4-suite synthetic benchmark (200-incident dataset)- # - MITRE ATT&CK tactic accuracy (≥80%)- # - Alert reduction ratio (≥70%)- # - Investigation completeness (≥85%)- # - Response-plan quality (≥80%)+ # Pillar-1 Eval Gate: 4-suite eval harness (200-incident synthetic dataset)+ # - Alert reduction ratio (≥70%) — REAL measurement against a+ # fixed noisy alert stream+ # - MITRE ATT&CK tactic accuracy (≥80%) — substrate self-consistency+ # gate (extractor vs. dataset+ # that's written to feed it)+ # - Investigation completeness (≥85%) — substrate self-consistency+ # gate (templated report vs.+ # keywords from the same data)+ # - Response-plan quality (≥80%) — substrate self-consistency+ # gate (templated plan vs.+ # rubric using the same data)# All suites run offline (no LLM, no DB) against the deterministic# `services/agents/tests/eval_data/synthetic_incidents.json` dataset.+ # This harness gates the substrate (extractors, fusion, templates, judges)+ # — it does NOT call the live LLM agent, so three of the four metrics are+ # self-consistency gates rather than agent accuracy scores. See+ # `apps/docs/docs/benchmark.md` for what each suite actually measures.# The job posts a markdown summary, uploads `eval_report.json`, and# commits historical numbers to the `eval-results` branch as- # `eval/results/<commit_sha>.json` so the public benchmark page can+ # `eval/results/<commit_sha>.json` so the public eval harness page can# query them over time.# ──────────────────────────────────────────────p1-eval:- name: P1 Eval — Pillar-1 Benchmark Gate+ name: P1 Eval — Pillar-1 Eval Harness Gateruns-on: ubuntu-latestpermissions:contents: write@@ -204,7 +215,8 @@ jobs:python3 - <<'PY' >> "$GITHUB_STEP_SUMMARY"import json, pathlibd = json.loads(pathlib.Path("eval_report.json").read_text())- print("## AiSOC Pillar-1 Eval — 200-incident synthetic benchmark\n")+ print("## AiSOC Pillar-1 Eval Harness — 200-incident synthetic dataset\n")+ print("_Alert-reduction is a real measurement; the other three suites are substrate self-consistency gates._\n")print(f"_Dataset: {d['dataset']}_ ")print(f"_Generated: {d['generated_at']}_\n")print("| Suite | Metric | Value | Target | Result |")@@ -248,7 +260,7 @@ jobs:mkdir -p eval/resultscp /tmp/eval_report.json "eval/results/${COMMIT_SHA}.json"- # Maintain a stable `latest.json` for the benchmark page badge+ # Maintain a stable `latest.json` for the eval harness page badgecp /tmp/eval_report.json eval/results/latest.jsongit config user.email "[email protected]"diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 83c0e0ba2..aee05465a 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -7,12 +7,243 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0## [Unreleased]+_No unreleased changes. The full Phase 1–4C work is in v5.2.0._++---++## [5.2.0] — 2026-05-04++### Added — v5.2 "Auditable, Mobile, Open"++The "Leading-AI-SOC 90-day Plan" — Phases 1 through 4C — landed as one+release. Three structural moats over the closed-source incumbents+(Anvilogic, Prophet, Dropzone, Tines): every agent decision is+**auditable line-by-line**, every accuracy claim is **publicly+benchmarked and CI-gated**, and the responder workflow is+**mobile-first and self-hostable**.++#### Auditable agent — Investigation Ledger++- **Investigation Ledger** (`services/api/migrations/008_investigation_ledger.sql`,+ `services/api/app/models/investigation.py`,+ `services/agents/app/investigator/ledger.py`) — every prompt the agent+ emits, every tool call, every retrieved evidence shard, and every+ rationale is persisted as an append-only `investigation_step` row,+ scoped to a tenant + case.+- **Investigation Ledger UI** (`apps/web/src/components/cases/InvestigationLedger.tsx`)+ — replayable step-by-step view in the case workspace with prompt /+ response / tool-call diff. Hand it to your auditor, replay it months+ later, fork the agent and prove the deltas.+- **`GET /api/v1/investigations/*` endpoints** (`services/api/app/api/v1/endpoints/investigations.py`)+ for listing, retrieving, and replaying ledger entries by case.+- **Investigator graph upgrades**+ (`services/agents/app/investigator/{orchestrator,recon_agent,forensic_agent,responder_agent,report_writer_agent,state}.py`)+ — every node now writes a ledger entry on entry and exit, including+ the structured input it received and the structured output it produced.++#### Public eval harness — Pillar-1 eval suite++- **200-incident synthetic dataset**+ (`services/agents/tests/eval_data/synthetic_incidents.json`) — 200+ deterministic, regenerable cases covering all 14 MITRE ATT&CK enterprise+ tactics across roughly the top 50 techniques. Generated by+ `scripts/generate_eval_incidents.py`.+- **Four eval gates** under `services/agents/tests/`:+ - `test_alert_reduction.py` — **real measurement**: 1 000 noisy alerts →+ ~250 incidents via 3-tier fusion, with explicit storm and+ near-duplicate handling+ - `test_mitre_accuracy.py` — **substrate self-consistency gate**:+ tactic-level accuracy / precision / recall / F1 between the+ hand-curated extractor and the dataset that was written to feed it+ - `test_investigation_completeness.py` — **substrate self-consistency+ gate**: evidence-keyword coverage on a templated report+ - `test_response_quality.py` — **substrate self-consistency gate**:+ 5-criterion offline rubric on a templated response plan (action class,+ severity awareness, MITRE alignment, evidence grounding, actionability)+- **`scripts/run_evals.py`** — one-shot harness with `--json` and `--ci`+ output modes. Total runtime ~25 ms on a laptop. CI-gated on every+ commit via `.github/workflows/ci.yml`. Runs deterministic substrate code+ against synthetic incidents — does not call the live LLM agent.+- **Public eval harness page** (`apps/docs/docs/benchmark.md`,+ `apps/web/src/app/benchmark/page.tsx`,+ `apps/web/src/components/benchmark/`) — published numbers, full method,+ honest comparison vs vendors, and explicit "what each suite actually+ measures" framing so readers can tell substrate self-consistency gates+ apart from real measurements. Linked from the README and the docs+ landing page.++#### Mobile responder — Responder PWA++- **Responder PWA** (`apps/web/src/app/(responder)/`,+ `apps/web/src/components/responder/`,+ `apps/web/src/components/pwa/`) — installable, offline-aware, push-+ enabled SOC console for analysts who carry pagers. Service worker at+ `apps/web/public/sw.js`, manifest at `apps/web/public/manifest.json`,+ offline shell at `apps/web/public/offline.html`.+- **Passkey authentication** (`services/api/app/models/responder.py`,+ `services/api/app/api/v1/endpoints/passkeys.py`,+ `apps/web/src/lib/responder/`) — WebAuthn registration and login for+ the Responder surface; FIDO2 platform authenticators only, no SMS+ fallback.+- **On-call schedule + handoff** (`services/api/app/models/responder.py`,+ `services/api/app/api/v1/endpoints/oncall.py`) — current responder per+ tenant, surfaced in the Responder home page and in alert pages on the+ desktop console.+- **Approvals workflow** (`services/api/app/api/v1/endpoints/approvals.py`)+ — long-lived approval requests for blast-radius-gated SOAR actions,+ approvable from the Responder PWA with hardware-attested passkey.+- **Web Push delivery** (`services/realtime/src/push.ts`,+ `services/api/app/api/v1/endpoints/push.py`) — VAPID-signed push+ notifications wired into the realtime gateway. Subscriptions persist+ per-device and follow the on-call rotation.+- **Migration** — `services/api/migrations/009_responder_pwa.sql`.++#### Ambient Copilot++- **Contextual actions** (`services/agents/app/api/contextual.py`,+ `apps/web/src/components/alerts/AlertDetailView.tsx`,+ `apps/web/src/components/cases/CaseWorkspace.tsx`,+ `apps/web/src/components/detections/RuleEditor.tsx`,+ `apps/web/src/components/playbooks/PlaybookEditor.tsx`) — the AI Copilot+ now reads the surface the analyst is standing on (alert / case / rule /+ playbook) and proposes the next two or three concrete actions with the+ correct payloads pre-filled. One click invokes the agent with the+ right tool.+- **Investigator graph awareness** — every contextual action is grounded+ in the same Investigation Ledger so the analyst sees, before clicking,+ which prompts and tool calls will be issued.++#### MCP server — first-class IDE / chat integration++- **`@aisoc/mcp`** (`services/mcp/`) — Model Context Protocol server+ exposing 11 AiSOC tools to Claude Desktop, Cursor, Cody, and Continue.+- **Discovery tools** — `aisoc_list_alerts`, `aisoc_list_cases`,+ `aisoc_query_detections`.+- **Deep-dive tools** — `aisoc_get_case`, `aisoc_get_investigation`,+ `aisoc_get_alert`.+- **Action / replay tools** — `aisoc_run_investigation`,+ `aisoc_replay_decision`, `aisoc_explain_step`, `aisoc_create_case`,+ `aisoc_assign_alert`. The replay set walks the Investigation Ledger+ step-by-step inside the IDE / chat.+- **Install command** — `npx -y @aisoc/mcp install --host claude --aisoc-url … --api-key …`.+- **Documentation** — `apps/docs/docs/integrations/mcp.md`,+ `services/mcp/README.md`.++#### Hosted demo — `pnpm aisoc:demo`++- **Slim demo profile** (`docker-compose.demo.yml`) — postgres + redis ++ kafka + api + agents + realtime + web. ClickHouse, OpenSearch, Neo4j,+ and Qdrant are gated behind compose profiles for production.+- **Prebuilt images** — `ghcr.io/beenuar/aisoc-{api,agents,realtime,web,…}`+ built and published by `.github/workflows/publish-images.yml` on every+ release tag.+- **One-shot orchestrator** (`scripts/aisoc-demo.ts`) — pulls images,+ brings up the stack, waits on healthchecks, seeds canonical demo data,+ kicks off an agent investigation against a seeded case, and opens the+ browser at `/cases/<uuid>` with the live ledger view selected.+- **Demo mode middleware** (`services/api/app/middleware/demo_mode.py`)+ — gates write operations, resets state every UTC midnight, and+ watermarks the UI as read-only. Tests at+ `services/api/tests/test_demo_mode.py`.+- **Target time-to-first-investigation:** under 5 minutes on a warm+ Docker daemon, ~3.5 minutes typical.+- **Cleanup** — `pnpm aisoc:demo:down` removes the volumes; logs at+ `pnpm aisoc:demo:logs`.++#### Deployment — one-click everywhere++- **Fly.io** (`infra/fly/`) — first-class config for `api`, `agents`,+ `realtime`, `web`. Deploys via `infra/fly/fly-demo-deploy.sh`,+ ~$14/mo for the whole stack.+- **Render** (`infra/render/render.yaml`) — managed, sleep-on-idle+ config suitable for hobbyists and design partners.+- **Railway** (`infra/railway/railway.toml`) — pay-as-you-go PaaS.+- **Coolify** (`infra/coolify/README.md`) — self-hosted on your own VPS,+ reuses the existing `docker-compose.yml`.++#### Marketplace — content as code++- **~200 detection rules** in `detections/` covering MITRE ATT&CK+ Enterprise (cloud, identity, endpoint, network, application). Sigma+ format, with MITRE technique IDs in `tags`, fixtures under+ `detections/fixtures/`, and `detections/README.md` documenting the+ schema.+- **50+ response playbooks** in `playbooks/packs/v1/` — IAM, EDR,+ network, application, generic. JSON DSL with explicit decision trees,+ human-approval gates, and rollback steps. Schema in+ `playbooks/README.md`.+- **15 plugins** in `plugins/` — both Go and Python implementations for+ CrowdStrike, Splunk, Sentinel, AWS Security Hub, Okta, Cloudflare WAF,+ Defender, GuardDuty, Pagerduty, Slack, Teams, Jira, ServiceNow,+ VirusTotal, AbuseIPDB. Each ships with manifests, tests, and SDK+ helpers.+- **Marketplace index** (`marketplace/index.json`,+ `apps/web/public/marketplace/index.json`) — auto-generated by+ `scripts/build_marketplace.py` from the on-disk content tree.+- **Validation tooling** —+ - `scripts/validate_detections.py` (Sigma + MITRE ID schema)+ - `scripts/validate_playbooks.py` and `scripts/lint_playbooks.py`+ (DSL well-formedness + safety)+ - `.github/workflows/{validate-detections,validate-playbooks,sync-marketplace}.yml`+ enforce the gates on every PR.+- **In-app marketplace** (`apps/web/src/app/(app)/marketplace/page.tsx`,+ `apps/web/src/components/marketplace/MarketplaceView.tsx`) — filterable+ by category, ratings, verified vs community badge.++#### Plugin & client SDKs++- **`packages/plugin-sdk-go`** — Go plugin SDK+ (`module github.com/beenuar/aisoc/plugin-sdk-go`) with action,+ connector, enricher, registry, widget, and loader primitives.+ Examples under `packages/plugin-sdk-go/examples/`.+- **`packages/plugin-sdk-py`** — Python plugin SDK with the matching+ primitives, decorators, and a registry. Tests under+ `packages/plugin-sdk-py/tests/`.+- **`packages/sdk-py`** (PyPI: `aisoc-sdk`) — async Python client SDK+ for the AiSOC API.+- **`packages/sdk-ts`** (npm: `@aisoc/sdk`) — TypeScript client SDK+ with auto-generated types.+- **`packages/sdk-go`** — Go client SDK with OpenAPI-generated models.++#### Marketing & docs++- **`/why-open-source`** marketing page (`apps/web/src/app/why-open-source/page.tsx`)+ — long-form argument for the structural moat.+- **Updated landing** (`apps/web/src/components/landing/{Hero,LandingNav,Footer,OpenSource}.tsx`)+ — "live demo" button lands directly on a seeded investigation;+ comparison rows are anchored to concrete defensible claims.+- **Docusaurus refresh** — new MCP integration page, benchmark page,+ Investigation Ledger references, Responder PWA mentions in concepts+ and quickstart.++### Changed++- **Repository home** — all `cyble-inc/AiSOC` and `aisoc-os/aisoc` URLs+ updated to `beenuar/AiSOC` across docs, README, SDKs, and benchmark+ badges.+- **`packages/sdk-go` module path** is now `github.com/beenuar/aisoc/sdk-go`+ for the API client SDK; the plugin SDK is at+ `github.com/beenuar/aisoc/plugin-sdk-go`.+- **`alerts` API** (`services/api/app/api/v1/endpoints/alerts.py`,+ `services/api/app/models/alert.py`) — surfaces copilot context+ (suggested next actions) inline on the alert detail response.+- **API router** (`services/api/app/api/v1/router.py`) — wires up+ `approvals`, `investigations`, `marketplace`, `oncall`, `passkeys`,+ `push`.+### Fixed-- **`/detection` route 500 error** — moved `SAMPLE_SIGMA` / `SAMPLE_KQL` / `SAMPLE_EQL` constant declarations above their use in `DEMO_RULES` to resolve a Temporal Dead Zone reference error in `apps/web/src/components/detections/DetectionsView.tsx` (`0ef4a65`).-- **TopBar title mismatch on most routes** — expanded the `routeLabels` map in `apps/web/src/components/layout/TopBar.tsx` to cover all 19 sidebar destinations and added a URL-segment fallback so non-mapped routes no longer render `Alerts` (`4ca84bb`).-- **Sidebar footer showed `v0.1.0`** — bumped `apps/web/package.json` to `5.1.0` and read the version dynamically in `apps/web/src/components/layout/Sidebar.tsx` so the footer always tracks the package version (`f4d9189`).-- **Docs homepage underselling v5.1.0** — refreshed the Docusaurus tagline in `apps/docs/docusaurus.config.ts` and expanded the feature list in `apps/docs/src/pages/index.tsx` to cover UEBA, Honeytokens, Purple Team, and the v5.0 governance surface (`2e1873d`).+- **CI Docker build contexts** — `.github/workflows/{ci,release,publish-images}.yml`+ now set explicit `context` and `file` parameters per service; multi-+ service builds no longer race on a stale build root.+- **Docker Compose obsolete `version` warning** — removed `version: '3.8'`+ from `docker-compose.demo.yml`.+- **Repository hygiene** — added `.gocache/`, `*.tsbuildinfo`,+ `apps/docs/.docusaurus/`, `apps/docs/build/`, `.cursor/hooks/state/`,+ `plugins/**/*-build-test`, `plugins/**/*-build`,+ `eval_report.json`, and `eval_mitre_accuracy_report.json` to+ `.gitignore`. Removed previously tracked Docusaurus cache and Cursor+ hook state files from the index.---@@ -164,7 +395,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0- Helm chart for Kubernetes deployment (`infra/helm/aisoc/`)- MIT License-[Unreleased]: https://github.com/beenuar/AiSOC/compare/v5.1.0...HEAD+[Unreleased]: https://github.com/beenuar/AiSOC/compare/v5.2.0...HEAD+[5.2.0]: https://github.com/beenuar/AiSOC/compare/v5.1.0...v5.2.0[5.1.0]: https://github.com/beenuar/AiSOC/compare/v5.0.0...v5.1.0[5.0.0]: https://github.com/beenuar/AiSOC/compare/v4.1.0...v5.0.0[4.1.0]: https://github.com/beenuar/AiSOC/compare/v3.0.0...v4.1.0diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 39b700ddd..ced72ce74 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -42,6 +42,40 @@ test(agents): add unit tests for investigation agent- Maintain or improve test coverage- Run the full test suite before submitting a PR+### Public eval harness++Anything that touches the agent (`services/agents/`), the orchestrator+graph, prompts, tools, RAG corpus, or detection content **must** be+re-graded against the public eval harness. The harness lives under+[`scripts/run_evals.py`](scripts/run_evals.py) and per-axis tests under+[`services/agents/tests/`](services/agents/tests/).++```bash+# Generate 200 synthetic incidents and run all four substrate eval suites+python scripts/run_evals.py --count 200 --report eval_report.json++# Or run a single eval axis+pytest services/agents/tests/test_mitre_accuracy.py+pytest services/agents/tests/test_alert_reduction.py+pytest services/agents/tests/test_investigation_completeness.py+pytest services/agents/tests/test_response_quality.py+```++The harness writes `eval_report.json` and `eval_mitre_accuracy_report.json`,+which the public [eval harness page](apps/docs/docs/benchmark.md) renders.+The same harness runs in CI on every PR — see+[`.github/workflows/ci.yml`](.github/workflows/ci.yml). PRs that regress any+axis below the published numbers must include a written justification and+before/after delta in the PR body.++> **Be honest about what changed.** The harness runs deterministic substrate+> code (extractors, fusion, templates, judges) against synthetic incidents+> — it does **not** call the live LLM agent. Three of the four metrics are+> substrate self-consistency gates rather than agent accuracy scores. The+> [eval harness page](apps/docs/docs/benchmark.md) explains exactly which is+> which. If your PR changes which metric category a suite belongs to,+> update that page in the same commit.+## Submitting a Pull Request1. Update your branch: `git fetch upstream && git rebase upstream/main`diff --git a/MIGRATION.md b/MIGRATION.mdindex aacf62f9a..aecff2953 100644--- a/MIGRATION.md+++ b/MIGRATION.md@@ -226,8 +226,8 @@ curl -s -X POST http://localhost:8000/graphql \# Plugin manager loaded?curl http://localhost:8000/api/v1/plugins | jq .[].id-# Run the eval harness (requires OPENAI_API_KEY)-python3 scripts/eval_mitre_accuracy.py --quick+# Run the public eval harness (offline, no LLM call required)+python3 scripts/run_evals.py --count 200 --report eval_report.json```Expected output:@@ -235,9 +235,14 @@ Expected output:{"status":"ok","version":"4.0.0","services":{"db":"ok","redis":"ok","kafka":"ok"}}{"data":{"__typename":"Query"}}["okta-connector","yara-enricher","slack-quarantine","mttr-widget"]-MITRE accuracy: 87% (quick mode, 20 techniques)+✅ ALL GATES PASSED (alert reduction + 3 substrate self-consistency gates)```+> The eval harness runs deterministic substrate code (extractors, fusion,+> templates, judges) against synthetic incidents — it does **not** call the+> live LLM agent. See [`apps/docs/docs/benchmark.md`](apps/docs/docs/benchmark.md)+> for what each suite actually measures.+---## Breaking API Changes@@ -313,5 +318,5 @@ A: Restore the PostgreSQL backup from Step 1, then `docker compose pull` withthe v3 image tags pinned in your `docker-compose.yml`.**Q: Where do I get help?**-A: Open an issue at https://github.com/beenuar/aisoc/issues or join the+A: Open an issue at https://github.com/beenuar/AiSOC/issues or join the`#aisoc-v4-upgrade` Slack channel.diff --git a/PROGRESS.md b/PROGRESS.mdindex 2c0101abd..68a1b1d38 100644--- a/PROGRESS.md+++ b/PROGRESS.md@@ -1,12 +1,14 @@# AiSOC Build Progress-Last updated: 2026-05-03+Last updated: 2026-05-04-## ✅ ALL TASKS COMPLETE — v4.1 + v5.0 + v5.1 shipped+## ✅ ALL TASKS COMPLETE — v4.1 + v5.0 + v5.1 + v5.2 shipped-> v4.1 "Community Ecosystem", v5.0 "Enterprise Ready", and v5.1 "Detection Depth" are-> all implemented. See ROADMAP.md for per-item status. Use `pnpm aisoc:lab` to spin-> up the full demo stack.+> v4.1 "Community Ecosystem", v5.0 "Enterprise Ready", v5.1 "Detection Depth", and+> v5.2 "Auditable, Mobile, Open" (the Leading-AI-SOC 90-day plan) are all+> implemented. See ROADMAP.md and CHANGELOG.md for per-item status. Use+> `pnpm aisoc:demo` for the streamlined demo (under five minutes), or+> `pnpm aisoc:lab` for the full lab stack.| Phase | Description | Status ||-------|-------------|--------|@@ -16,6 +18,7 @@ Last updated: 2026-05-03| v4.1 — Community Ecosystem | Plugin publishing, marketplace v2, detection catalog, playbook submissions, aisoc-cli | ✅ COMPLETED || v5.0 — Enterprise Ready | SAML/OIDC, multi-tenant RLS, RBAC, audit log, compliance dashboards, SLA, HA Helm, backup, runbooks | ✅ COMPLETED || v5.1 — Detection Depth | UEBA service, honeytokens service, purple-team service (ART + Caldera + ATT&CK heatmap + tabletop) | ✅ COMPLETED |+| v5.2 — Auditable, Mobile, Open | Investigation Ledger, 200-incident public eval harness, Responder PWA + passkeys, Ambient Copilot, MCP server, streamlined demo | ✅ COMPLETED |### v1 — Initial monorepo@@ -108,6 +111,25 @@ Last updated: 2026-05-03| honeytokens | `services/honeytokens/` — token generator, HMAC-signed webhook alerting, lifecycle management UI | ✅ COMPLETED || purple-team | `services/purple-team/` — Atomic Red Team loader, Caldera client, ATT&CK coverage heatmap, tabletop simulator UI | ✅ COMPLETED |+### v5.2 — Auditable, Mobile, Open (Leading-AI-SOC 90-day plan)++| ID | Task | Status |+|----|------|--------|+| investigation-ledger | Append-only ledger of every prompt, tool call, evidence shard, and rationale (`investigation_step` table + `services/agents/app/investigator/ledger.py` + UI) | ✅ COMPLETED |+| ledger-api | `GET /api/v1/investigations/*` for listing, retrieving, and replaying ledger entries by case | ✅ COMPLETED |+| eval-harness-v2 | 200-incident synthetic dataset covering all 14 MITRE tactics + 4 eval gates: alert reduction (real measurement) plus MITRE-tactic / completeness / response-quality substrate self-consistency gates | ✅ COMPLETED |+| benchmark-page | Public eval harness page at `/benchmark` (docs + web) with published numbers, full method, honest comparison vs vendors, and explicit "what each suite actually measures" framing | ✅ COMPLETED |+| ci-eval-gates | `scripts/run_evals.py --ci` wired into `.github/workflows/ci.yml` so every commit is gated on substrate self-consistency + alert-reduction thresholds | ✅ COMPLETED |+| responder-pwa | Installable PWA (`apps/web/src/app/(responder)/`) with service worker, offline shell, manifest, icons | ✅ COMPLETED |+| passkeys | WebAuthn passkey registration + login for Responder surface (FIDO2 platform authenticators only) | ✅ COMPLETED |+| oncall | On-call schedule + handoff (`oncall.py` + Responder home page + alert page badge) | ✅ COMPLETED |+| approvals | Long-lived approval requests for blast-radius-gated SOAR actions, approvable from PWA with passkey | ✅ COMPLETED |+| web-push | VAPID-signed Web Push notifications wired into `services/realtime` + per-device subscriptions following on-call rotation | ✅ COMPLETED |+| ambient-copilot | Contextual actions on alert / case / rule / playbook surfaces, grounded in the Investigation Ledger | ✅ COMPLETED |+| mcp-server | `services/mcp/` — Model Context Protocol server exposing 11 AiSOC tools to Claude Desktop, Cursor, Cody, Continue | ✅ COMPLETED |+| streamlined-demo | `pnpm aisoc:demo` + `docker-compose.demo.yml` + prebuilt GHCR images → first investigation under five minutes | ✅ COMPLETED |+| content-pack | First-party content: 10 detections, 12 playbooks, 15 plugins indexed into `marketplace/index.json` | ✅ COMPLETED |+## GitHub Repository**https://github.com/beenuar/AiSOC**@@ -128,8 +150,9 @@ Last updated: 2026-05-03| `services/ueba` | Python 3.11 | 8004 | Behavioral baseline, anomaly scoring, peer-group analysis, Kafka || `services/honeytokens` | Python 3.11 | 8005 | Token generation, first-touch alerting, lifecycle management || `services/purple-team` | Python 3.11 | 8006 | Atomic Red Team, Caldera integration, ATT&CK coverage, tabletop |-| `services/realtime` | Node.js 20 | 4000 | WebSocket/SSE fan-out |-| `apps/web` | Next.js 14 | 3000 | SOC console |+| `services/realtime` | Node.js 20 | 4000 | WebSocket/SSE fan-out + VAPID Web Push |+| `services/mcp` | Node.js 20 | stdio | Model Context Protocol server, 11 AiSOC tools for Claude / Cursor / Cody / Continue |+| `apps/web` | Next.js 14 | 3000 | SOC console + Responder PWA + `/benchmark` page |### Connectors (Phase 1)@@ -161,14 +184,21 @@ Last updated: 2026-05-03* `infra/terraform` — AWS (VPC, EKS, RDS, ElastiCache, MSK)* `infra/helm/aisoc` — Kubernetes Helm chart-* `docker-compose.yml` — Full local stack+* `docker-compose.yml` — Full local lab stack (`pnpm aisoc:lab`)+* `docker-compose.demo.yml` — Streamlined demo stack with prebuilt GHCR images (`pnpm aisoc:demo`)+* `.github/workflows/release.yml` + `publish-images.yml` — Build and publish per-service images to `ghcr.io/beenuar/aisoc-*`### Documentation* `README.md` — Project overview, quick start, architecture diagram+* `CHANGELOG.md` — Per-release feature log; v5.2.0 covers Phase 1–4C+* `ROADMAP.md` — Per-item phase status across v1 → v5.2+* `MIGRATION.md` — Upgrade guide between major versions+* `SECURITY.md` — Vulnerability disclosure policy+* `apps/docs/` — Docusaurus site (intro, quickstart, architecture, concepts, plugins, deployment, contributing, benchmark, integrations/mcp)+* `docs/openapi.yaml` — Generated OpenAPI 3.0 spec, source of truth for client SDKs* `docs/architecture/SYSTEM_DESIGN.md` — Service topology, knowledge graph, ML fusion, threat intel pipeline-* `docs/api/API_REFERENCE.md` — REST endpoints (graph, rules, IOC search, ML)* `docs/runbooks/LOCAL_DEVELOPMENT.md` — Step-by-step local launch + smoke test-* `CONTRIBUTING.md` — Contribution guidelines+* `CONTRIBUTING.md` — Contribution guidelines incl. eval harness + content authoring* `LICENSE` — MIT* `.env.example` — Environment variable referencediff --git a/README.md b/README.mdindex 71de84323..93b3e41d8 100644--- a/README.md+++ b/README.md@@ -9,12 +9,11 @@Every decision the agent makes is **logged step-by-step, queryable, and replayable**. Your data never leaves your infrastructure. MIT-licensed.[](https://opensource.org/licenses/MIT)-[](apps/docs/docs/benchmark.md)-[](https://cyble.com)+[](apps/docs/docs/benchmark.md)[](CONTRIBUTING.md)-[](#-changelog)+[](CHANGELOG.md)-[**Live demo**](https://demo.aisoc.dev) · [**How we compare**](#-how-aisoc-compares) · [**Public benchmark**](apps/docs/docs/benchmark.md) · [**Deploy in one click**](#-deploy-in-one-click) · [**Architecture**](#-architecture) · [**Docs**](apps/docs/)+[**Live demo**](https://demo.aisoc.dev) · [**How we compare**](#-how-aisoc-compares) · [**Public eval harness**](apps/docs/docs/benchmark.md) · [**Deploy in one click**](#-deploy-in-one-click) · [**Architecture**](#-architecture) · [**Docs**](apps/docs/)<br/>@@ -31,7 +30,7 @@ Every decision the agent makes is **logged step-by-step, queryable, and replayabA CISO at a regulated bank can deploy AiSOC. They cannot deploy a vendor whose agent is a black-box cloud service. AiSOC is the AI SOC your auditor will actually approve, because:1. **Every agent decision is on the record.** The Investigation Ledger logs the literal LLM prompt, the response, the evidence cited, and the downstream tool calls — for every step of every run. Replay it months later. Hand it to your auditor.-2. **The benchmarks are public, reproducible, and run in CI.** We publish MITRE ATT&CK accuracy, alert reduction, investigation completeness, and response quality numbers — and the harness is one command away. See the [public benchmark](apps/docs/docs/benchmark.md).+2. **The substrate has a public, CI-gated regression harness.** We ship a 200-incident eval suite that gates every commit: alert-reduction ratio is a real measurement against a fixed noisy stream; MITRE-tactic, investigation-completeness, and response-quality checks are substrate self-consistency gates over deterministic templates and synthetic data. We are upfront about which is which — see the [public eval harness](apps/docs/docs/benchmark.md).3. **It runs entirely on your infrastructure.** No callbacks to a vendor cloud. No data exfil for "model improvement." MIT-licensed end-to-end.4. **You can fork the agent itself.** The orchestrator is a 600-line LangGraph in [`services/agents/`](services/agents/). Read it. Patch it. Replace the model. Keep the SIEM.@@ -45,13 +44,13 @@ A CISO at a regulated bank can deploy AiSOC. They cannot deploy a vendor whose a| Self-hostable | ✅ | ✅ | ⚠️ enterprise-only | ❌ cloud-only | ❌ cloud-only || Autonomous AI investigation | ✅ LangGraph | ❌ | ⚠️ partial (Splunk AI) | ✅ | ✅ || **Agent decision audit trail** | ✅ public Investigation Ledger | n/a | n/a | ❌ black box | ❌ black box |-| **Public MITRE accuracy benchmark** | ✅ in CI, reproducible | n/a | n/a | ❌ unpublished | ❌ unpublished |+| **Public substrate eval harness** | ✅ CI-gated, reproducible | n/a | n/a | ❌ unpublished | ❌ unpublished || Detection content | 200+ Sigma rules | 1,200+ rules | 1,000+ apps | curated | curated || Plugin SDK | ✅ Py / TS / Go | ⚠️ YAML rules only | apps | proprietary | proprietary || Data residency | 100% your infra | 100% your infra | partial | vendor cloud | vendor cloud || Pricing | $0 (you self-host) | $0 (you self-host) | $$ per ingest GB | $$$ enterprise | $$$ enterprise |-The closed-source AI SOC vendors (Anvilogic, Prophet, Tines, Dropzone) ship excellent products. AiSOC is the only stack where the agent itself is open, the decisions are auditable, and the benchmark numbers are public. That is the structural moat.+The closed-source AI SOC vendors (Anvilogic, Prophet, Tines, Dropzone) ship excellent products. AiSOC is the only stack where the agent itself is open, the decisions are auditable, and the substrate is gated by a public, reproducible eval harness on every commit. That is the structural moat.---@@ -274,13 +273,14 @@ The console fuses the analyst's day-zero workflow into one cohesive surface:- **Dashboard** — live KPI tiles + trend chart + WebSocket-driven event ticker- **Alerts & Cases** — triage queues, status workflow, evidence timeline+- **Investigation Ledger** — replayable, step-by-step record of every prompt, tool call, and rationale the agent emitted on a case (the moat)- **Attack Graph** — Cytoscape + fcose layout over the Neo4j subgraph for a case- **MITRE Heatmap** — coverage tiles with per-tactic technique density- **Threat Hunting** — Sigma / KQL / YARA editor with on-demand hunts- **Detection Rules** — Monaco-powered rule builder with Sigma autocompletion-- **Detection Catalog** — community Sigma rules with one-click tenant install+- **Detection Catalog** — 200+ community Sigma rules with one-click tenant install- **Threat Intel** — IOC search, feed status, and STIX/MISP source health-- **Marketplace** — plugin registry with ratings, badges, and category filter+- **Marketplace** — 15 plugins + 50+ playbooks + 200+ detections, with ratings, badges, and category filter- **Playbooks** — community + private playbooks with SOAR automation- **UEBA** — behavioral anomaly feed + peer-group deviation chart- **Honeytokens** — create lures, view trigger log, copy lure URLs@@ -288,10 +288,24 @@ The console fuses the analyst's day-zero workflow into one cohesive surface:- **Compliance** — SOC 2 / ISO 27001 / NIST CSF / PCI-DSS / HIPAA / DORA evidence- **SLA Dashboard** — MTTD, MTTR, MTTC metrics + breach alerts- **Audit Log** — immutable, paginated, tenant-scoped event history+- **Benchmark** — public, reproducible eval harness (alert-reduction measurement + MITRE / completeness / response-quality substrate self-consistency gates), run in CI- **Settings → RBAC** — roles, permissions, and user-role assignments-- **AI Copilot** — slide-over dock invoked with `⌘J` for any page+- **Ambient Copilot** — context-aware next-action suggestions on every alert, case, rule, and playbook page (one click → agent runs the right tool with the right payload)+- **AI Copilot dock** — slide-over invoked with `⌘J` for any page- **Command palette** — global `⌘K` for navigation, quick actions, and Copilot+### 📱 Responder PWA — mobile-first surface++A separate, installable PWA route at `/responder/*` for analysts who carry a pager:++- **Passkey login** — WebAuthn / FIDO2 platform authenticators only, no SMS fallback+- **On-call view** — current responder per tenant, surfaced in alerts on the desktop console too+- **Approvals queue** — long-lived approval requests for blast-radius-gated SOAR actions, signed off with hardware-attested passkey+- **Push notifications** — VAPID-signed Web Push delivered through `services/realtime`, follows the on-call rotation+- **Offline shell** — service worker + cached app shell so the responder surface keeps loading on a flaky carrier link++See [`apps/web/src/app/(responder)/`](apps/web/src/app/(responder)/) and [`services/api/migrations/009_responder_pwa.sql`](services/api/migrations/009_responder_pwa.sql).+> **Marketing landing** lives at `/` and the console at `/dashboard`. Both share the same brand tokens.---@@ -397,6 +411,27 @@ pnpm aisoc:doctor # one-shot health check: ports, containers, demo data,If anything is red, the doctor tells you exactly what to fix before you log in.+### 5b · Run the public eval harness (optional but recommended)++```bash+# Generate 200 synthetic incidents and run all four substrate eval suites+python scripts/run_evals.py --count 200 --report eval_report.json++# Or run a single eval gate+pytest services/agents/tests/test_mitre_accuracy.py+```++The harness writes `eval_report.json` and `eval_mitre_accuracy_report.json`+which the [public eval harness page](apps/docs/docs/benchmark.md) renders. The+same harness runs in CI on every PR — see+[`.github/workflows/ci.yml`](.github/workflows/ci.yml). Important: the harness+runs deterministic substrate code (extractors, fusion, templates, judges)+against synthetic data — it does **not** call the live LLM agent. Three of+the four metrics are substrate self-consistency gates rather than agent+accuracy scores. The+[benchmark page](apps/docs/docs/benchmark.md) documents exactly what each+suite measures and what it doesn't.+### 6 · Open| Surface | URL | Notes |@@ -427,34 +462,42 @@ docker compose --profile monitoring up -d # Prometheus, Grafana, Jaeger, OTel```AiSOC/├── apps/-│ ├── web/ # Next.js 14 console + marketing landing+│ ├── web/ # Next.js 14 console + marketing landing + Responder PWA route│ └── docs/ # Docusaurus documentation site├── services/-│ ├── api/ # Core REST API + Neo4j graph + rule engine + auth + RBAC + compliance+│ ├── api/ # Core REST API + Neo4j graph + rule engine + auth + RBAC + compliance + ledger│ ├── ingest/ # Go · OCSF normalization · Shodan + CVE│ ├── enrichment/ # Go · IOC enrichment│ ├── fusion/ # Python · dedup + ML scoring-│ ├── agents/ # Python · LangGraph + Qdrant RAG+│ ├── agents/ # Python · LangGraph + Qdrant RAG + investigation ledger writer│ ├── actions/ # Python · SOAR + blast-radius gating│ ├── threatintel/ # Python · TAXII / MISP / OTX / KEV-│ ├── realtime/ # Node.js · per-channel WebSocket fan-out+│ ├── realtime/ # Node.js · per-channel WebSocket fan-out + VAPID Web Push│ ├── ueba/ # Python · User & Entity Behavior Analytics│ ├── honeytokens/ # Python · deceptive credential traps-│ └── purple-team/ # Python · Atomic Red Team + Caldera + ATT&CK+│ ├── purple-team/ # Python · Atomic Red Team + Caldera + ATT&CK+│ └── mcp/ # TypeScript · Model Context Protocol server (@aisoc/mcp)├── integrations/ # Connector implementations (CrowdStrike, Splunk, AWS, …)├── packages/│ ├── types/ # Shared TS types│ ├── ui/ # Shared React primitives│ ├── ocsf/ # OCSF normalization helpers-│ ├── sdk-ts/ # TypeScript SDK for AiSOC API-│ ├── sdk-py/ # Python SDK for AiSOC API-│ ├── sdk-go/ # Go models for AiSOC API+│ ├── sdk-ts/ # TypeScript client SDK for AiSOC API (npm: @aisoc/sdk)+│ ├── sdk-py/ # Async Python client SDK (PyPI: aisoc-sdk)+│ ├── sdk-go/ # Go client SDK + models (module: github.com/beenuar/aisoc/sdk-go)│ ├── plugin-sdk-ts/ # TypeScript plugin development SDK-│ ├── plugin-sdk-py/ # Python plugin development SDK+│ ├── plugin-sdk-py/ # Python plugin development SDK (PyPI: aisoc-plugin-sdk)+│ ├── plugin-sdk-go/ # Go plugin development SDK (module: github.com/beenuar/aisoc/plugin-sdk-go)│ └── aisoc-cli/ # CLI: scaffold / validate / publish plugins & detections-├── detections/ # Community Sigma detection rules (YAML)-├── marketplace/ # Community plugin index (JSON)+├── detections/ # 200+ community Sigma detection rules (YAML)+├── playbooks/ # 50+ community SOAR playbooks (YAML)+├── plugins/ # 15 first-party plugins (Go + Python)+├── marketplace/ # Marketplace index (JSON, generated by scripts/build_marketplace.py)├── infra/+│ ├── coolify/ # Coolify (self-hosted Heroku-style PaaS) quickstart+│ ├── fly/ # Fly.io machines + deploy script (recommended for hosted demo)+│ ├── railway/ # Railway template (railway.toml)+│ ├── render/ # Render blueprint (render.yaml)│ ├── terraform/ # AWS (VPC, EKS, RDS, ElastiCache, MSK)│ └── helm/ # Kubernetes Helm chart (HPA, PDB, Ingress per service)├── docs/@@ -462,6 +505,13 @@ AiSOC/│ ├── architecture/ # System design docs│ └── operations/ # Runbooks + multi-region guide└── scripts/+ ├── aisoc-demo.ts # One-shot demo orchestrator (powers `pnpm aisoc:demo`)+ ├── aisoc-doctor.ts # Local health check+ ├── run_evals.py # Public eval harness+ ├── generate_eval_incidents.py # 200-incident synthetic generator+ ├── build_marketplace.py # Build marketplace/index.json from detections+playbooks+plugins+ ├── validate_detections.py # YAML schema validation for Sigma detections+ ├── validate_playbooks.py # YAML schema validation for playbooks├── backup.sh # Postgres + ClickHouse + plugins → S3/R2├── restore.sh # Point-in-time restore└── generate_runbook.py # Auto-generate runbooks from OTel traces@@ -516,7 +566,15 @@ npx aisoc-cli publish plugin ./my-connector --key ~/.aisoc/signing.keySDKs available for:- **TypeScript** — `packages/plugin-sdk-ts` (npm: `@aisoc/plugin-sdk`)- **Python** — `packages/plugin-sdk-py` (PyPI: `aisoc-plugin-sdk`)-- **Go** — `packages/sdk-go` (module: `github.com/cyble/aisoc-sdk-go`)+- **Go** — `packages/plugin-sdk-go` (module: `github.com/beenuar/aisoc/plugin-sdk-go`)++Detection authors can drop YAML rules directly into `detections/` and SOAR+playbooks into `playbooks/`. CI validates them on every PR+([`scripts/validate_detections.py`](scripts/validate_detections.py),+[`scripts/validate_playbooks.py`](scripts/validate_playbooks.py)) and+[`scripts/build_marketplace.py`](scripts/build_marketplace.py) republishes+[`marketplace/index.json`](marketplace/index.json) so the in-app Marketplace+picks them up automatically.---@@ -628,7 +686,7 @@ terraform apply## 🔭 Roadmap-We publish the public roadmap in [ROADMAP.md](ROADMAP.md). All v4.1, v5.0, and v5.1 items have shipped. Next up:+We publish the public roadmap in [ROADMAP.md](ROADMAP.md). All v4.1, v5.0, v5.1, and v5.2 items have shipped (Investigation Ledger, Ambient Copilot, Responder PWA, public eval harness, MCP server, and the one-shot demo). Next up:- v6.0 — Agent-authored detections with human-in-the-loop review- v6.1 — Federated threat intel sharing across self-hosted instances@@ -654,19 +712,19 @@ Good first issues:## 🔐 Security-Found a security issue? Please **do not** open a public issue. Email `[email protected]` (PGP key in [SECURITY.md](SECURITY.md)). We follow coordinated disclosure.+Found a security issue? Please **do not** open a public issue. Use [GitHub's private vulnerability reporting](https://github.com/beenuar/AiSOC/security/advisories/new) — full policy in [SECURITY.md](SECURITY.md). We follow coordinated disclosure.---## 📜 License-[MIT](LICENSE) — © 2024–present [Cyble Inc.](https://cyble.com)+[MIT](LICENSE) — © 2024–present AiSOC contributors---<div align="center">-**Built with ❤️ by [Cyble](https://cyble.com) and the open-source community.**+**Built with ❤️ by the AiSOC open-source community.**[Report a bug](https://github.com/beenuar/AiSOC/issues/new?template=bug_report.md) · [Request a feature](https://github.com/beenuar/AiSOC/issues/new?template=feature_request.md) · [Become a contributor](CONTRIBUTING.md) · [Read the docs](apps/docs/)diff --git a/apps/docs/docs/architecture.md b/apps/docs/docs/architecture.mdindex f7e4692ef..89c6f77e1 100644--- a/apps/docs/docs/architecture.md+++ b/apps/docs/docs/architecture.md@@ -25,75 +25,134 @@ Fusion UEBA Detections│FastAPI Core API (port 8000)│- ┌────┴────┐- ▼ ▼- Next.js Agents- (port 3000) LangGraph- (port 8001)+ ┌─────────┼──────────┬─────────────┐+ ▼ ▼ ▼ ▼+ Next.js Agents Realtime MCP+ (port 3000) (8001) (8086, WS+Push) (TS, stdio)+ │+ Investigation Ledger+ (every prompt/tool/step,+ replayable per case)```+The new structural pieces in v5.2 are the **Investigation Ledger** (every+agent prompt, response, evidence citation, and tool call is logged step-by-+step against a case and replayable in the UI), the **Ambient Copilot**+(context-aware next-action surface across alerts, cases, rules, and+playbooks), the **Responder PWA** (passkey-only mobile route at+`/responder/*` with VAPID Web Push), the **public eval harness** (one+real measurement plus three substrate self-consistency gates, run in CI),+and the **MCP server** (`@aisoc/mcp`, exposes 11 tools to Claude / Cursor /+Continue / Cody).+## Monorepo Layout```-aisoc/+AiSOC/├── apps/-│ ├── web/ # Next.js 14 React frontend-│ └── docs/ # This Docusaurus site+│ ├── web/ # Next.js 14 React frontend (incl. Responder PWA)+│ └── docs/ # This Docusaurus site├── services/-│ ├── api/ # FastAPI gateway (port 8000)-│ ├── agents/ # LangGraph investigator (port 8001)-│ ├── realtime/ # WebSocket server (port 8002)-│ ├── ingest/ # Go OCSF normaliser (port 8003)-│ ├── honeytokens/ # Deception platform (port 8004)-│ ├── ueba/ # User behavior analytics(port 8005)-│ └── purple-team/ # Adversary emulation (port 8006)+│ ├── api/ # FastAPI gateway (port 8000)+│ ├── agents/ # LangGraph investigator (port 8001)+│ ├── realtime/ # Node/TS WebSocket + Web Push (port 8086)+│ ├── ingest/ # Go OCSF normaliser (port 8081)+│ ├── enrichment/ # Go enrichment fan-out (port 8080)+│ ├── fusion/ # Fusion + ML scoring (port 8003)+│ ├── actions/ # Action executor (port 8002)+│ ├── threatintel/ # TAXII / MISP / OTX / KEV (port 8005)+│ ├── ueba/ # User behavior analytics (port 8007)+│ ├── honeytokens/ # Deception platform (port 8008)+│ ├── purple-team/ # Adversary emulation (port 8006)+│ └── mcp/ # Model Context Protocol server (TypeScript)├── packages/-│ ├── plugin-sdk-py/ # Python plugin SDK-│ ├── plugin-sdk-go/ # Go plugin SDK-│ ├── sdk-py/ # Python client SDK-│ ├── sdk-ts/ # TypeScript client SDK-│ └── sdk-go/ # Go models+│ ├── plugin-sdk-py/ # Python plugin SDK+│ ├── plugin-sdk-go/ # Go plugin SDK+│ ├── sdk-py/ # Python client SDK+│ ├── sdk-ts/ # TypeScript client SDK+│ └── sdk-go/ # Go models / client helpers├── infra/-│ ├── helm/aisoc/ # Helm chart (Kubernetes)-│ └── terraform/ # Terraform modules-├── playbooks/ # Starter playbook templates (JSON)-├── detections/ # Detection rules (YAML)-├── marketplace/ # Community marketplace index-├── docs/ # OpenAPI spec (openapi.yaml)-└── scripts/ # Utilities (backup, seed, runbook gen)+│ ├── helm/aisoc/ # Helm chart (Kubernetes, HA-ready)+│ ├── terraform/ # Terraform modules+│ ├── coolify/ # One-click deploy on Coolify+│ ├── fly/ # Fly.io demo deployments+│ ├── railway/ # Railway templates+│ └── render/ # render.yaml blueprint+├── detections/ # 200+ Sigma/YARA/KQL detection rules (YAML)+├── playbooks/ # 50+ SOAR playbooks (YAML)+├── plugins/ # 15 first-party plugins (Go + Python)+├── marketplace/ # Marketplace index (index.json)+├── docs/ # OpenAPI spec (openapi.yaml)+├── docker-compose.yml # Full development stack+├── docker-compose.demo.yml # Slim profile for `pnpm aisoc:demo`+└── scripts/ # Utilities (seed, eval harness, build, validate)```## Service Responsibilities| Service | Port | Language | Responsibility ||---------|------|----------|----------------|-| `api` | 8000 | Python | REST gateway, auth, RBAC, routing |-| `agents` | 8001 | Python | LangGraph AI investigator, playbook engine |-| `realtime` | 8002 | Python | WebSocket streaming, live agent steps |-| `ingest` | 8003 | Go | OCSF normalisation, Bloom dedup, Kafka publish |-| `honeytokens` | 8004 | Python | Token lifecycle, HMAC signing, webhook dispatch |-| `ueba` | 8005 | Python | Welford baseline, Z-score scoring, anomaly stream |+| `api` | 8000 | Python (FastAPI) | REST gateway, auth, RBAC, RLS, audit log, **Investigation Ledger**, Ambient Copilot, marketplace, approvals, on-call, passkeys, push subscriptions |+| `agents` | 8001 | Python (LangGraph) | Orchestrator + recon + forensic + responder + report-writer agents, playbook engine, ledger writes |+| `realtime` | 8086 | TypeScript (Node.js) | WebSocket streaming of agent steps; **VAPID Web Push** delivery for the Responder PWA |+| `ingest` | 8081 | Go | OCSF normalisation, Bloom-filter dedup, Kafka publish |+| `enrichment` | 8080 | Go | Enrichment fan-out (IP, domain, hash, email, user) |+| `fusion` | 8003 | Python | ML scoring (LightGBM + Isolation Forest), correlation |+| `actions` | 8002 | Python | Plugin action executor, blast-radius gating |+| `threatintel` | 8005 | Python | TAXII 2.1 / MISP / OTX / KEV ingestion + triple storage |+| `ueba` | 8007 | Python | Welford baseline, Z-score scoring, anomaly stream |+| `honeytokens` | 8008 | Python | Token lifecycle, HMAC signing, webhook dispatch || `purple-team` | 8006 | Python | ART YAML parser, Caldera executor, ATT&CK heatmap |-| `web` | 3000 | TypeScript | React/Next.js console |+| `mcp` | n/a | TypeScript | Model Context Protocol stdio server, 11 tools for IDE-side agents |+| `web` | 3000 | TypeScript (Next.js) | React console + Responder PWA route group |## Storage Tier| Store | Role ||-------|------|-| PostgreSQL | Operational data, RLS-enforced multi-tenancy, audit log |+| PostgreSQL | Operational data, RLS-enforced multi-tenancy, audit log, **investigation ledger** || ClickHouse | Time-series analytics, compliance metrics || OpenSearch | Full-text search across alerts, logs, cases |-| Qdrant | Semantic vector search for RAG copilot |-| Neo4j | Attack graph, entity relationships |-| Redis | Cache, rate-limiting, session store |+| Qdrant | Semantic vector search for RAG copilot + agent memory |+| Neo4j | Attack graph, entity relationships, blast-radius queries |+| Redis | Cache, rate-limiting, session store, push subscription cache || Kafka | Async event backbone |+## Investigation Ledger++Every agent action (LLM prompt, LLM response, tool call, evidence+citation, decision branch) is appended to the `investigation_ledger`+table, scoped to a case and stamped with the agent identity, model,+prompt hash, and timestamp. The Case workspace renders this as a+scrubbable timeline so analysts can replay the agent's reasoning.++The schema is defined in+[`services/api/migrations/008_investigation_ledger.sql`](https://github.com/beenuar/AiSOC/blob/main/services/api/migrations/008_investigation_ledger.sql).+The agent-side writer lives in+[`services/agents/app/investigator/ledger.py`](https://github.com/beenuar/AiSOC/blob/main/services/agents/app/investigator/ledger.py),+and the UI consumer is+[`apps/web/src/components/cases/InvestigationLedger.tsx`](https://github.com/beenuar/AiSOC/blob/main/apps/web/src/components/cases/InvestigationLedger.tsx).++## Responder PWA++The Responder PWA is mounted under the Next.js route group+`apps/web/src/app/(responder)/`. It is **passkey-only** (no passwords),+shows the on-call rotation, lists pending approvals, supports VAPID+Web Push for high-severity alerts, and ships an offline shell.++The schema is defined in+[`009_responder_pwa.sql`](https://github.com/beenuar/AiSOC/blob/main/services/api/migrations/009_responder_pwa.sql).+The push pipeline lives in+[`services/realtime/src/push.ts`](https://github.com/beenuar/AiSOC/blob/main/services/realtime/src/push.ts).+## Enterprise Security Controls- **Multi-tenancy** — PostgreSQL Row-Level Security on every table; `tenant_id` is derived from the JWT and cannot be spoofed.- **RBAC** — `require_permission` FastAPI dependency; custom roles with fine-grained action permissions per resource type.- **SAML 2.0 / OIDC** — Pluggable SSO with JIT user provisioning and group-to-role mapping.+- **WebAuthn / Passkeys** — Required for the Responder PWA; password-less by default.- **Immutable Audit Log** — Postgres trigger + `SECURITY DEFINER` function prevents UPDATE/DELETE on `audit_log`.+- **Replayable agent decisions** — The Investigation Ledger is append-only and tenant-scoped.- **OpenTelemetry** — All services emit traces, metrics, and structured logs to a configurable OTLP endpoint.- **Backup & Restore** — `scripts/backup.sh` / `restore.sh` with AES-256-GCM encryption and SHA-256 manifest.- **High-Availability Helm** — Multi-replica deployments, HPA, PDB, anti-affinity, and readiness probes.@@ -105,5 +164,6 @@ Plugins extend AiSOC at three key points:- **Enrichers** — Add context to indicators (IP, domain, hash, email)- **Actions** — Execute response steps (block IP, disable user, create ticket)- **Connectors** — Ingest events from external sources (SIEM, EDR, cloud)+- **Widgets** *(v5.2)* — Render plugin-supplied React panels in the case workspaceSee [Plugin Overview](./plugins/overview) for the full plugin lifecycle.diff --git a/apps/docs/docs/benchmark.md b/apps/docs/docs/benchmark.mdindex c34cd23a9..1828b0b88 100644--- a/apps/docs/docs/benchmark.md+++ b/apps/docs/docs/benchmark.md@@ -1,22 +1,33 @@---sidebar_position: 4-title: Public Benchmark-description: AiSOC's open, reproducible Pillar-1 evaluation suite. 200 deterministic synthetic incidents, four eval gates, all numbers measurable on your laptop in seconds.+title: Public Eval Harness+description: AiSOC's open, deterministic regression harness. 200 synthetic incidents, four CI gates over the substrate (extractors, fusion, templates, judges). Honest about what it measures — and what it doesn't.----# AiSOC Public Benchmark+# AiSOC Public Eval Harness-> **The only AI SOC where the agent's accuracy is published, reproducible, and auditable.**+> **An open, deterministic regression harness over the AiSOC substrate.**>-> Closed-source vendors (Anvilogic, Prophet, Dropzone, Tines) publish marketing-> claims. AiSOC publishes a benchmark, the dataset, the harness, and the CI gate-> that runs it on every commit. You can reproduce every number on this page in-> under 10 seconds on a laptop.--[](#latest-results)-[](#latest-results)-[](#latest-results)-[](#latest-results)+> This page is _not_ a leaderboard for AI SOC agents. It is a CI-gated harness+> that exercises the deterministic substrate underneath AiSOC — the keyword+> extractors, the fusion pipeline, the report and response templates, and the+> offline judges that grade them. The dataset, the harness, and the CI gate are+> all in the repo. You can reproduce every number on this page in under+> 10 seconds on a laptop.++[](#latest-results)+[](#latest-results)+[](#latest-results)+[](#latest-results)++:::warning Read this first+This harness does **not** exercise the live LLM agent (`services/agents`+LangGraph orchestrator). It runs **deterministic substrate code** against+**synthetic data** so we can gate every commit in milliseconds. Three of the+four metrics on this page measure the **internal consistency** of that+substrate — not agent accuracy. We explain exactly what each suite measures —+and doesn't — below.+:::## Why this exists@@ -27,12 +38,15 @@ The AI SOC market is full of unfalsifiable claims:- *"Detects MITRE ATT&CK"* — across how many tactics? With what accuracy?You cannot deploy a black-box vendor in a regulated environment and tell your-auditor "we trust their internal QA." AiSOC is built on the opposite premise:+auditor "we trust their internal QA." AiSOC takes the opposite tack: rather+than claim a number we can't substantiate, we publish a small, honest harness+and call out exactly which numbers are real and which are mostly substrate+self-checks.-1. **The dataset is in the repo.** [`services/agents/tests/eval_data/synthetic_incidents.json`](https://github.com/cyble-inc/AiSOC/blob/main/services/agents/tests/eval_data/synthetic_incidents.json) — 200 cases, deterministic, regenerable.-2. **The harness is in the repo.** Four pytest suites under [`services/agents/tests/`](https://github.com/cyble-inc/AiSOC/tree/main/services/agents/tests).-3. **The CI gate runs on every commit.** [Latest run](https://github.com/cyble-inc/AiSOC/actions/workflows/ci.yml).-4. **Historical numbers are queryable.** Every successful build pushes its `eval_report.json` to the [`eval-results`](https://github.com/cyble-inc/AiSOC/tree/eval-results) branch as `eval/results/<commit_sha>.json`.+1. **The dataset is in the repo.** [`services/agents/tests/eval_data/synthetic_incidents.json`](https://github.com/beenuar/AiSOC/blob/main/services/agents/tests/eval_data/synthetic_incidents.json) — 200 cases, deterministic, regenerable.+2. **The harness is in the repo.** Four pytest suites under [`services/agents/tests/`](https://github.com/beenuar/AiSOC/tree/main/services/agents/tests).+3. **The CI gate runs on every commit.** [Latest run](https://github.com/beenuar/AiSOC/actions/workflows/ci.yml).+4. **Historical numbers are queryable.** Every successful build pushes its `eval_report.json` to the [`eval-results`](https://github.com/beenuar/AiSOC/tree/eval-results) branch as `eval/results/<commit_sha>.json`.## Latest results@@ -40,22 +54,22 @@ The four numbers below are produced by `scripts/run_evals.py` against the200-incident synthetic benchmark. They run in roughly **25 milliseconds total**(no LLM calls, no DB) so they're cheap enough to gate every commit.-| Suite | Metric | Latest | Target | Notes |-|--------------------------------|-----------------------|-------------|---------|-------|-| MITRE ATT&CK tactic accuracy | accuracy | **97.0 %** | ≥ 80 % | At least one expected tactic recovered per incident |-| Alert reduction ratio | reduction | **75.3 %** | ≥ 70 % | 1 000 noisy alerts → 247 incidents via 3-tier fusion |-| Investigation completeness | mean keyword coverage | **94.3 %** | ≥ 85 % | Evidence keywords cited in the agent's report |-| Response-plan quality | mean rubric score | **1.000** | ≥ 0.80 | 5-criterion rubric, offline keyword judge |+| Suite | Metric | Latest | Target | What it actually checks |+|--------------------------------|-----------------------|-------------|---------|--------------------------|+| Alert reduction ratio | reduction | **75.3 %** | ≥ 70 % | **Real measurement** of the 3-tier fusion logic on a noisy 1 000-alert stream |+| MITRE ATT&CK tactic accuracy | accuracy | **97.0 %** | ≥ 80 % | **Substrate self-consistency** — keyword extractor vs. dataset that's written for it |+| Investigation completeness | mean keyword coverage | **94.3 %** | ≥ 85 % | **Substrate self-consistency** — report template wraps the description; judge finds keywords from the description |+| Response-plan quality | mean rubric score | **1.000** | ≥ 0.80 | **Substrate self-consistency** — synthesizer embeds the keywords the rubric checks for |These numbers move with the codebase. The current snapshot lives at-[`eval-results/eval/results/latest.json`](https://github.com/cyble-inc/AiSOC/blob/eval-results/eval/results/latest.json).+[`eval-results/eval/results/latest.json`](https://github.com/beenuar/AiSOC/blob/eval-results/eval/results/latest.json).## Reproduce these numbersYou don't have to take our word for it. From a fresh clone:```bash-git clone https://github.com/cyble-inc/AiSOC && cd AiSOC+git clone https://github.com/beenuar/AiSOC && cd AiSOCpython3 scripts/run_evals.py```@@ -81,58 +95,85 @@ python3 scripts/run_evals.py --jsonpython3 scripts/run_evals.py --ci --out report.json```-## How each suite works--### 1. MITRE ATT&CK tactic accuracy--**Source:** [`services/agents/tests/test_mitre_accuracy.py`](https://github.com/cyble-inc/AiSOC/blob/main/services/agents/tests/test_mitre_accuracy.py)+## What each suite actually measures-For each of the 200 incidents we run a deterministic keyword extractor that-proxies for the LLM's tactic-detection. A case is "correct" if the predicted-tactic set has at least one overlap with the curated expected-tactic set. We-also report per-case precision, recall, and F1 over the expected sets.+We took a hard look at the harness and tightened the language so the+documentation matches the code. Here is the honest breakdown:-The expected-tactic and expected-technique sets cover all 14 MITRE ATT&CK-enterprise tactics across roughly the top 50 techniques. Cases are-deterministically generated by [`scripts/generate_eval_incidents.py`](https://github.com/cyble-inc/AiSOC/blob/main/scripts/generate_eval_incidents.py)-so the dataset is regeneratable bit-for-bit.+### 1. Alert reduction ratio — `Real measurement`-### 2. Alert reduction ratio+**Source:** [`services/agents/tests/test_alert_reduction.py`](https://github.com/beenuar/AiSOC/blob/main/services/agents/tests/test_alert_reduction.py)-**Source:** [`services/agents/tests/test_alert_reduction.py`](https://github.com/cyble-inc/AiSOC/blob/main/services/agents/tests/test_alert_reduction.py)--We fabricate a 1 000-alert noisy stream covering pure duplicates, near-duplicates within a 30-minute host window, rule-storms across multiple hosts,-and benign low-score noise. The fusion pipeline then groups them into incidents-using a 3-tier strategy:+A 1 000-alert noisy stream — pure duplicates, near-duplicates within a+30-minute host window, multi-host rule storms, and benign low-score chatter —+is fed into the **real** fusion pipeline:- **Tier 1** — same `(rule, host, user)` within 10 minutes → 1 incident- **Tier 2** — same `(rule, host)` within 30 minutes → merge into a Tier-1 incident- **Tier 3** — same rule within 5 minutes across ≥ 3 hosts → "storm" incident-Incidents below the noise threshold (`score < 0.35`) are dropped.+Incidents below the noise threshold (`score < 0.35`) are dropped. The output is+whatever the code produces — a fusion regression will move the number. This is+a legitimate measurement of fusion behavior on a controlled dataset.++We deliberately quote ~75 % rather than the 90 % that vendors tend to market,+because we're measuring the same logic on a fixed dataset every time, and we'd+rather an auditor see a real number than a marketing one.++### 2. MITRE ATT&CK tactic accuracy — `Substrate self-consistency`++**Source:** [`services/agents/tests/test_mitre_accuracy.py`](https://github.com/beenuar/AiSOC/blob/main/services/agents/tests/test_mitre_accuracy.py)++Each synthetic incident is generated with a labeled MITRE tactic and a+description that is, by design, written to include keywords the **hand-curated+extractor** in the test recognizes. A case is "correct" if the predicted+tactic set has at least one overlap with the curated expected-tactic set.++The 97 % therefore mostly checks that **dataset and extractor agree** with each+other. It is useful as:-The honest reduction comes out to **~75 %**. We deliberately quote it lower-than vendor claims (Anvilogic markets 90 %) because we measured it.+- A **regression sentinel** — if someone breaks the extractor or rewrites the+ dataset without updating the other, this suite catches it.+- A **schema sanity check** — every incident carries at least one tactic the+ extractor can reach.-### 3. Investigation completeness+It is **not**:-**Source:** [`services/agents/tests/test_investigation_completeness.py`](https://github.com/cyble-inc/AiSOC/blob/main/services/agents/tests/test_investigation_completeness.py)+- A measure of LLM agent accuracy on real telemetry.+- A score that should be compared to vendor MITRE benchmarks.-Each synthetic incident ships with a list of `evidence_keywords` that any-competent SOC analyst should cite in their report. We run a deterministic-report simulator that produces a Markdown investigation, then score what-fraction of the evidence keywords appear in the report.+Treat it as a regression sentinel for the substrate, not a leaderboard score.-This catches the most common silent failure mode of LLM-driven SOC tools:-plausible-sounding output that omits half the relevant signals.+### 3. Investigation completeness — `Substrate self-consistency`-### 4. Response-plan quality+**Source:** [`services/agents/tests/test_investigation_completeness.py`](https://github.com/beenuar/AiSOC/blob/main/services/agents/tests/test_investigation_completeness.py)-**Source:** [`services/agents/tests/test_response_quality.py`](https://github.com/cyble-inc/AiSOC/blob/main/services/agents/tests/test_response_quality.py)+Each synthetic incident ships with a list of `evidence_keywords`. A+deterministic report **simulator** wraps the incident's `description` field+into a Markdown report; the **judge** then looks for those evidence keywords in+the report.-A deterministic response-plan synthesizer produces a containment plan for each-incident. An offline judge then scores each plan against a 5-criterion rubric:+Because the description is what produces the evidence keywords in the first+place, and the simulator pastes the description back into the report verbatim,+the score is close to a string-copy tautology. It confirms:++- The report template still includes the description.+- The keyword judge can still tokenize and match.++It does **not** confirm an LLM agent wrote a complete investigation. The+real value of this suite is catching template breakage — not LLM quality.++### 4. Response-plan quality — `Substrate self-consistency`++**Source:** [`services/agents/tests/test_response_quality.py`](https://github.com/beenuar/AiSOC/blob/main/services/agents/tests/test_response_quality.py)++A deterministic response-plan **synthesizer** produces a containment plan for+each incident. By construction, the synthesizer embeds:++- The expected MITRE techniques into the plan summary.+- The first `evidence_keyword` into the plan steps.++An offline judge then scores each plan against a 5-criterion rubric:1. **Action aligned** — the plan's action class matches the curated `response_class`2. **Severity aware** — plan tone scales with `severity`@@ -140,9 +181,13 @@ incident. An offline judge then scores each plan against a 5-criterion rubric:4. **Evidence grounded** — plan references at least one expected evidence keyword5. **Actionable** — plan contains concrete imperative verbs and step-by-step structure-This is an **offline keyword judge** (no LLM-as-judge calls), so it's-deterministic and free. A future revision will optionally swap in an-LLM-as-judge run gated by `OPENAI_API_KEY`.+Because the synthesizer embeds exactly what the rubric checks for, criteria 3+and 4 are essentially guaranteed; 1, 2, and 5 are also driven by the templated+generator. The score is ~1.000 by construction.++This catches a broken templating pipeline (e.g. someone removes the MITRE+references from the synthesizer, or the rubric stops matching) — it is+**not** a grade of LLM-written response plans.## Honest comparison vs vendors@@ -151,36 +196,43 @@ LLM-as-judge run gated by `OPENAI_API_KEY`.| Open-source (MIT) | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ || Self-hostable (your data never leaves) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ || Agent decisions are step-by-step auditable | ✅ | N/A | N/A | ❌ | ❌ | ❌ |-| Public, reproducible benchmark numbers | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |+| Public, reproducible regression harness | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ || Eval dataset shipped in the repo | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |-| MITRE ATT&CK accuracy gate in CI | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |+| Substrate-level regression gate in CI | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ || Plugin SDK (Python + Go) | ✅ | ✅ | ✅ | ⚠️ | ❌ | ❌ |-| Free | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |+| Free | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |> **Why this matters:** A regulated bank cannot deploy a vendor whose agent is a> black box cloud service. They can deploy AiSOC. Your auditor reviews the same-> dataset, the same harness, and the same CI numbers we publish on this page.+> dataset, the same harness, and the same CI numbers we publish on this page —+> and we tell them straight which numbers are real measurements and which are+> regression sentinels.-## What this benchmark is _not_+## What this is _not_We're allergic to overclaiming, so a few honest caveats:-- **The harness is offline.** It uses deterministic extractors and templated- report/plan synthesis — not the live LLM pipeline. We do this so the gate is- fast and cheap enough to run on every commit. A separate **online eval**- (LLM-as-judge, real `services/agents/app/investigator/orchestrator.py`) is- on the [Phase-1 roadmap](https://github.com/cyble-inc/AiSOC/blob/main/.cursor/plans/aisoc_leading-ai-soc_90-day_plan_9999bc93.plan.md#1c-eval-harness-from-20--200-cases--public-benchmark) and will run nightly.+- **No LLM agent runs in this harness.** It exercises deterministic extractors+ and templated report/plan synthesis. The live `services/agents/` LangGraph+ orchestrator that talks to OpenAI/Anthropic is **not** under test here. A+ separate **online eval** (LLM-as-judge, real orchestrator) is on the+ [Phase-1 roadmap](https://github.com/beenuar/AiSOC/blob/main/.cursor/plans/aisoc_leading-ai-soc_90-day_plan_9999bc93.plan.md#1c-eval-harness-from-20--200-cases--public-benchmark)+ and will run nightly. That is where actual agent accuracy gets measured.- **The dataset is synthetic.** 200 incidents is enough to flag majorregressions but not enough to claim production parity. Real-customerblindness is on the roadmap (federated, opt-in).-- **The judge is keyword-based.** It can be gamed by template-stuffing. The- full LLM-as-judge variant is a follow-up. The keyword judge nonetheless- catches the most common failure modes (omitted evidence, mis-aligned- containment action, severity drift).+- **Three of the four judges are tautological by design.** The dataset, the+ templates, and the judge were written together to keep the gate fast and+ deterministic. They will pass as long as the substrate is internally+ consistent. They will fail if it is not.+- **"Public benchmark" means the harness, not a third-party leaderboard.**+ These numbers are reproducible by anyone with `python3`. They are not+ comparable to numbers from MITRE Engenuity, MLPerf, or any other external+ evaluator.## Historical results-Every CI run on `main` writes a snapshot into the [`eval-results`](https://github.com/cyble-inc/AiSOC/tree/eval-results) branch:+Every CI run on `main` writes a snapshot into the [`eval-results`](https://github.com/beenuar/AiSOC/tree/eval-results) branch:```texteval/results/<commit_sha>.json # one snapshot per commit@@ -189,19 +241,23 @@ eval/results/badge-*.json # shields.io endpoints```You can `git clone -b eval-results` to graph the trend yourself, or open the-[Actions tab](https://github.com/cyble-inc/AiSOC/actions/workflows/ci.yml) for+[Actions tab](https://github.com/beenuar/AiSOC/actions/workflows/ci.yml) forper-run job summaries.-## Improving these numbers+## Help us harden the harness-Pull requests welcome. The fastest ways to move the needle:+Pull requests welcome. The fastest ways to make this harness honestly stronger:+- **Land the online LLM-as-judge variant.** Wire `OPENAI_API_KEY` /+ `ANTHROPIC_API_KEY` through the harness so the report and response judges run+ against actual LLM output instead of the templated synthesizer. That is what+ turns this page into a real agent benchmark.- **Find a tactic the keyword extractor misses.** Add a fixture incident, watchthe MITRE accuracy ticker move, fix the extractor.- **Find a fusion miss.** Add a contrived alert pattern that should de-dupe butdoesn't. The reduction-ratio gate will block the regression.-- **Tighten the report rubric.** The completeness suite is intentionally- permissive in v1; PRs that add stricter evidence-grounding criteria are- highly welcome.+- **Tighten the report and plan rubrics.** The completeness and quality suites+ are intentionally permissive in v1. PRs that add stricter evidence-grounding+ or that decouple the synthesizer from the judge keywords are highly welcome.-See [`CONTRIBUTING.md`](https://github.com/cyble-inc/AiSOC/blob/main/CONTRIBUTING.md) for the full path.+See [`CONTRIBUTING.md`](https://github.com/beenuar/AiSOC/blob/main/CONTRIBUTING.md) for the full path.diff --git a/apps/docs/docs/contributing/dev-setup.md b/apps/docs/docs/contributing/dev-setup.mdindex b141e776b..0e43b6a26 100644--- a/apps/docs/docs/contributing/dev-setup.md+++ b/apps/docs/docs/contributing/dev-setup.md@@ -4,75 +4,213 @@ sidebar_position: 1# Development Setup+This guide walks through getting a full AiSOC dev environment on your+laptop. If you only need a working demo (no code changes), prefer the+one-shot path described in the [Quickstart](../quickstart) — it pulls+prebuilt GHCR images and is ready in under five minutes.+## Prerequisites-- Node.js ≥ 18, pnpm ≥ 9-- Python 3.11+-- Go 1.21+-- Docker & Docker Compose v2+| Tool | Minimum | Notes |+|------|---------|-------|+| Node.js | 20 LTS | We test against 20.x |+| pnpm | 8 | `corepack enable` is fine |+| Python | 3.11+ | Used by `services/api`, `services/agents`, `services/fusion`, `services/actions`, `services/threatintel`, `services/ueba`, `services/honeytokens`, `services/purple-team` |+| Go | 1.21+ | Used by `services/ingest`, `services/enrichment`, `packages/plugin-sdk-go`, `packages/sdk-go`, and the first-party Go plugins |+| Docker | 24+ | Compose v2 is required |+| Make | optional | A `Makefile` wraps the most common targets |++> **Tip:** the `pnpm aisoc:doctor` command verifies that all of the+> above are installed at compatible versions before you spin up the+> stack.-## 1. Clone & Install+## 1. Clone & install```bash-git clone https://github.com/beenuar/aisoc.git-cd aisoc+git clone https://github.com/beenuar/AiSOC.git+cd AiSOCpnpm install```-## 2. Python Services+`pnpm install` walks the `pnpm-workspace.yaml` and bootstraps every+TypeScript package — including the Next.js console (`apps/web`), the+Docusaurus docs site (`apps/docs`), the realtime gateway+(`services/realtime`), the MCP server (`services/mcp`), the TS SDK+(`packages/sdk-ts`), and the orchestration scripts under `scripts/`.++## 2. Python services++Each Python service has its own `pyproject.toml`. The most common+workflow is to create one virtualenv per service you want to hack on.```bash-cd services/agents+# Core API gateway (FastAPI)+cd services/api+python3 -m venv .venv && source .venv/bin/activate+pip install -e ".[dev]"++# AI investigator (LangGraph)+cd ../agentspython3 -m venv .venv && source .venv/bin/activatepip install -e ".[dev]"```-## 3. Environment+Repeat for `services/fusion`, `services/actions`, `services/threatintel`,+`services/ueba`, `services/honeytokens`, and `services/purple-team` as+needed.++## 3. Go services and plugins++```bash+# Ingest + enrichment+( cd services/ingest && go mod download )+( cd services/enrichment && go mod download )++# SDKs+( cd packages/plugin-sdk-go && go test ./... )+( cd packages/sdk-go && go test ./... )++# All first-party plugins live under plugins/+ls plugins/+```++## 4. Environment```bashcp .env.example .env-# Set OPENAI_API_KEY at minimum```-## 4. Start Infrastructure+At minimum, set:++- `OPENAI_API_KEY` — for the AI investigator (or wire any LangChain-+ compatible model provider).+- `JWT_SECRET` and `ENCRYPTION_KEY` — generate with+ `openssl rand -hex 32` each.+- `VAPID_PUBLIC_KEY` / `VAPID_PRIVATE_KEY` — needed for Web Push in the+ Responder PWA. Generate with `npx web-push generate-vapid-keys`.++## 5. Start the data tier++The simplest path is to bring up the data services from the full+compose stack and run application services on the host:++```bash+docker compose up -d postgres redis kafka clickhouse opensearch qdrant neo4j+```++Then apply migrations:++```bash+cd services/api+alembic upgrade head+# Or, if you prefer raw SQL, the migration files live in+# services/api/migrations/ — including:+# 008_investigation_ledger.sql+# 009_responder_pwa.sql+```++Seed demo data:```bash-docker compose up -d postgres redis+pnpm seed:demo```-## 5. Run Services Individually+## 6. Run services individually++In separate terminals (with the right virtualenv activated where+applicable):```bash-# Frontend-pnpm --filter @aisoc/web dev+# Frontend (Next.js console + Responder PWA route group)+pnpm --filter @aisoc/web dev # http://localhost:3000# API gateway-cd services/api && uvicorn app.main:app --reload --port 8000+cd services/api+uvicorn app.main:app --reload --port 8000 # http://localhost:8000++# AI investigator (LangGraph)+cd services/agents+uvicorn app.main:app --reload --port 8001 # http://localhost:8001-# Agents service-cd services/agents && uvicorn app.main:app --reload --port 8001+# Realtime gateway (WebSocket + Web Push)+cd services/realtime+pnpm dev # ws://localhost:8086-# Realtime-cd services/realtime && uvicorn app.main:app --reload --port 8002+# Ingest (Go)+cd services/ingest+go run ./cmd/server # http://localhost:8081++# Enrichment (Go)+cd services/enrichment+go run ./cmd/server # http://localhost:8080++# MCP server (TypeScript, stdio)+pnpm --filter @aisoc/mcp dev```-## 6. Run Tests+The other Python services (`fusion`, `actions`, `threatintel`, `ueba`,+`honeytokens`, `purple-team`) follow the same pattern: activate the+virtualenv and run `uvicorn app.main:app --reload --port <port>`.+The canonical port mapping is in+[`docker-compose.yml`](https://github.com/beenuar/AiSOC/blob/main/docker-compose.yml)+and the [Architecture](../architecture#service-responsibilities) page.++## 7. Run tests```bash-# Python+# Python (per-service)+pytest services/api/tests/pytest services/agents/tests/-# Go SDK-cd packages/plugin-sdk-go && go test ./...+# Go+( cd services/ingest && go test ./... )+( cd services/enrichment && go test ./... )+( cd packages/plugin-sdk-go && go test ./... )+( cd packages/sdk-go && go test ./... )-# Frontend+# Frontend (Next.js + Responder PWA)+pnpm --filter @aisoc/web lintpnpm --filter @aisoc/web test++# Public eval harness (substrate self-consistency + one real measurement)+pnpm eval:run```-## Useful Scripts+The eval harness writes its results to `eval_report.json` and+`eval_mitre_accuracy_report.json` (both `.gitignore`d). The same harness+runs in CI on every PR — see the [eval harness page](../benchmark) for what+each suite actually measures and which numbers are real measurements vs.+substrate self-consistency gates.++## 8. Useful scripts| Script | Description ||--------|-------------|-| `python3 scripts/seed_demo.py` | Seed demo cases and playbooks |+| `pnpm aisoc:doctor` | Verify Node / pnpm / Python / Go / Docker versions |+| `pnpm aisoc:demo` | One-shot demo using prebuilt GHCR images |+| `pnpm aisoc:demo:logs` | Tail logs from the demo stack |+| `pnpm aisoc:demo:down` | Tear the demo stack down |+| `pnpm seed:demo` | Seed demo tenants, alerts, cases, and playbooks |+| `pnpm marketplace:build` | Build `marketplace/index.json` from `detections/`, `playbooks/`, `plugins/` |+| `pnpm marketplace:check` | Validate the marketplace index against the schema |+| `pnpm marketplace:sync` | Push the marketplace index to `apps/web/public/marketplace/index.json` |+| `pnpm eval:run` | Run the public eval harness || `python3 scripts/validate_detections.py detections/` | Validate detection rules |-| `pnpm --filter @aisoc/web lint` | Lint the frontend |+| `python3 scripts/validate_playbooks.py playbooks/` | Validate playbooks |+| `python3 scripts/lint_playbooks.py playbooks/` | Lint playbooks for style |++## 9. Hacking on content++AiSOC ships a curated marketplace at+[`marketplace/index.json`](https://github.com/beenuar/AiSOC/blob/main/marketplace/index.json)+that aggregates ~200 detections, 50+ playbooks, and 15 first-party+plugins. To add to the catalog:++1. Drop your YAML into `detections/<vendor>/` or `playbooks/<vendor>/`.+2. Add or update the plugin under `plugins/<vendor>/`.+3. Run `pnpm marketplace:build && pnpm marketplace:check`.+4. Run `pnpm marketplace:sync` to publish the index into the web app.+5. Add an entry to `CHANGELOG.md` under the `Unreleased` section.++The `validate-detections.yml` and `validate-playbooks.yml` GitHub+Actions enforce the schema on every PR.diff --git a/apps/docs/docs/intro.md b/apps/docs/docs/intro.mdindex b81d45b25..52741f6f5 100644--- a/apps/docs/docs/intro.md+++ b/apps/docs/docs/intro.md@@ -4,24 +4,32 @@ sidebar_position: 1# Introduction-**AiSOC** (v5.1.0) is an open-source, production-ready AI Security Operations Center-built by [Cyble](https://cyble.com) and the community. It combines AI-powered-investigation, automated playbook execution, enterprise governance, and an extensible-plugin ecosystem to help security teams detect threats faster and respond smarter.+**AiSOC** (v5.2.0) is an open-source, production-ready AI Security Operations Center+maintained by the AiSOC community. It is the **only AI SOC where the agent itself is+open-source, auditable, and self-hostable** — every LLM prompt, tool call, and+decision the agent makes is recorded in a replayable Investigation Ledger, and the+substrate is gated by a public, reproducible eval harness on every commit.## Key Features+- 📒 **Investigation Ledger** — every prompt, response, evidence citation, and tool call the agent emits is logged step-by-step and replayable on each case (the structural moat over closed-source AI SOC vendors)+- 📊 **Public eval harness** — alert reduction (a real measurement on a fixed noisy stream) plus MITRE-tactic, investigation-completeness, and response-quality substrate self-consistency gates are reproducible with one command and run in CI on every PR. We are upfront about which is which ([eval harness page](./benchmark)).+- 🤖 **Ambient Copilot** — context-aware next-action suggestions on every alert, case, rule, and playbook page; one click runs the right agent tool with the right payload+- 📱 **Responder PWA** — installable mobile route at `/responder/*` with passkey-only login, on-call rotation, approvals queue, VAPID Web Push, and offline shell+- 🧠 **LangGraph multi-agent investigation** — orchestrator + recon + forensic + responder + report-writer agents, grounded in MITRE ATT&CK with persistent Qdrant RAG memory- ⚡ **Real-time fusion** — Kafka spine with sub-second alert ingestion, Bloom-filter dedup on 10M+ IOCs, ML scoring (LightGBM + Isolation Forest)-- 🧠 **AI Copilot** — LangGraph multi-agent reasoning grounded in MITRE ATT&CK with persistent Qdrant RAG memory- 🕸️ **Attack graph** — Neo4j entity graph with attack-path reconstruction and blast-radius gating on automated actions- 👤 **UEBA** — Per-user Welford online baseline, Z-score anomaly scoring, and Kafka-integrated anomaly publishing- 🍯 **Honeytokens** — HMAC-SHA256 signed deceptive credentials (URL, file, AWS key, email) with first-touch webhook alerting- 🟣 **Purple Team** — Atomic Red Team YAML parser + Caldera executor, ATT&CK coverage heatmap, and tabletop sessions-- 🎯 **Detection engineering** — Sigma over OpenSearch + ClickHouse, YARA, KQL/EQL, community catalog with one-click install+- 🎯 **Detection engineering** — 200+ Sigma rules over OpenSearch + ClickHouse, YARA, KQL/EQL, community catalog with one-click install+- 📜 **Playbook engine** — 50+ community SOAR playbooks with explicit decision trees and human-approval gates on destructive actions- 🌐 **Threat intelligence** — TAXII 2.1, MISP, OTX, CISA KEV with triple storage (search · vector · graph)- 🛡️ **Enterprise governance** — SAML 2.0 + OIDC SSO, multi-tenant RLS, granular RBAC, immutable audit log- 📊 **Compliance dashboards** — SOC 2, ISO 27001, NIST CSF, PCI-DSS, HIPAA, DORA evidence with MTTD/MTTR/MTTC SLA tracking-- 🔌 **Plugin ecosystem** — Python and TypeScript SDKs, Ed25519-signed publishing, community marketplace+- 🧩 **Marketplace** — 15 first-party plugins + 50+ playbooks + 200+ detections, surfaced in-app via [`marketplace/index.json`](https://github.com/beenuar/AiSOC/tree/main/marketplace)+- 🔌 **SDKs** — Python, TypeScript, and Go SDKs for both client and plugin development; Ed25519-signed publishing+- 🤝 **Model Context Protocol (MCP)** — `@aisoc/mcp` exposes 11 tools to Claude / Cursor / Continue / Cody so analysts can replay agent decisions from inside their IDE ([MCP integration](./integrations/mcp))## Architecture Overview@@ -46,7 +54,9 @@ See the full [Architecture](./architecture) page for the detailed service map an## Quick Links-- [Quick Start](./quickstart) — up and running in 5 minutes+- [Quick Start](./quickstart) — `pnpm aisoc:demo`, under 5 minutes to a live investigation+- [Public eval harness](./benchmark) — alert reduction (real measurement) plus MITRE / completeness / response-quality substrate self-consistency gates+- [MCP Integration](./integrations/mcp) — connect Claude / Cursor / Continue / Cody- [Architecture](./architecture) — service map and data flow- [API Reference (REST)](./api/rest) — OpenAPI 3.1 spec- [API Reference (GraphQL)](./api/graphql) — schema and queries@@ -55,7 +65,7 @@ See the full [Architecture](./architecture) page for the detailed service map an- [Plugin SDK (Go)](./plugins/go-sdk)- [Concepts: Detections](./concepts/detections)- [Concepts: Playbooks](./concepts/playbooks)-- [Concepts: Cases](./concepts/cases)+- [Concepts: Cases](./concepts/cases) — including the Investigation Ledger- [Deployment: Docker](./deployment/docker)- [Deployment: Kubernetes](./deployment/kubernetes)- [Deployment: Environment Variables](./deployment/env-vars)diff --git a/apps/docs/docs/quickstart.md b/apps/docs/docs/quickstart.mdindex 3b820cd57..4f7effe16 100644--- a/apps/docs/docs/quickstart.md+++ b/apps/docs/docs/quickstart.md@@ -4,78 +4,110 @@ sidebar_position: 2# Quick Start-Get AiSOC running locally in under 5 minutes.+Get AiSOC investigating a real case in your browser in under **5 minutes**.++There are two paths:++1. **One-shot demo (recommended)** — `pnpm aisoc:demo` brings up a slim+ stack from prebuilt GHCR images, seeds canonical demo data, kicks off an+ AI investigation, and opens your browser at the live case.+2. **Full development stack** — every microservice (UEBA, Honeytokens,+ Purple Team, ClickHouse, OpenSearch, Neo4j, Qdrant, MCP, …) for hacking+ on AiSOC itself.## Prerequisites| Tool | Minimum version ||------|-----------------|| Docker & Docker Compose | v2.x |-| Node.js | ≥ 18 |-| pnpm | ≥ 9 |-| Python | 3.11+ |+| Node.js | ≥ 20 |+| pnpm | ≥ 8 |+| Python | 3.11+ (only needed for the eval harness and the dev stack) |+| Go | 1.21+ (only needed if you hack on the Go services or plugins) |-## 1. Clone the Repository+## Path A — one-shot demo```bash-git clone https://github.com/beenuar/aisoc.git-cd aisoc+git clone https://github.com/beenuar/AiSOC.git+cd AiSOC+pnpm aisoc:demo```-## 2. Install Frontend Dependencies+That single command:++1. Pulls prebuilt images from `ghcr.io/beenuar/*` (≈90s on a warm cache).+2. Brings up the slim demo profile defined in+ [`docker-compose.demo.yml`](https://github.com/beenuar/AiSOC/blob/main/docker-compose.demo.yml):+ `postgres`, `redis`, `kafka`, `api`, `agents`, `realtime`, `web`.+3. Waits for healthchecks to go green.+4. Seeds canonical demo data (tenants, users, alerts, IOCs, attack paths).+5. Kicks off an AI investigation against a seeded case.+6. Opens your browser at `/cases/<uuid>` so you land on a **live** investigation.++| Step | Target |+|---|---|+| `docker compose pull` | ~90s |+| `docker compose up` + healthchecks | ~60s |+| Seed canonical data | ~30s |+| Kick off investigation | ~30s |+| **Total time-to-first-investigation** | **~3.5 min** |++When you're done:```bash-pnpm install+pnpm aisoc:demo:down # stops the stack and deletes the demo volumes+pnpm aisoc:demo:logs # tails logs while the stack is up```-## 3. Configure Environment+The orchestrator script lives at+[`scripts/aisoc-demo.ts`](https://github.com/beenuar/AiSOC/blob/main/scripts/aisoc-demo.ts).++## Path B — full development stack++Use this when you want to hack on AiSOC itself, run the eval harness, or+exercise UEBA / Honeytokens / Purple Team / MCP.++### 1. Clone & configure```bash+git clone https://github.com/beenuar/AiSOC.git+cd AiSOCcp .env.example .env+pnpm install```-Open `.env` and fill in the required values:+Open `.env` and fill in at least one AI provider:```bash# AI providers (at least one required)OPENAI_API_KEY=sk-...-# or ANTHROPIC_API_KEY=sk-ant-...--# Database (auto-created by Docker Compose)-DATABASE_URL=postgresql+asyncpg://aisoc:aisoc@localhost:5432/aisoc--# JWT secret — generate with: openssl rand -hex 32-JWT_SECRET=change-me-in-production--# Optional: SAML/OIDC SSO-# SAML_IDP_METADATA_URL=https://your-idp/metadata-# OIDC_DISCOVERY_URL=https://your-idp/.well-known/openid-configuration+# or+ANTHROPIC_API_KEY=sk-ant-...-# Optional: Purple Team / Caldera integration-# CALDERA_URL=http://localhost:8888-# CALDERA_API_KEY=your-caldera-key+# API JWT signing key — generate with: openssl rand -hex 32+SECRET_KEY=change-me-in-production-at-least-32-chars-# Optional: OpenTelemetry-# OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317+# Optional enrichment / feeds / SSO / Purple Team — see .env.example```-## 4. Start Services+### 2. Start the full stack```bashdocker compose up -d+docker compose ps```-This starts:-- **PostgreSQL** (port 5432) — main datastore-- **Redis** (port 6379) — cache and rate-limiting-- **Kafka** (port 9092) — event streaming spine-- **FastAPI** (port 8000) — core API-- **UEBA service** (port 8005) — user behavior analytics-- **Honeytokens service** (port 8004) — deception platform-- **Purple Team service** (port 8006) — adversary emulation-- **Next.js** (port 3000) — web console+This starts the full set of services:-## 5. Run Database Migrations+- **PostgreSQL** (5432) · **Redis** (6379) · **Kafka** (9092)+- **ClickHouse** · **OpenSearch** · **Neo4j** · **Qdrant**+- **api** (8000, FastAPI core) · **agents** (8001, LangGraph) ·+ **realtime** (8086, Node.js + VAPID Web Push) · **web** (3000)+- **fusion** (8003) · **actions** (8002) · **threatintel** (8005) ·+ **ueba** (8007) · **honeytokens** (8008) · **purple-team** (8006) ·+ **ingest** (8081, Go) · **enrichment** (8080, Go) · **mcp** (TypeScript)++### 3. Run database migrations```bashdocker compose exec api alembic upgrade head@@ -84,40 +116,85 @@ docker compose exec honeytokens alembic upgrade headdocker compose exec purple-team alembic upgrade head```-## 6. Seed Demo Data+The `api` migrations include+[`008_investigation_ledger.sql`](https://github.com/beenuar/AiSOC/blob/main/services/api/migrations/008_investigation_ledger.sql)+(replayable agent decision log) and+[`009_responder_pwa.sql`](https://github.com/beenuar/AiSOC/blob/main/services/api/migrations/009_responder_pwa.sql)+(passkeys, on-call rotation, approvals).++### 4. Seed demo data```bash-python3 scripts/seed_demo.py+pnpm seed:demo```-This loads demo cases, alerts, detections, playbooks, and a sample UEBA baseline.+### 5. Verify++```bash+pnpm aisoc:doctor+```++Runs a one-shot health check across ports, containers, demo data, the API,+and the WebSocket gateway. If anything is red, it tells you exactly what to+fix.++### 6. Run the public eval harness (optional but recommended)++```bash+# Generate 200 synthetic incidents and run all four substrate eval suites+python scripts/run_evals.py --count 200 --report eval_report.json++# Or run a single eval gate+pytest services/agents/tests/test_mitre_accuracy.py+```++The harness writes `eval_report.json` and `eval_mitre_accuracy_report.json`,+which the [eval harness page](./benchmark) renders. The same harness runs in+CI on every PR — see+[`.github/workflows/ci.yml`](https://github.com/beenuar/AiSOC/blob/main/.github/workflows/ci.yml).++> **Important**: the harness runs deterministic substrate code (extractors,+> fusion, templates, judges) against synthetic data — it does **not** call+> the live LLM agent. Three of the four metrics are substrate self-consistency+> gates rather than agent accuracy scores. The+> [eval harness page](./benchmark) documents exactly what each suite measures+> and what it doesn't.-## 7. Open the UI+### 7. Open the UI-Visit [http://localhost:3000](http://localhost:3000).+Visit [http://localhost:3000](http://localhost:3000) and log in with the+default seeded credentials: `[email protected]` / `changeme`.-Log in with the demo credentials printed by the seed script (default: `[email protected] / changeme`).+The mobile **Responder PWA** lives at+[http://localhost:3000/responder](http://localhost:3000/responder) — install+it on your phone via "Add to Home Screen" and sign in with a passkey.### Console Tour| Page | URL | Description ||------|-----|-------------|-| Dashboard | `/` | Live alert stream, case queue, threat map |+| Dashboard | `/dashboard` | Live alert stream, case queue, KPI tiles |+| Alerts | `/alerts` | Raw signal feed with Ambient Copilot suggestions || Cases | `/cases` | Unified case management |-| Alerts | `/alerts` | Raw signal feed with ML risk scores |-| Detections | `/detections` | Sigma/YARA/KQL rule catalog |-| Playbooks | `/playbooks` | Drag-and-drop automation builder |+| Case workspace | `/cases/<id>` | Evidence timeline + **Investigation Ledger** + attack graph |+| Detections | `/detections` | Sigma/YARA/KQL rule catalog (200+ rules) |+| Playbooks | `/playbooks` | SOAR automation builder (50+ packs) || UEBA | `/ueba` | User behavior anomaly timeline || Honeytokens | `/honeytokens` | Deceptive token lifecycle || Purple Team | `/purple-team` | ATT&CK coverage · emulation runs · tabletop |-| Marketplace | `/marketplace` | Community plugins, rules, playbooks |-| Compliance | `/compliance` | SOC 2, ISO 27001, NIST CSF dashboards |-| Audit Log | `/audit` | Immutable activity ledger |+| Marketplace | `/marketplace` | 15 plugins + 50+ playbooks + 200+ detections |+| Benchmark | `/benchmark` | Public eval harness — alert reduction + substrate self-consistency gates |+| Compliance | `/compliance` | SOC 2, ISO 27001, NIST CSF, PCI-DSS, HIPAA, DORA |+| Audit Log | `/audit` | Immutable, tenant-scoped activity ledger |+| Responder PWA | `/responder` | Mobile passkey-only console for on-call analysts |## Next Steps- [Architecture deep-dive](./architecture)+- [Concepts: Cases & Investigation Ledger](./concepts/cases)- [Write your first detection rule](./concepts/detections)- [Build a playbook](./concepts/playbooks)- [Install a community plugin](./plugins/overview)+- [Connect your IDE via MCP](./integrations/mcp)+- [Run the public eval harness](./benchmark)- [Deploy to Kubernetes](./deployment/kubernetes)diff --git a/apps/docs/src/pages/index.tsx b/apps/docs/src/pages/index.tsxindex 5376e09c8..f58f471e4 100644--- a/apps/docs/src/pages/index.tsx+++ b/apps/docs/src/pages/index.tsx@@ -20,7 +20,7 @@ function HomepageHeader() {</Link><LinkclassName="button button--outline button--secondary button--lg"- href="https://github.com/beenuar/aisoc">+ href="https://github.com/beenuar/AiSOC">GitHub</Link></div>@@ -30,10 +30,11 @@ function HomepageHeader() {}// Top three features lead with the structural moat: auditable agent decisions,-// the public benchmark that proves them, and the MIT/self-host posture that-// makes both meaningful in regulated environments. The remaining capability-// list follows so visitors see we ship the substrate too — but the headline-// reason to pick AiSOC over a closed-source competitor sits in rows 1–3.+// the public eval harness that gates the substrate underneath them, and the+// MIT/self-host posture that makes both meaningful in regulated environments.+// The remaining capability list follows so visitors see we ship the substrate+// too — but the headline reason to pick AiSOC over a closed-source competitor+// sits in rows 1–3.const FEATURES = [{title: '🔎 Auditable agent decisions',@@ -41,9 +42,9 @@ const FEATURES = ['Every prompt, tool call, and rationale the agent emits is persisted to the investigation ledger and replayable step-by-step in the case workspace.',},{- title: '📊 Public MITRE benchmark',+ title: '📊 Public eval harness',description:- '200-incident eval suite covering MITRE ATT&CK accuracy, alert reduction, investigation completeness, and response quality. Numbers are CI-gated and reproducible on your laptop.',+ '200-incident, CI-gated regression harness over the AiSOC substrate (extractors, fusion, templates, judges). Reproducible on your laptop in seconds. We are upfront about what each metric measures — and what it doesn\u2019t.',},{title: '🆓 MIT-licensed, self-hostable',@@ -150,7 +151,7 @@ const COMPARE_ROWS: ReadonlyArray<{ feature: string; cells: CompareCell[] }> = [],},{- feature: 'Detection accuracy is publicly benchmarked',+ feature: 'Substrate has a public regression-gate harness',cells: [{ kind: 'yes', label: '200-case suite, CI-gated' },{ kind: 'no', label: 'Not published' },@@ -268,14 +269,14 @@ export default function Home(): React.JSX.Element {return (<Layouttitle={siteConfig.title}- description="The auditable AI SOC — every agent decision logged, replayable, and benchmarked publicly. MIT-licensed, self-hostable, with built-in UEBA, honeytokens, purple-team emulation, and SOC 2 / ISO 27001 / NIST CSF compliance.">+ description="The auditable AI SOC — every agent decision logged, replayable, and gated by a public, reproducible eval harness. MIT-licensed, self-hostable, with built-in UEBA, honeytokens, purple-team emulation, and SOC 2 / ISO 27001 / NIST CSF compliance."><HomepageHeader /><main><ComparisonTable /><div className="container margin-vert--xl"><h2 className={styles.sectionTitle}>What you get out of the box</h2><p className={styles.sectionLede}>- The trust trio leads — auditable agent, public benchmark, MIT+ The trust trio leads — auditable agent, public eval harness, MITlicense — backed by the full SOC substrate underneath.</p><div className="row">diff --git a/apps/web/src/app/benchmark/page.tsx b/apps/web/src/app/benchmark/page.tsxindex ff124fe8e..0bf599d6f 100644--- a/apps/web/src/app/benchmark/page.tsx+++ b/apps/web/src/app/benchmark/page.tsx@@ -6,19 +6,19 @@ import { BenchmarkResults } from '@/components/benchmark/BenchmarkResults';import { ComparisonTable } from '@/components/benchmark/ComparisonTable';export const metadata: Metadata = {- title: 'Public Benchmark — AiSOC',+ title: 'Public Eval Harness — AiSOC',description:- "AiSOC's open, reproducible Pillar-1 evaluation suite. 200 deterministic incidents, four eval gates, every number measurable on your laptop in seconds.",+ "AiSOC's open, reproducible regression harness. 200 deterministic synthetic incidents, four CI gates over the substrate (extractors, fusion, templates, judges). Honest about what it measures — and what it doesn't.",alternates: { canonical: '/benchmark' },openGraph: {- title: 'AiSOC Public Benchmark',+ title: 'AiSOC Public Eval Harness',description:- 'The only AI SOC where the agent accuracy is published, reproducible, and auditable. 200-incident benchmark, four CI-gated suites, all numbers in the open.',+ 'A regression-gate harness over the AiSOC substrate. Open dataset, open harness, CI-enforced. This is not an LLM-agent leaderboard, and we say so on the page.',type: 'article',},};-const REPRODUCE_SNIPPET = `git clone https://github.com/cyble-inc/AiSOC && cd AiSOC+const REPRODUCE_SNIPPET = `git clone https://github.com/beenuar/AiSOC && cd AiSOCpython3 scripts/run_evals.py`;const EXPECTED_OUTPUT = `============================================================================@@ -46,19 +46,30 @@ export default function BenchmarkPage() {<span className="text-xs text-gray-500">Updated on every commit to main</span></div><h1 className="text-4xl font-bold tracking-tight md:text-5xl">- Public benchmark+ Public eval harness</h1><p className="mt-4 max-w-3xl text-lg text-gray-400">- The only AI SOC where the agent's accuracy is{' '}- <span className="text-white">published, reproducible, and auditable</span>.- Closed-source vendors publish marketing claims. AiSOC publishes the- benchmark, the dataset, the harness, and the CI gate. You can reproduce- every number on this page in under 10 seconds on a laptop.+ An <span className="text-white">open, deterministic regression harness</span>{' '}+ over the AiSOC substrate — the keyword extractors, the fusion+ pipeline, the report and response templates, and the offline judges+ that grade them. The dataset, the harness, and the CI gate are all+ in the repo. You can reproduce every number on this page in under+ 10 seconds on a laptop.</p>+ <div className="mt-5 max-w-3xl rounded-lg border border-amber-500/20 bg-amber-500/[0.04] p-4 text-sm text-amber-100/80">+ <strong className="text-amber-200">Read this first:</strong>{' '}+ this harness does <em>not</em> exercise the live LLM agent. It runs+ deterministic substrate code against synthetic data so we can gate+ every commit in milliseconds. Three of the four metrics measure+ <em> internal consistency </em> of that substrate, not agent+ accuracy. We explain exactly what each suite measures — and+ doesn't — below.+ </div>+<div className="mt-8 flex flex-wrap gap-3"><a- href="https://github.com/cyble-inc/AiSOC/blob/main/services/agents/tests/eval_data/synthetic_incidents.json"+ href="https://github.com/beenuar/AiSOC/blob/main/services/agents/tests/eval_data/synthetic_incidents.json"target="_blank"rel="noreferrer"className="inline-flex items-center gap-2 rounded-md border border-white/10 bg-white/[0.03] px-4 py-2 text-sm font-medium text-gray-300 transition hover:border-white/20 hover:bg-white/[0.06] hover:text-white"@@ -74,7 +85,7 @@ export default function BenchmarkPage() {</svg></a><a- href="https://github.com/cyble-inc/AiSOC/tree/main/services/agents/tests"+ href="https://github.com/beenuar/AiSOC/tree/main/services/agents/tests"target="_blank"rel="noreferrer"className="inline-flex items-center gap-2 rounded-md border border-white/10 bg-white/[0.03] px-4 py-2 text-sm font-medium text-gray-300 transition hover:border-white/20 hover:bg-white/[0.06] hover:text-white"@@ -90,7 +101,7 @@ export default function BenchmarkPage() {</svg></a><a- href="https://github.com/cyble-inc/AiSOC/actions/workflows/ci.yml"+ href="https://github.com/beenuar/AiSOC/actions/workflows/ci.yml"target="_blank"rel="noreferrer"className="inline-flex items-center gap-2 rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white shadow-glow-sm transition hover:bg-brand-400"@@ -113,9 +124,11 @@ export default function BenchmarkPage() {<div className="mx-auto max-w-5xl"><h2 className="text-2xl font-semibold tracking-tight">Latest results</h2><p className="mt-2 max-w-3xl text-sm text-gray-400">- Four metrics, four CI gates. Every gate is a hard fail in CI — a- regression blocks the build. The numbers below are pulled from the- most recent successful run on <code className="text-gray-300">main</code>.+ Four metrics, four CI gates. Every gate is a hard fail in CI — a+ regression blocks the build. The numbers below come from the most+ recent successful run on <code className="text-gray-300">main</code>.+ Click a card for what the metric actually measures and what it does+ <em> not</em>.</p><div className="mt-8"><BenchmarkResults />@@ -123,13 +136,124 @@ export default function BenchmarkPage() {</div></section>+ <section className="px-6 pb-20">+ <div className="mx-auto max-w-4xl">+ <h2 className="text-2xl font-semibold tracking-tight">+ What each suite actually measures+ </h2>+ <p className="mt-2 max-w-3xl text-sm text-gray-400">+ We took a hard look at the harness and tightened the language so+ the marketing matches the code. Here's the honest breakdown:+ </p>+ <div className="mt-6 space-y-4 text-sm">+ <div className="rounded-lg border border-emerald-500/20 bg-emerald-500/[0.03] p-5">+ <div className="flex flex-wrap items-center gap-2">+ <h3 className="text-base font-semibold text-white">+ Alert reduction (75.3%)+ </h3>+ <span className="rounded-full border border-emerald-500/30 bg-emerald-500/10 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider text-emerald-200">+ Real measurement+ </span>+ </div>+ <p className="mt-2 text-gray-300">+ A 1,000-alert noisy stream with duplicates, near-duplicates,+ rule-storms, and benign chatter is fabricated deterministically,+ then passed through the actual fusion pipeline (Tier 1 / 2 / 3+ merge windows, score floor). The reduction ratio is whatever+ the real code emits. This is a legitimate measurement of the+ fusion logic, and a fusion regression will move the number.+ </p>+ </div>++ <div className="rounded-lg border border-amber-500/20 bg-amber-500/[0.03] p-5">+ <div className="flex flex-wrap items-center gap-2">+ <h3 className="text-base font-semibold text-white">+ MITRE tactic accuracy (97.0%)+ </h3>+ <span className="rounded-full border border-amber-500/30 bg-amber-500/10 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider text-amber-200">+ Substrate self-consistency+ </span>+ </div>+ <p className="mt-2 text-gray-300">+ Each synthetic incident is generated with a tactic label, and+ its description is written to include keywords that the+ hand-curated extractor recognizes. The 97% is therefore largely+ a check that the dataset and the extractor agree with each+ other — not the accuracy of the LLM agent. It is+ <em> still useful </em>: a regression in the extractor (a+ misnamed tactic, a typo in the keyword table, a lost tactic)+ will cause the gate to fail. Treat it as a regression sentinel+ for the substrate, not a leaderboard score.+ </p>+ </div>++ <div className="rounded-lg border border-amber-500/20 bg-amber-500/[0.03] p-5">+ <div className="flex flex-wrap items-center gap-2">+ <h3 className="text-base font-semibold text-white">+ Investigation completeness (94.3%)+ </h3>+ <span className="rounded-full border border-amber-500/30 bg-amber-500/10 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider text-amber-200">+ Substrate self-consistency+ </span>+ </div>+ <p className="mt-2 text-gray-300">+ The simulator wraps the incident description in a Markdown+ report, and the judge looks for evidence keywords inside it.+ Because those evidence keywords are drawn from the description,+ the score is close to a string-copy tautology — it+ confirms the report template includes the description, and the+ judge can find keywords in it. It catches drops in the report+ template (e.g. someone omits the Summary section) but does not+ grade an actual LLM-written investigation.+ </p>+ </div>++ <div className="rounded-lg border border-amber-500/20 bg-amber-500/[0.03] p-5">+ <div className="flex flex-wrap items-center gap-2">+ <h3 className="text-base font-semibold text-white">+ Response-plan quality (1.000)+ </h3>+ <span className="rounded-full border border-amber-500/30 bg-amber-500/10 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider text-amber-200">+ Substrate self-consistency+ </span>+ </div>+ <p className="mt-2 text-gray-300">+ The synthesizer embeds the expected MITRE techniques and the+ first evidence keyword directly into the templated plan, then+ the rubric judge checks for them. By construction the score is+ ~1.000. This catches a broken templating pipeline (e.g. the+ synthesizer stops emitting the action class) but is not a+ grade of LLM output. We're calling it out so that+ “1.000” is read correctly: it's green, not+ impressive.+ </p>+ </div>+ </div>+ <p className="mt-6 max-w-3xl text-sm text-gray-500">+ The next harness milestone is <strong className="text-gray-300">+ online evals</strong>: nightly runs that drive the real LangGraph+ agent against the same dataset, with an LLM-as-judge gated by+ <code className="text-gray-300"> OPENAI_API_KEY</code>. That's+ where actual agent accuracy gets measured. Tracking issue:{' '}+ <a+ className="underline decoration-dotted hover:text-gray-300"+ href="https://github.com/beenuar/AiSOC/issues"+ target="_blank"+ rel="noreferrer"+ >+ github.com/beenuar/AiSOC/issues+ </a>.+ </p>+ </div>+ </section>+<section className="px-6 pb-20"><div className="mx-auto max-w-4xl rounded-2xl border border-white/10 bg-white/[0.02] p-8"><h2 className="text-2xl font-semibold tracking-tight">Reproduce these numbers</h2><p className="mt-2 text-sm text-gray-400">- No Docker, no API key, no GPU, no LLM call. The benchmark harness is+ No Docker, no API key, no GPU, no LLM call. The harness isdeterministic and runs in roughly 25 ms.</p><pre className="mt-5 overflow-x-auto rounded-lg border border-white/5 bg-black/40 p-4 text-sm leading-relaxed text-gray-200">@@ -153,8 +277,9 @@ export default function BenchmarkPage() {Honest comparison vs vendors</h2><p className="mt-2 max-w-3xl text-sm text-gray-400">- We measure what we ship. Where a vendor publishes a number, we cite- it. Where a vendor doesn't, we mark it absent. No marketing math.+ We measure what we ship and label it for what it is. Where a+ vendor publishes a number, we cite it. Where a vendor doesn't,+ we mark it absent. No marketing math.</p><div className="mt-6"><ComparisonTable />@@ -162,8 +287,10 @@ export default function BenchmarkPage() {<p className="mt-6 max-w-3xl text-sm text-gray-500"><strong className="text-gray-300">Why this matters: </strong>a regulated bank cannot deploy a vendor whose agent is a black-box- cloud service. They can deploy AiSOC. Their auditor reviews the same- dataset, the same harness, and the same CI numbers we publish here.+ cloud service. They can deploy AiSOC. Their auditor reviews the+ same dataset, the same harness, and the same CI numbers we publish+ here — including this candid breakdown of which suites+ measure substrate health vs agent quality.</p></div></section>@@ -172,27 +299,39 @@ export default function BenchmarkPage() {<div className="mx-auto max-w-4xl"><h2 className="text-2xl font-semibold tracking-tight">What this is not</h2><p className="mt-2 text-sm text-gray-400">- We're allergic to overclaiming. A few honest caveats up front:+ We're allergic to overclaiming. A few honest caveats up front:</p><ul className="mt-5 space-y-3 text-sm text-gray-400"><li className="rounded-lg border border-white/5 bg-white/[0.02] p-4">- <strong className="text-gray-200">The harness is offline.</strong>{' '}- It uses deterministic extractors and templated synthesis — not the- live LLM pipeline. We do this so the gate is fast and cheap enough- to run on every commit. A nightly online eval (LLM-as-judge,- full agent orchestrator) is on the Phase-1 roadmap.+ <strong className="text-gray-200">No LLM agent runs here.</strong>{' '}+ The harness exercises deterministic substrate code —+ extractors, fusion, templates, keyword judges. The live LangGraph+ orchestrator (<code className="text-gray-300">services/agents/app/investigator/</code>)+ is not invoked. An online eval that does invoke it nightly is on+ the Phase-1 roadmap.</li><li className="rounded-lg border border-white/5 bg-white/[0.02] p-4"><strong className="text-gray-200">The dataset is synthetic.</strong>{' '}- 200 incidents flag major regressions but don't claim production- parity. Real customer benchmarks will be opt-in and federated.+ 200 incidents flag substrate regressions but don't claim+ production parity. Real customer benchmarks will be opt-in and+ federated.+ </li>+ <li className="rounded-lg border border-white/5 bg-white/[0.02] p-4">+ <strong className="text-gray-200">The judges are keyword-based.</strong>{' '}+ They can be gamed by template-stuffing. In several suites the+ templates already include the keywords the judge looks for, so+ those suites mostly verify the templates haven't broken+ — not that an agent answered well. The full LLM-as-judge+ variant is the follow-up.</li><li className="rounded-lg border border-white/5 bg-white/[0.02] p-4">- <strong className="text-gray-200">The judge is keyword-based.</strong>{' '}- It can be gamed by template-stuffing. The full LLM-as-judge variant- is a follow-up. The keyword judge nonetheless catches the most- common failure modes (omitted evidence, mis-aligned containment- action, severity drift).+ <strong className="text-gray-200">+ “Public benchmark” means the harness, not a+ third-party leaderboard.+ </strong>{' '}+ No outside body grades AiSOC. The value is that the dataset, the+ code, and the gates are all open and CI-enforced — you can+ run, audit, and break the harness yourself.</li></ul></div>@@ -201,16 +340,17 @@ export default function BenchmarkPage() {<section className="px-6 pb-24"><div className="mx-auto max-w-4xl rounded-2xl border border-brand-500/20 bg-gradient-to-br from-brand-500/10 to-transparent p-8 text-center"><h2 className="text-2xl font-semibold tracking-tight">- Help us move the numbers+ Help us harden the harness</h2><p className="mx-auto mt-3 max-w-2xl text-sm text-gray-400">- Find a tactic the extractor misses, a fusion miss, or a rubric weakness?- File a PR with a fixture and the gate will lock the regression in for- everyone forever.+ Spot a tactic the extractor misses, a fusion miss, a tautological+ judge, or a rubric weakness? File a PR with a fixture and the+ gate will lock the regression in for everyone forever — or+ help us land the online LLM-as-judge variant.</p><div className="mt-6 flex flex-wrap justify-center gap-3"><a- href="https://github.com/cyble-inc/AiSOC/blob/main/CONTRIBUTING.md"+ href="https://github.com/beenuar/AiSOC/blob/main/CONTRIBUTING.md"target="_blank"rel="noreferrer"className="inline-flex items-center gap-2 rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white shadow-glow-sm transition hover:bg-brand-400"diff --git a/apps/web/src/app/why-open-source/page.tsx b/apps/web/src/app/why-open-source/page.tsxindex e999df9f9..b89dcdbd4 100644--- a/apps/web/src/app/why-open-source/page.tsx+++ b/apps/web/src/app/why-open-source/page.tsx@@ -23,9 +23,9 @@ const PILLARS = [body: 'Every prompt, every tool call, every evidence citation, every decision the agent makes is written to a durable, queryable, replayable ledger. Not summarised. Not redacted. The literal LLM I/O.',},{- label: 'Public benchmark',+ label: 'Public eval harness',href: '/benchmark',- body: 'A 200-incident MITRE suite runs on every commit. Four CI gates. The harness, the dataset, the rubric, and the historical results are all in the repo. Reproduce them on your laptop.',+ body: 'A 200-case substrate eval suite runs on every commit. Four CI gates: one real measurement (alert reduction) and three substrate self-consistency checks (MITRE tactic, completeness, response quality). The harness, the dataset, the rubric, and the historical results are all in the repo. Reproduce them on your laptop — and read the page for what each metric does and does not measure.',},{label: 'MIT, end-to-end',@@ -40,8 +40,8 @@ const ARTEFACTS = [body: "Hand your auditor a JSON file. They read every step the agent took, every prompt issued, every model used, every token spent, every evidence row cited, every action executed, in order, with hashes. They don't have to trust us. They read the events.",},{- title: 'A reproducible accuracy number',- body: 'Your auditor clones the repo and runs `python3 scripts/run_evals.py`. They get the same MITRE accuracy, alert reduction ratio, completeness coverage, and response-quality score we publish. The CI gate is the source of truth, not the marketing site.',+ title: 'A reproducible eval harness',+ body: 'Your auditor clones the repo and runs `python3 scripts/run_evals.py`. They get the same alert-reduction ratio, MITRE-tactic gate, completeness coverage, and response-quality score we publish. The CI gate is the source of truth, not the marketing site. We document explicitly which metrics measure substrate behaviour and which would still need an online LLM-as-judge to call "agent accuracy".',},{title: 'Source code for the agent itself',@@ -61,7 +61,7 @@ const CONTRASTS: readonly Contrast[] = [points: ['Agent runs in vendor cloud. Your incident data leaves your network for inference.','Prompts and policy are proprietary. You cannot audit how the agent reasons or what it tells the model about your case.',- 'Accuracy claims are marketing. No reproducible harness, no public CI gate, no historical regression record.',+ 'Accuracy claims are marketing. No reproducible eval harness, no public CI gate, no historical regression record.','No fork right. If the vendor changes the model, the policy, or the price, you have one option: comply.',],},@@ -70,7 +70,7 @@ const CONTRASTS: readonly Contrast[] = [points: ['The dashboard is open. The agent is not. The thing you actually need to audit is in a private repo.','License is SSPL or BSL with a CLA. You "own" your fork until the next licence flip.',- 'The benchmark is internal. You see the score. You cannot see the dataset or rerun the harness.',+ 'The eval harness is internal. You see the score. You cannot see the dataset or rerun the harness.','Self-hosting is technically allowed and operationally hostile.',],},@@ -79,7 +79,7 @@ const CONTRASTS: readonly Contrast[] = [points: ['Agent runs on your infrastructure. Your incident data, by default, never leaves your network.','Every prompt, response, tool call, and decision is in the Investigation Ledger and replayable forever.',- 'Accuracy is a CI gate. The dataset, the harness, the rubric, and the latest numbers are all public and reproducible in seconds.',+ 'Substrate behaviour is gated in CI on every commit. The dataset, the harness, the rubric, and the latest numbers are public and reproducible in seconds — and we are upfront about which metrics measure the substrate vs. the agent.','MIT, no CLA. Fork it, patch the prompts, ship it. We do not have the legal right to take that away.',],accent: true,@@ -313,7 +313,7 @@ export default function WhyOpenSourcePage() {</li><li className="rounded-lg border border-white/5 bg-white/[0.02] p-4"><strong className="text-gray-200">No telemetry.</strong>{' '}- Self-hosted deployments emit no analytics back to Cyble.+ Self-hosted deployments emit no analytics back to the project.Detection tuning, agent decisions, and operator behaviour stayon your boxes. The only network calls AiSOC initiates are theones you configured: your LLM provider, your TI feed, your@@ -383,12 +383,19 @@ export default function WhyOpenSourcePage() {<ul className="space-y-3"><li className="rounded-lg border border-white/5 bg-white/[0.02] p-4"><strong className="text-gray-200">- We do not claim better accuracy than every vendor.+ We do not claim better agent accuracy than every vendor.</strong>{' '}- We claim measurable accuracy. Anyone who reads the benchmark- page can see exactly where we are. The gap between “we- measure ours; they don’t publish theirs” is the- part that matters to a regulated buyer.+ We claim a public, reproducible eval harness over the+ substrate. Anyone who reads the{' '}+ <Link href="/benchmark" className="text-brand-300 underline">+ eval harness page+ </Link>{' '}+ can see exactly which metrics measure real behaviour+ (alert reduction) and which are substrate self-consistency+ gates (MITRE tactic, completeness, response quality). The+ gap between “we publish a harness you can rerun; they+ don’t” is the part that matters to a regulated+ buyer.</li><li className="rounded-lg border border-white/5 bg-white/[0.02] p-4"><strong className="text-gray-200">@@ -421,9 +428,9 @@ export default function WhyOpenSourcePage() {</h2><p className="mx-auto mt-3 max-w-2xl text-sm text-gray-400">Three artefacts, all reproducible in under a minute: a live- investigation with the full ledger open, the public benchmark on- your laptop, and the agent source on GitHub. None of them- require a signup.+ investigation with the full ledger open, the public eval+ harness on your laptop, and the agent source on GitHub. None+ of them require a signup.</p><div className="mt-6 flex flex-wrap justify-center gap-3"><a@@ -446,7 +453,7 @@ export default function WhyOpenSourcePage() {href="/benchmark"className="inline-flex items-center gap-2 rounded-md border border-white/10 bg-white/[0.03] px-4 py-2 text-sm font-medium text-gray-300 transition hover:border-white/20 hover:bg-white/[0.06] hover:text-white">- Read the benchmark+ Read the eval harness</Link><ahref="https://github.com/beenuar/AiSOC"diff --git a/apps/web/src/components/benchmark/BenchmarkResults.tsx b/apps/web/src/components/benchmark/BenchmarkResults.tsxindex e29a2d743..ba5f10585 100644--- a/apps/web/src/components/benchmark/BenchmarkResults.tsx+++ b/apps/web/src/components/benchmark/BenchmarkResults.tsx@@ -1,5 +1,7 @@import clsx from 'clsx';+type Kind = 'measurement' | 'self-consistency';+interface SuiteRow {id: string;name: string;@@ -8,36 +10,29 @@ interface SuiteRow {display: string;target: number;targetDisplay: string;+ /** What this number represents in plain English. */blurb: string;+ /**+ * Whether this suite measures real behavior (e.g. fusion logic) or merely+ * the internal consistency of the substrate (template + judge agree on+ * each other). The card uses this to label the gate honestly.+ */+ kind: Kind;/** corpus / sub-metrics surfaced beneath the headline number */details: { label: string; value: string }[];}/*** Snapshot of the latest run on `main`. Keep these aligned with- * `eval_report.json` produced by `scripts/run_evals.py`. The doc note on the- * page explains that the live page in the wild can be wired to the- * `eval-results` branch later; for v0 of the public benchmark page we hardcode- * the most-recent passing snapshot so visitors see real numbers without a- * round-trip.+ * `eval_report.json` produced by `scripts/run_evals.py`.+ *+ * The blurbs deliberately avoid "agent accuracy" framing. The harness is+ * deterministic substrate code (no LLM calls), and three of the four metrics+ * mostly verify that the substrate is internally consistent (template + judge+ * agree on each other). We label that explicitly rather than letting a casual+ * reader assume the LangGraph agent is being graded.*/const SUITES: SuiteRow[] = [- {- id: 'mitre_accuracy',- name: 'MITRE accuracy',- metric: 'Tactic accuracy',- value: 0.97,- display: '97.0%',- target: 0.8,- targetDisplay: '≥80%',- blurb:- 'Per-incident accuracy of inferred MITRE ATT&CK tactic across 200 deterministic synthetic incidents covering all 14 tactics and the top 50 techniques.',- details: [- { label: 'Incidents', value: '200' },- { label: 'Correct', value: '194' },- { label: 'Macro F1', value: '0.78' },- ],- },{id: 'alert_reduction',name: 'Alert reduction',@@ -46,14 +41,32 @@ const SUITES: SuiteRow[] = [display: '75.3%',target: 0.7,targetDisplay: '≥70%',+ kind: 'measurement',blurb:- 'Three-tier fusion (signature + entity-window + storm-collapse) applied to 1,000 noisy alerts. Honest measurement; no marketing math.',+ "A 1,000-alert noisy stream (duplicates, near-duplicates, rule storms, low-score chatter) is fed into the real fusion pipeline (Tier 1 / 2 / 3). The number is whatever the code produces — a fusion regression will move it.",details: [{ label: 'Alerts in', value: '1,000' },{ label: 'Incidents out', value: '247' },{ label: 'Storms', value: '16' },],},+ {+ id: 'mitre_accuracy',+ name: 'MITRE tactic accuracy',+ metric: 'Tactic accuracy',+ value: 0.97,+ display: '97.0%',+ target: 0.8,+ targetDisplay: '≥80%',+ kind: 'self-consistency',+ blurb:+ 'Each synthetic incident is generated with a labeled tactic and a description written to include keywords the hand-curated extractor recognizes. The 97% mostly checks that dataset and extractor agree — useful as a regression sentinel for the extractor, not a measure of LLM agent accuracy.',+ details: [+ { label: 'Incidents', value: '200' },+ { label: 'Correct', value: '194' },+ { label: 'Macro F1', value: '0.78' },+ ],+ },{id: 'investigation_completeness',name: 'Investigation completeness',@@ -62,38 +75,53 @@ const SUITES: SuiteRow[] = [display: '94.3%',target: 0.85,targetDisplay: '≥85%',+ kind: 'self-consistency',blurb:- 'Fraction of expected evidence keywords (entities, IOCs, MITRE tags, severity cues) that appear in the agent\'s narrative report per incident.',+ "The simulator wraps each incident's description in a Markdown report; the judge then looks for evidence keywords drawn from that same description. Close to a string-copy tautology — it confirms the report template includes the description and the judge can find keywords inside it. Catches template breakage, not LLM quality.",details: [{ label: 'Incidents', value: '200' },{ label: 'Fully covered', value: '134 (67%)' },- { label: 'Method', value: 'Deterministic extractor' },+ { label: 'Judge', value: 'Offline keyword' },],},{id: 'response_quality',- name: 'Response quality',+ name: 'Response-plan quality',metric: 'Mean rubric score',value: 1.0,display: '100%',target: 0.8,targetDisplay: '≥80%',+ kind: 'self-consistency',blurb:- "Five-criterion rubric (action aligned, severity-aware, MITRE-aligned, evidence-grounded, actionable) scored offline so the gate doesn't depend on a paid LLM.",+ "The synthesizer embeds the expected MITRE techniques and first evidence keyword directly into the templated plan, then a 5-criterion rubric checks for them. By construction the score is ~1.000. Catches a broken templating pipeline; it is not a grade of LLM-written plans.",details: [{ label: 'Incidents', value: '200' },- { label: 'Criteria', value: '5 of 5 perfect' },+ { label: 'Criteria', value: '5 (all hit by template)' },{ label: 'Judge', value: 'Offline keyword' },],},];+const KIND_LABEL: Record<Kind, { label: string; classes: string }> = {+ measurement: {+ label: 'Real measurement',+ classes:+ 'border-emerald-500/30 bg-emerald-500/10 text-emerald-200',+ },+ 'self-consistency': {+ label: 'Substrate self-consistency',+ classes: 'border-amber-500/30 bg-amber-500/10 text-amber-200',+ },+};+export function BenchmarkResults() {return (<div className="grid gap-4 md:grid-cols-2">{SUITES.map((suite) => {const passed = suite.value >= suite.target;const headroom = ((suite.value - suite.target) * 100).toFixed(1);+ const kind = KIND_LABEL[suite.kind];return (<divkey={suite.id}@@ -138,7 +166,16 @@ export function BenchmarkResults() {{passed ? `+${headroom} pts above gate` : `${headroom} pts below gate`}</div>- <p className="mt-4 text-sm leading-relaxed text-gray-400">+ <span+ className={clsx(+ 'mt-4 inline-flex items-center rounded-full border px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider',+ kind.classes,+ )}+ >+ {kind.label}+ </span>++ <p className="mt-3 text-sm leading-relaxed text-gray-400">{suite.blurb}</p>diff --git a/apps/web/src/components/benchmark/ComparisonTable.tsx b/apps/web/src/components/benchmark/ComparisonTable.tsxindex b4583580a..b11c8b352 100644--- a/apps/web/src/components/benchmark/ComparisonTable.tsx+++ b/apps/web/src/components/benchmark/ComparisonTable.tsx@@ -10,12 +10,22 @@ interface Vendor {reproducible: string;}+/**+ * The AiSOC row uses qualifiers that match what the harness actually does:+ * - Alert reduction is a *real* measurement against a fixed noisy stream, so+ * we tag it "measured".+ * - MITRE "accuracy" is a substrate self-consistency check (extractor vs.+ * dataset that's written to feed it), so we tag it "regression gate" rather+ * than implying it is a leaderboard score for an LLM agent.+ * - "Reproducible harness" replaces "reproducible benchmark" to avoid sounding+ * like a third-party leaderboard.+ */const VENDORS: Vendor[] = [{name: 'AiSOC',type: 'open',- reduction: '75.3% (measured)',- mitre: '97% (measured)',+ reduction: '75.3% (measured on fixed noisy stream)',+ mitre: '97% (substrate regression gate)',audit: 'Per-step ledger',selfHost: 'Yes (MIT)',reproducible: 'Yes — every commit',@@ -54,16 +64,16 @@ const VENDORS: Vendor[] = [mitre: 'Not applicable',audit: 'Run history',selfHost: 'On-prem option',- reproducible: 'No published bench',+ reproducible: 'No published harness',},];const COLUMNS = [{ key: 'reduction', label: 'Alert reduction' },- { key: 'mitre', label: 'MITRE accuracy' },+ { key: 'mitre', label: 'MITRE accuracy gate' },{ key: 'audit', label: 'Decision audit' },{ key: 'selfHost', label: 'Self-host' },- { key: 'reproducible', label: 'Reproducible benchmark' },+ { key: 'reproducible', label: 'Reproducible harness' },] as const;export function ComparisonTable() {diff --git a/apps/web/src/components/landing/Hero.tsx b/apps/web/src/components/landing/Hero.tsxindex 45c615d7b..f25876912 100644--- a/apps/web/src/components/landing/Hero.tsx+++ b/apps/web/src/components/landing/Hero.tsx@@ -33,7 +33,7 @@ export function Hero() {<span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-75" /><span className="relative inline-flex h-2 w-2 rounded-full bg-emerald-400" /></span>- Open-source · MIT · by Cyble+ Open-source · MIT · community-built</span><h1 className="mt-6 text-balance text-5xl font-bold leading-[1.05] tracking-tight text-white md:text-6xl lg:text-7xl">@@ -46,8 +46,9 @@ export function Hero() {<p className="mt-6 max-w-xl text-lg leading-relaxed text-gray-300 md:text-xl">Every agent decision is logged step-by-step, queryable, and replayable.- Benchmarked publicly on a 200-incident MITRE suite. MIT-licensed and- self-hostable — your data never leaves your infrastructure.+ Substrate gated by a public, reproducible 200-case eval harness on every+ commit. MIT-licensed and self-hostable — your data never leaves your+ infrastructure.</p><div className="mt-8 flex flex-wrap items-center gap-3">@@ -87,11 +88,11 @@ export function Hero() {</p>{/* Quick facts row — anchors the three pillars (auditable agent, public- benchmark, MIT) so the moat is visible above the fold without+ eval harness, MIT) so the moat is visible above the fold withoutthe visitor needing to scroll into the comparison strip. */}<dl className="mt-10 grid grid-cols-3 gap-6 border-t border-white/5 pt-8"><Stat label="Agent decisions" value="100%" caption="logged + replayable" />- <Stat label="MITRE eval" value="200 cases" caption="public, CI-gated" />+ <Stat label="Eval harness" value="200 cases" caption="public, CI-gated" /><Stat label="License" value="MIT" caption="audit, fork, self-host" /></dl></motion.div>diff --git a/docs/runbooks/HARDENING.md b/docs/runbooks/HARDENING.mdnew file mode 100644index 000000000..4465e7189--- /dev/null+++ b/docs/runbooks/HARDENING.md@@ -0,0 +1,81 @@+# Production Hardening Runbook++This runbook is the operator's checklist for taking an AiSOC deployment from "it boots" to "I would put real customer telemetry through it." It assumes you are running the platform from official images on Kubernetes via the Helm chart in [`infra/helm/aisoc/`](../../infra/helm/aisoc/), or via the production Compose profile.++If you only need a quick local demo, use [`pnpm aisoc:demo`](../../README.md#quickstart) instead — that flow intentionally skips most of the controls below.++---++## 1. Identity, secrets, and keys++- [ ] Generate fresh values for every secret in `.env` / `values.yaml`. Do **not** ship the example secrets to staging or prod.+ - `SECRET_KEY` (API JWT signing) and `JWT_SECRET` (SSO/SAML/OIDC flows) — 32+ random bytes each (`openssl rand -hex 32`).+ - `HONEYTOKEN_ALERT_WEBHOOK_SECRET` — HMAC secret for honeytoken webhook callbacks.+ - `REALTIME_INTERNAL_TOKEN` — shared secret between API and realtime for internal push fan-out.+ - `VAPID_PRIVATE_KEY` / `VAPID_PUBLIC_KEY` / `VAPID_SUBJECT` — generate via `npx web-push generate-vapid-keys`.+- [ ] Store secrets in your platform's secret manager (Kubernetes `Secret` + sealed-secrets, AWS Secrets Manager, Vault, …) rather than committed YAML.+- [ ] Roll out passkeys (WebAuthn) for every human account before exposing the UI on the public internet — set `PASSKEY_RP_ID`, `PASSKEY_RP_NAME`, and `PASSKEY_RP_ORIGINS` to your real domain (no scheme, no port for `RP_ID`; full origin URLs for `RP_ORIGINS`).+- [ ] Configure SSO via [`services/api/app/auth/`](../../services/api/app/auth/) (`oidc.py` or `saml.py`) — set `OIDC_ISSUER`/`OIDC_CLIENT_ID`/`OIDC_CLIENT_SECRET` or the matching `SAML_*` variables — and disable local password sign-up once IdP-backed sign-in works end-to-end.+- [ ] Rotate JWT signing keys (`SECRET_KEY`, `JWT_SECRET`) and webhook secrets every 90 days. Plan for a brief overlap window where both old and new tokens are accepted so the rotation is non-disruptive.+- [ ] The Investigation Ledger is database-backed with Row-Level Security and an immutability trigger — there is no separate signing key to manage. Review `services/api/app/models/investigation.py` for the schema if you need to audit it.++## 2. Transport and network surface++- [ ] Terminate TLS 1.3 at the ingress (NGINX, Traefik, ALB, or your service mesh). Internal services should also speak TLS where supported.+- [ ] Restrict ingress to:+ - the web app,+ - the public API on `/api/*`,+ - the realtime websocket on `/ws/*`,+ - the MCP endpoint on `/mcp/*` (only if you actually expose it).+ Everything else (Postgres, NATS, OpenSearch, Redis, the eval harness) must stay on the cluster network.+- [ ] Apply Kubernetes `NetworkPolicy` resources from the chart so each service only reaches its required dependencies.+- [ ] Set sane CORS defaults: explicit allow-list of origins, no wildcard `*` once you have a real frontend hostname.+- [ ] Enable rate limiting middleware (see [`services/api/app/middleware/`](../../services/api/app/middleware/)) and tune the per-token / per-API-key limits to your load profile.++## 3. Data plane++- [ ] Run Postgres in a managed service (RDS, Cloud SQL, Aiven, …) with point-in-time recovery enabled.+- [ ] Confirm Row-Level Security is on for every multi-tenant table. The migration suite enforces this; do not disable it.+- [ ] Snapshot OpenSearch and the object store (R2, S3, GCS, …) at least daily. Test a restore quarterly.+- [ ] Encrypt at rest:+ - Database volumes — managed encryption is fine.+ - Object storage — bucket-level KMS keys.+ - Audit log archive — separate KMS key, immutable bucket policy.+- [ ] Pin a retention policy per data class (alerts, cases, audit, ledger) and document who can lower it.++## 4. Container and supply chain++- [ ] Pull only signed images from `ghcr.io/beenuar/aisoc-*` and verify Cosign signatures in your admission controller.+- [ ] Keep `securityContext.runAsNonRoot: true` and `readOnlyRootFilesystem: true` for every workload — these are the chart defaults; do not override unless you genuinely need to.+- [ ] Run images with a read-only root filesystem and the minimum capability set (`drop: ["ALL"]`).+- [ ] Enable `PodSecurityAdmission` in `restricted` mode on the namespace AiSOC runs in.+- [ ] Subscribe to GitHub Security Advisories for [`beenuar/AiSOC`](https://github.com/beenuar/AiSOC/security/advisories) and patch within the SLA window in [`SECURITY.md`](../../SECURITY.md).++## 5. Observability and audit++- [ ] Forward audit logs to an immutable sink (S3 Object Lock, GCS Bucket Lock, or a SIEM with WORM storage).+- [ ] Verify the Investigation Ledger periodically:+ ```bash+ curl -fsSL "$AISOC_API/api/v1/ledger/verify?case_id=$CASE_ID" \+ -H "Authorization: Bearer $TOKEN"+ ```+ Add this to a synthetic check that pages on a non-200 response.+- [ ] Wire OpenTelemetry traces from all services to your collector and keep at least 7 days of trace data for incident response.+- [ ] Send platform metrics (`/metrics`) to Prometheus or a managed equivalent. Alert on saturation, p99 latency, and 5xx rates per service.++## 6. AI and agent controls++- [ ] Set explicit allow-lists for every LLM tool the Ambient Copilot can invoke. Default to read-only.+- [ ] Require human approval for any destructive responder action (`isolate-host`, `disable-user`, `block-domain`). The Responder PWA enforces this client-side; mirror it server-side in your policy bundle.+- [ ] Run the [public eval harness](../../apps/docs/docs/benchmark.md) on a release candidate before promoting it. Block the rollout if the MITRE-tactic substrate self-consistency gate regresses by more than 2 points, or if alert reduction (the one real measurement in the harness) drops materially.+- [ ] Log every Copilot prompt + response into the audit stream with the active tenant ID and user ID.++## 7. Incident response readiness++- [ ] Document the on-call rotation, escalation contacts, and the runbook for revoking compromised tokens / API keys.+- [ ] Practice the kill-switch: scaling the API to zero, rotating `SECRET_KEY` (and `JWT_SECRET` if SSO is enabled), and re-issuing tokens — make sure the team can do all three in under 15 minutes.+- [ ] Keep an offline copy of [`SECURITY.md`](../../SECURITY.md) and this runbook so they remain accessible when the cluster is offline.++---++If something here is wrong, missing, or no longer matches reality, please open a PR. We treat hardening drift as a bug.diff --git a/services/agents/tests/test_alert_reduction.py b/services/agents/tests/test_alert_reduction.pyindex f9218e2dd..4d72aa104 100644--- a/services/agents/tests/test_alert_reduction.py+++ b/services/agents/tests/test_alert_reduction.py@@ -1,11 +1,19 @@"""-Pillar-1 Evaluation: Alert Reduction Ratio-============================================+Pillar-1 Evaluation: Alert Reduction Ratio — Real Measurement+==============================================================Anvilogic publicly claims a 90% alert-reduction figure. We measure ourshonestly, offline, against a deterministic 1000-alert noisy stream thatintentionally includes near-duplicates, host/user variations, time-windowedbursts, and benign chatter.+Unlike the other three pillar-1 suites (which are substrate self-consistency+gates over deterministic templates), this suite is a REAL MEASUREMENT: the+alert stream is generated independently from the fusion logic, so the+reduction ratio reflects how well the fusion algorithm actually collapses+noisy traffic into incidents. The number is honestly comparable to a+vendor's reduction claim *for this specific synthetic workload* — though+production traffic shape and real adversarial alerts will of course differ.+The fusion logic groups alerts by:1. Same (rule_id, host, user) within a 10-minute window → 1 incident2. Same (rule_id, host) within 30 minutes → 1 incident@@ -17,6 +25,8 @@ Then we drop any incident scored below the configured noise threshold.This is *deterministic* (the alert stream is generated from a seed) soruns are byte-stable and historical numbers are queryable.+See `apps/docs/docs/benchmark.md` for what each suite actually measures.+Run:pytest services/agents/tests/test_alert_reduction.py -v"""diff --git a/services/agents/tests/test_investigation_completeness.py b/services/agents/tests/test_investigation_completeness.pyindex b3f0f0153..3f152f4d9 100644--- a/services/agents/tests/test_investigation_completeness.py+++ b/services/agents/tests/test_investigation_completeness.py@@ -1,28 +1,33 @@"""-Pillar-1 Evaluation: Investigation Completeness-================================================-Honest, offline measurement of how well a generated investigation report-covers the evidence present in an incident description.+Pillar-1 Evaluation: Investigation Completeness — Substrate Self-Consistency Gate+==================================================================================+Offline regression gate that the deterministic substrate report writer+preserves the evidence present in an incident description.For each of the 200 synthetic incidents we have a hand-curated list of`evidence_keywords` (host names, IPs, users, file names, CVEs, malware-families, technique tells, etc.). A "complete" investigation report must-mention each piece of evidence at least once.+families, technique tells, etc.). A "complete" report must mention each+piece of evidence at least once.Because we cannot make real LLM calls in CI, we simulate a deterministic"report writer" by piping the incident description through a normalize→sentence-extract→bullet-format function that mirrors what the-`ReportWriterAgent` does when handed structured evidence. The simulated-report should cover the evidence keywords by virtue of *not dropping-anything from the source description.*+`ReportWriterAgent` does when handed structured evidence. By construction,+the simulator wraps the source description, and the source description was+generated to include the evidence keywords — so this is a SUBSTRATE+SELF-CONSISTENCY GATE that detects regressions in the report-writer or the+dataset, NOT a measurement of whether a real LLM agent actually writes a+complete report on adversarial / blind data.The metric we publish is:completeness = (mentioned evidence keywords) / (total evidence keywords)-We assert mean completeness ≥ 0.85 across 200 incidents (a real LLM agent-should exceed this; the simulator gives us a hard *lower bound* — if the-simulator falls below the floor the source data is broken).+We assert mean completeness ≥ 0.85 across 200 incidents (the simulator+gives us a hard *lower bound* — if it falls below the floor the source+data or the writer is broken).++See `apps/docs/docs/benchmark.md` for what each suite actually measures.Run:pytest services/agents/tests/test_investigation_completeness.py -vdiff --git a/services/agents/tests/test_mitre_accuracy.py b/services/agents/tests/test_mitre_accuracy.pyindex cea7b50cd..30b9e51ed 100644--- a/services/agents/tests/test_mitre_accuracy.py+++ b/services/agents/tests/test_mitre_accuracy.py@@ -1,17 +1,26 @@"""-Pillar-1 Evaluation: MITRE ATT&CK Tactic Accuracy Test-========================================================-This test validates the investigator pipeline's ability to correctly-identify MITRE ATT&CK tactics for the synthetic incident scenarios-in `eval_data/synthetic_incidents.json` (200 cases as of v6.0).+Pillar-1 Evaluation: MITRE ATT&CK Tactic — Substrate Self-Consistency Gate+==========================================================================+This test gates the substrate's tactic extractor against the synthetic+incident scenarios in `eval_data/synthetic_incidents.json` (200 cases as of+v6.0).-It runs OFFLINE (no LLM calls, no DB) by using a keyword extractor that-proxies for LLM tactic-detection. The test asserts ≥80% accuracy.+It runs OFFLINE (no LLM calls, no DB) using a keyword-based tactic+extractor over the same synthetic descriptions that were generated to+contain those keywords. As a result, the resulting accuracy / precision /+recall / F1 numbers are a SUBSTRATE SELF-CONSISTENCY GATE — they detect+regressions in the extractor or the dataset relative to each other, NOT a+real LLM-agent tactic-detection accuracy score on adversarial / blind data.++The test asserts ≥80% accuracy as a regression floor.++See `apps/docs/docs/benchmark.md` for what each suite actually measures+and how it differs from a third-party leaderboard score.Run:pytest services/agents/tests/test_mitre_accuracy.py -v- # or via the CI eval script:- python scripts/eval_mitre_accuracy.py+ # or via the public eval harness:+ python scripts/run_evals.py --count 200 --report eval_report.json"""from __future__ import annotationsdiff --git a/services/agents/tests/test_response_quality.py b/services/agents/tests/test_response_quality.pyindex 1ee6b02c2..4265f44a9 100644--- a/services/agents/tests/test_response_quality.py+++ b/services/agents/tests/test_response_quality.py@@ -1,12 +1,18 @@"""-Pillar-1 Evaluation: Response-Plan Quality-===========================================-Honest, offline rubric scoring of the response actions an investigator-agent would emit for each of the 200 synthetic incidents.+Pillar-1 Evaluation: Response-Plan Quality — Substrate Self-Consistency Gate+=============================================================================+Offline rubric scoring of the deterministic substrate response-plan+generator against each of the 200 synthetic incidents.A real production deploy would feed each (incident, response_plan) pair-to an LLM-as-judge with the same rubric below. CI cannot make LLM calls,-so we run an offline keyword-based judge that mirrors the rubric.+to an LLM-as-judge with the same rubric below, on real (or held-out+adversarial) incidents. CI cannot make LLM calls, so we run an offline+keyword-based judge that mirrors the rubric *against a templated plan+built from the same synthetic incident* — by construction the plan+references the incident's response_class, severity, MITRE labels, and+evidence keywords, so this is a SUBSTRATE SELF-CONSISTENCY GATE that+catches regressions in the templater or the dataset, NOT a measurement+of whether a real LLM agent emits a high-quality plan on blind data.Rubric (each criterion is 0-1, total /5):1. **action_aligned_with_class** - the recommended action matches the@@ -23,7 +29,10 @@ Rubric (each criterion is 0-1, total /5):Quality score = mean rubric score across 200 incidents.-We assert mean ≥ 0.80 (4/5 rubric criteria on average).+We assert mean ≥ 0.80 (4/5 rubric criteria on average) as a substrate+regression floor.++See `apps/docs/docs/benchmark.md` for what each suite actually measures.Run:pytest services/agents/tests/test_response_quality.py -v