Skip to content

armgit / AiSOC

Public Imported from GitHub
0

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.

docs(matrix): two gates were enforcing claims the matrix did not record (#994)

Beenu Arora2ff365aca9e2
diff --git a/ROADMAP.md b/ROADMAP.md
index 17e896c43..ec35bc551 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -44,7 +44,7 @@ A proof-first, security-first program to make every README claim gate-backed, cl
- **Phase D (breadth):** D1 eight connectors (QRadar/Exabeam/Securonix/Devo/Netskope/Windows-Sysmon/Zeek-Suricata/syslog-CEF) · D2 AI/LLM-usage audit connector + `llm-*` detections + hot/cold lake tiering · D3 live-vendor mock-server smoke.
- **Phase E (prove it):** E1 CI-gated benchmark scoreboard tied to a deterministic live-agent MITRE-accuracy run.
-The claim-to-gate matrix stands at **236 rows — 234 GATED / 2 PARTIAL / 0 NO GATE** — **every product claim is backed by a failing test** and the ratchet (`MAX_NO_GATE=0`) forbids any regression. Six PARTIAL rows closed in one pass and every one was closed by building the gate it named, never by relabelling: the ledger's replay contract, the per-language SDK surface, the platform-wide egress default, the raw-SQL column contract, the live tenant-scoped lake fetch, and the scanner ratchet that gave `.security/allowlist.yml` its first reader. Four of the six found a live defect on the way in. The 2 that remain are the same deferral seen twice — a groundedness floor and the promotion of the live-agent eval to a pull-request gate — and neither is blocked on code or on a funded provider key: the workflow serves a local model, it has simply never run, so there is no distribution to derive a floor from and inventing one would publish a number nobody measured. Count the table rows with `python3 scripts/check_claim_gate_matrix.py` rather than trusting a figure quoted in prose — this line has gone stale before. The six lettered deferrals are scoped in [`docs/audit/DEFERRED_SUBPHASES.md`](docs/audit/DEFERRED_SUBPHASES.md).
+The claim-to-gate matrix stands at **238 rows — 236 GATED / 2 PARTIAL / 0 NO GATE** — **every product claim is backed by a failing test** and the ratchet (`MAX_NO_GATE=0`) forbids any regression. Six PARTIAL rows closed in one pass and every one was closed by building the gate it named, never by relabelling: the ledger's replay contract, the per-language SDK surface, the platform-wide egress default, the raw-SQL column contract, the live tenant-scoped lake fetch, and the scanner ratchet that gave `.security/allowlist.yml` its first reader. Four of the six found a live defect on the way in. The 2 that remain are the same deferral seen twice — a groundedness floor and the promotion of the live-agent eval to a pull-request gate — and neither is blocked on code or on a funded provider key: the workflow serves a local model, it has simply never run, so there is no distribution to derive a floor from and inventing one would publish a number nobody measured. Count the table rows with `python3 scripts/check_claim_gate_matrix.py` rather than trusting a figure quoted in prose — this line has gone stale before. The six lettered deferrals are scoped in [`docs/audit/DEFERRED_SUBPHASES.md`](docs/audit/DEFERRED_SUBPHASES.md).
## v4.0 — Shipped
diff --git a/apps/docs/docs/compliance/evidence-pack.md b/apps/docs/docs/compliance/evidence-pack.md
index 05cd5043b..9855ed4f3 100644
--- a/apps/docs/docs/compliance/evidence-pack.md
+++ b/apps/docs/docs/compliance/evidence-pack.md
@@ -33,7 +33,7 @@ and says so.
| Prompt-injection resistance | Three adversarial corpora: 32 payloads scanned in isolation and 71 incident pairs whose payloads are placed in attacker-controllable fields, both against a clean twin with a recall floor and a false-positive ceiling, plus 34 held-out pairs authored after the guard was frozen and carrying no floor at all, on which the guard measures 7.1% | `services/agents/tests/adversarial/` |
| Claim-to-gate traceability | Every product claim mapped to the CI job that fails when it stops being true | `docs/audit/CLAIM_TO_GATE_MATRIX.md` |
-The last row is the one worth reading first. It is the honest index: 234 rows
+The last row is the one worth reading first. It is the honest index: 236 rows
`GATED`, 2 `PARTIAL` with the specific gap named, and a ratchet that refuses
to let a row sit at `NO GATE`.
diff --git a/docs/audit/CLAIM_TO_GATE_MATRIX.md b/docs/audit/CLAIM_TO_GATE_MATRIX.md
index f12438e1b..513882765 100644
--- a/docs/audit/CLAIM_TO_GATE_MATRIX.md
+++ b/docs/audit/CLAIM_TO_GATE_MATRIX.md
@@ -244,10 +244,12 @@ Statuses: `GATED` (a CI job fails when the claim stops being true) · `PARTIAL`
| A migration is exercised against a populated database before it ships | `apps/docs/docs/operations/release-policy.md` (Upgrading) | `upgrade-test.yml :: upgrade`, on every pull request touching `services/api/migrations/**`, `run_migrations.py` or any service's `alembic/`: the previous minor's **published image** applies its own chain, `scripts/upgrade_fixture.sql` seeds a tenant, a user, one alert per severity tier and a case, and then this tree's chain is applied over the populated schema by that same runner. It asserts every migration on disk is recorded as applied, that the pre-upgrade rows are still readable **by id** rather than only by count, that the DML-only runtime role can still read them, and that a second run applies nothing | GATED | The previous release's runner applies both legs, so a migration needing a *newer* runner than the previous release shipped is not covered; it would fail the second leg rather than pass silently. The fixture is four tables deep, not the whole schema |
| The hunting agent never writes a query: it fills a closed schema and the values it supplies are bound parameters | `plans/aisoc_gap_closure_plan.plan.md` (8.3); `apps/docs/docs/concepts/hunting-agent.md` | `ci.yml :: hunt agent boundary` (`check_hunt_agent_boundary.py` — reads the plan enum, the SQL compiler and the ClickHouse DDL together and fails when any drifts from the others; proven against an open enum, a query-shaped property and a field the DDL does not declare) | GATED | The gate reads structure, not intent: it cannot say the plan the model chose is a sensible hunt, only that the model could not have expressed anything outside the vocabulary |
| A hunt the event lake could not answer is reported as unavailable with a reason, never as zero findings | `plans/aisoc_gap_closure_plan.plan.md` (8.3) | `ci.yml :: api tests` (`test_hunt_plan_sql.py` — the unavailable branch omits the `rows` key entirely, so a caller reading `rows` raises rather than rendering an empty list as a clean estate; asserted across all three failure classes) | GATED | Three outcomes are kept apart in the response shape rather than in prose: findings, no findings, and could not check |
+| A bind parameter in a raw SQL statement carries the name the handler binds, so the route reaches a connection rather than 500ing on `ArgumentError` | `scripts/check_text_bind_casts.py` (module docstring); the four dead handlers it names | `isolation.yml :: route-scope` (`check_text_bind_casts.py` — an AST pass over every `text()` literal under `services/`, refusing `:name::type` because SQLAlchemy's bind-parameter regex backtracks one character rather than skipping the cast, so `:payload::jsonb` declares `payloa` and the matching `.bindparams()` raises. `--self-test` asserts five things: the injected `:payload::jsonb` is reported, a `::` cast in a *concatenated* statement is reported too, the correct `CAST(:name AS type)` spelling is not, an ARN literal outside a `text()` call is not, and a tree with no Python under `services/` is refused rather than called clean) | GATED | Scoped to statements the AST can see as `text()` arguments, including concatenated ones. A statement whose SQL arrives at runtime from outside the module — a fragment read from a file or assembled by a helper the pass does not follow — is not covered, and the fix everywhere is the standard `CAST(:name AS type)` spelling |
+| Every CI job that grades a service installs what that service's image ships, so CI cannot run a different engine than production | `scripts/check_ci_install_parity.py` (module docstring); `RELEASES.md` | `reproducible-builds.yml :: pin-agreement` (`check_ci_install_parity.py` — for every job running a service's *whole* pytest suite, three directions: a runtime dependency guarded by `except ImportError` that CI does not install, so CI grades the fallback and the image grades the real path; a package CI installs that none of the job's services declares; and a version range disjoint from, wider than, or unbounded against the intersection of what those services declare. 16 self-test cases inject each direction, two controls must not fire, and two refusals cover a tree with nothing to compare. It reported 210 divergences against the commit before it landed) | GATED | The three whole-suite jobs derive their install list from the manifests through `service_requirements.py`, which re-resolves inside the declared ranges rather than installing the locked set — so CI can land on a different patch release than the image. Narrower than a hand-written list, and stated in the script's docstring. Closing it means installing from the lock in CI, at the cost of the pip wheel cache the matrix was built around |
## Summary
-- GATED: 234
+- GATED: 236
- PARTIAL: 2
- NO GATE: 0 (**every claim is backed by a failing test.** The last NO GATE — the weekly benchmark scoreboard running live against `main` — closed in Phase E1: `scripts/check_scoreboard.py` ties the published scoreboard to a deterministic per-PR live-agent MITRE-accuracy run, while the funded weekly `wet-eval.yml` appends the LLM-tier rows. The two remaining PARTIAL rows are honest, named deferrals — each states the specific gap and what closes it — not unproven claims.)