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.

chore(release): v15.0.0 (#1086)

Beenu Arora3f50c16e581d
diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml
index 5244c5a3b..2b01feff9 100644
--- a/.github/workflows/e2e.yml
+++ b/.github/workflows/e2e.yml
@@ -76,11 +76,34 @@ jobs:
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
- name: Setup Node 22
+ # Deliberately **no** `cache: "pnpm"`, and the reasoning is worth
+ # keeping because the first version of it was wrong.
+ #
+ # This job has been broken twice by an unresolvable
+ # `[next]/internal/font/google/...` module. The cache looked like
+ # the cause — an earlier failure here really was a restored store
+ # that had not linked `@tailwindcss/oxide-linux-x64-gnu` — and
+ # removing it produced one green run. The next commit, which
+ # changed one JSON file, failed again on a *different* font. So the
+ # cache was a plausible hypothesis that one green run appeared to
+ # confirm and the following run disproved.
+ #
+ # `next/font/google` fetches from Google at compile time, so the
+ # real dependency is the network, and the failure is intermittent
+ # rather than deterministic. The cache stays off because it buys
+ # nothing here and has caused one confirmed failure of its own, but
+ # it is **not** the fix: `NEXT_FONT_GOOGLE_MOCKED_RESPONSES`, or
+ # self-hosting the five faces through `next/font/local`, is.
+ # Tracked rather than claimed closed.
+ #
+ # The symptom misleads either way: a compile-time font fetch that
+ # fails surfaces as a module-resolution error naming a virtual path
+ # present in no package, so it reads as a bad import. Nothing in
+ # `apps/web` was wrong on either occasion — `next dev --turbo`
+ # serves 200 locally on the same commit.
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "22"
- cache: "pnpm"
- cache-dependency-path: pnpm-lock.yaml
- name: Install dependencies
working-directory: ${{ github.workspace }}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6c429858f..7f9926c27 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
+## [15.0.0] - 2026-10-01
+
+A security release. Thirteen defects, each found by reading the code at
+`v14.0.0` and each shipped with a reproduction that fails on the untouched
+tree for the stated reason.
+
+Two of them are breaking. `/api/v1/shifts` is removed and the STIX reads
+answer 404 outside demo mode, because both served records nobody entered;
+and `ENVIRONMENT` now defaults to `production` on every documented path,
+which turns several previously silent warnings into boot refusals.
+
+The through-line is not a category of bug. It is that a control can exist,
+pass its tests, and never run: an API key resolving to its owner's email so
+the audit log could not name the credential, 275 route dependencies reading
+a hardcoded map while the console wrote to a database nothing consulted,
+a prompt-injection flag read from a field no code ever set, and eleven
+`emit_audit` call sites that could not distinguish a session from a script.
+Each fix therefore ships the gate that would have caught it.
+
+
### Security
- **Two permission models shipped side by side, and the one almost every route used ignored the database.** 275 route dependencies called the synchronous `require_permission`, which reads the hardcoded `ROLE_PERMISSIONS` map; 27 called `require_permission_db`, which reads the `user_roles` / `role_permissions` tables. The console ships a full RBAC administration screen writing to those tables — so an operator could grant a permission, watch it appear in the UI, and have **275 of 302 routes ignore it**. Revoking worked no better.
diff --git a/README.md b/README.md
index a50ed0731..cafc5cf6b 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@
**An open-source, self-hostable AI Security Operations Center.** It ingests your security telemetry, detects and correlates threats, investigates them with AI agents whose reasoning is fully auditable, and proposes responses a human approves.
[![License: MIT](https://img.shields.io/badge/License-MIT-22c55e.svg?style=flat-square)](https://opensource.org/licenses/MIT)
-[![Version](https://img.shields.io/badge/version-14.0.0-f59e0b?style=flat-square)](CHANGELOG.md)
+[![Version](https://img.shields.io/badge/version-15.0.0-f59e0b?style=flat-square)](CHANGELOG.md)
[![CI](https://img.shields.io/github/actions/workflow/status/beenuar/AiSOC/ci.yml?branch=main&label=CI&style=flat-square)](https://github.com/beenuar/AiSOC/actions/workflows/ci.yml)
[![CodeQL](https://img.shields.io/github/actions/workflow/status/beenuar/AiSOC/codeql.yml?branch=main&label=CodeQL&style=flat-square)](https://github.com/beenuar/AiSOC/actions/workflows/codeql.yml)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/beenuar/AiSOC/badge)](https://securityscorecards.dev/viewer/?uri=github.com/beenuar/AiSOC)
diff --git a/RELEASES.md b/RELEASES.md
index 2e545ab32..45c6aa900 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -2,13 +2,54 @@
This file mirrors what used to live in the "What's new" section of [`README.md`](README.md). The complete, machine-readable inventory (with file paths, env-var diffs, and per-release test counts) lives in [`CHANGELOG.md`](CHANGELOG.md).
-> **TL;DR for first-time visitors:** AiSOC is on `v14.0.0`, released 2026-09-29. It closes [GHSA-pm3f-h6gc-rvgp](https://github.com/beenuar/AiSOC/security/advisories/GHSA-pm3f-h6gc-rvgp) (HIGH, CVSS 8.1): `POST /api/v1/tenants/me/users` took a `role` string from the request body and wrote it to the column every permission check reads, with no allow-list and no comparison against the caller, so a `tenant_admin` could create a `platform_admin` — a role declared `["*"]` — sign in as it and hold every permission in the product. Reproduced end to end on real Postgres before the fix. **It is a major because the fix is a refusal**: no route will now confer a role, an API-key scope or an organisation membership beyond the caller's own authority, and `platform_admin` and `admin` are unreachable from every API route including for a caller that already holds `*` — the only way to mint one is `python -m app.scripts.bootstrap_admin` against the database. The narrow repair would have been an allow-list on the reported handler; **five more routes had the same defect**, including `POST /api/v1/api-keys`, whose guard named `tenant_admin` in a tuple and let it mint a wildcard key — total authority creating no user at all — and let any `users:write` holder mint a `plugins:admin` key they were themselves refused. The `### BREAKING` section of [`CHANGELOG.md`](CHANGELOG.md) tables every affected route, what it used to accept and what it answers now. `scripts/check_role_grant_scope.py` asks the question of every handler binding an authority field and, run against the tree before the fix, names all nine. Upgrading is `make up`. The chart publishes as **`7.0.0`**. v13.0.1 earlier the same day was a patch that existed to **publish the corrected Helm chart**, because until it the only chart anybody could pull was the wrong one. v13.0.0 bumped the chart's `appVersion` and left its own `version` at `5.9.2`, so `helm push` — which replaces silently — republished a coordinate v12.3.2 already held, pointing at a different application. The fix landed on `main` after the tag, and the chart reaches GHCR from exactly one place: three steps in `release.yml` each gated `if: github.event_name == 'push'`. A dispatch therefore packages, lints, verifies against the registry and deliberately stops, so a fix that lands after a tag has no route to the registry except a new tag — which is this one. The chart publishes as **`6.0.1`**: the 5.x → 6.x boundary is what announces the v13.0.0 behavioural break to anyone upgrading off `5.9.2`, and that boundary is crossed whichever 6.x publishes first, while the step up from the never-published `6.0.0` is a patch because the only thing that moved inside the chart is `appVersion` — no template, no default, no `values.yaml` key added, removed or renamed. `6.0.0` is not reused: it is already declared on `main` against a different `appVersion`, and unpublished is not the same as free. Everything below describes **v13.0.0**, which this patch does not change. **It was a major because it breaks behaviour, not a schema:** 75 state-changing API routes now require a permission they did not require before, and unlike the two patches earlier the same day, some of them refuse roles other than `viewer` — several surfaces move to `settings:write`, which `soc_analyst`, `soc_lead` and `threat_hunter` do not hold, so operators who are not tenant administrators will meet HTTP 403 where they previously got 200. The `### BREAKING` section of [`CHANGELOG.md`](CHANGELOG.md) lists every affected route, the permission it now takes, the roles that lose it, and what to do; `docs/openapi.yaml` is unchanged apart from one corrected description, which is exactly why the break is announced rather than left to be inferred from the spec. What it fixes is the debt the previous two patches measured but did not work down: `scripts/check_route_authz.py` reported **103 of 246 state-changing routes in `services/api` authenticating the caller and then checking nothing** — 42% of the write surface — and that figure is now **28**, every remaining route carrying a recorded reason. The worst module was MSSP, where `_require_own_child` established whose child a tenant was and nothing established whether the caller could act on it, so a `viewer` in a managing tenant could push a rule pack into a customer, grant itself a role inside one, or delete a critical detection from one. `community.py` had the moderation step gated and the thing being moderated open. Every permission used already existed and was already withheld from `viewer`, so there is no migration and no new permission to define. Upgrading is `make up`. v12.3.2 earlier the same day was the second security patch of the day: eleven more write routes were found declaring a permission that never ran. `Annotated[Any, require_permission("users:write")]` carries no `Depends()`, and FastAPI honours only `Annotated` metadata that is a `Depends` or a `FieldInfo` — everything else is silently dropped, so the check never happened and `current_user` degraded into a required query parameter. The tell was the status code: a `viewer` hitting these routes got **422, not 403**, which reads as a malformed request rather than a refusal. v12.3.1 was a security patch on top of v12.3.0, and the reason it exists separately is that a fix living on `main` is not a fix anyone has. Two reported advisories: a **critical** SQL injection in the osquery allowlist, where a denylist scanning rendered SQL for `--`, `/*` and `;` had never listed `'`, so a value could close a quoted literal and replace the WHERE clause — and reproducing it showed all six query templates were injectable, not the one reported, because the numeric parameters were never coerced either. Each parameter now declares what it is and anything else is refused rather than escaped, because an escaped path still reaches the endpoint, matches nothing, and reads to an operator as a clean host. The second is a **high** missing-authorization hole where every remediation write route authenticated and none authorized, so a `viewer` could raise the tenant to autonomy L4 and pre-approve a high blast-radius verb; the permission it needed already existed and was simply never enforced, which is the third time on this repository. The gate that should have caught it passed throughout, because it asks whether a route authenticates — so a second gate now asks whether it authorizes, and measures 103 of 246 state-changing routes making no authorization decision, as a ceiling that can only fall. Upgrading is `make up`. v12.3.0 (same day) closed six lettered sub-phases; its notes are below. None of the eight first-party npm/PyPI packages has been uploaded — the registries return 404 for all eight — and that remains credential-blocked rather than done. The latest GitHub release with notes and downloads: <https://github.com/beenuar/AiSOC/releases/latest>.
+> **TL;DR for first-time visitors:** AiSOC is on `v15.0.0`, released 2026-10-01. It is a **security release closing thirteen defects** found by reading the code at `v14.0.0`. Two are breaking: `/api/v1/shifts` is removed and the STIX reads answer 404 outside demo mode, because both served records nobody entered; and `ENVIRONMENT` now defaults to `production` on every documented path, turning several previously silent warnings into boot refusals. The unifying finding is not a category of bug but a shape — **a control that exists, passes its tests, and never runs**: 275 route dependencies read a hardcoded permission map while the console's RBAC screen wrote to a database nothing consulted; an API key resolved to its owner's email, so the audit log could not say whether a person or a script had acted; a prompt-injection flag was read from a field no code ever set; thirteen Kafka clients across three languages each took the library default, which is plaintext in all of them. Every fix ships the gate that would have caught it, and each gate was proven against the pre-fix tree rather than asserted. The chart publishes as **`7.1.0`**. Everything below describes v14.0.0 and earlier, which this release does not change.
+>
+> **Previously:** AiSOC was on `v14.0.0`, released 2026-09-29. It closes [GHSA-pm3f-h6gc-rvgp](https://github.com/beenuar/AiSOC/security/advisories/GHSA-pm3f-h6gc-rvgp) (HIGH, CVSS 8.1): `POST /api/v1/tenants/me/users` took a `role` string from the request body and wrote it to the column every permission check reads, with no allow-list and no comparison against the caller, so a `tenant_admin` could create a `platform_admin` — a role declared `["*"]` — sign in as it and hold every permission in the product. Reproduced end to end on real Postgres before the fix. **It is a major because the fix is a refusal**: no route will now confer a role, an API-key scope or an organisation membership beyond the caller's own authority, and `platform_admin` and `admin` are unreachable from every API route including for a caller that already holds `*` — the only way to mint one is `python -m app.scripts.bootstrap_admin` against the database. The narrow repair would have been an allow-list on the reported handler; **five more routes had the same defect**, including `POST /api/v1/api-keys`, whose guard named `tenant_admin` in a tuple and let it mint a wildcard key — total authority creating no user at all — and let any `users:write` holder mint a `plugins:admin` key they were themselves refused. The `### BREAKING` section of [`CHANGELOG.md`](CHANGELOG.md) tables every affected route, what it used to accept and what it answers now. `scripts/check_role_grant_scope.py` asks the question of every handler binding an authority field and, run against the tree before the fix, names all nine. Upgrading is `make up`. The chart publishes as **`7.0.0`**. v13.0.1 earlier the same day was a patch that existed to **publish the corrected Helm chart**, because until it the only chart anybody could pull was the wrong one. v13.0.0 bumped the chart's `appVersion` and left its own `version` at `5.9.2`, so `helm push` — which replaces silently — republished a coordinate v12.3.2 already held, pointing at a different application. The fix landed on `main` after the tag, and the chart reaches GHCR from exactly one place: three steps in `release.yml` each gated `if: github.event_name == 'push'`. A dispatch therefore packages, lints, verifies against the registry and deliberately stops, so a fix that lands after a tag has no route to the registry except a new tag — which is this one. The chart publishes as **`6.0.1`**: the 5.x → 6.x boundary is what announces the v13.0.0 behavioural break to anyone upgrading off `5.9.2`, and that boundary is crossed whichever 6.x publishes first, while the step up from the never-published `6.0.0` is a patch because the only thing that moved inside the chart is `appVersion` — no template, no default, no `values.yaml` key added, removed or renamed. `6.0.0` is not reused: it is already declared on `main` against a different `appVersion`, and unpublished is not the same as free. Everything below describes **v13.0.0**, which this patch does not change. **It was a major because it breaks behaviour, not a schema:** 75 state-changing API routes now require a permission they did not require before, and unlike the two patches earlier the same day, some of them refuse roles other than `viewer` — several surfaces move to `settings:write`, which `soc_analyst`, `soc_lead` and `threat_hunter` do not hold, so operators who are not tenant administrators will meet HTTP 403 where they previously got 200. The `### BREAKING` section of [`CHANGELOG.md`](CHANGELOG.md) lists every affected route, the permission it now takes, the roles that lose it, and what to do; `docs/openapi.yaml` is unchanged apart from one corrected description, which is exactly why the break is announced rather than left to be inferred from the spec. What it fixes is the debt the previous two patches measured but did not work down: `scripts/check_route_authz.py` reported **103 of 246 state-changing routes in `services/api` authenticating the caller and then checking nothing** — 42% of the write surface — and that figure is now **28**, every remaining route carrying a recorded reason. The worst module was MSSP, where `_require_own_child` established whose child a tenant was and nothing established whether the caller could act on it, so a `viewer` in a managing tenant could push a rule pack into a customer, grant itself a role inside one, or delete a critical detection from one. `community.py` had the moderation step gated and the thing being moderated open. Every permission used already existed and was already withheld from `viewer`, so there is no migration and no new permission to define. Upgrading is `make up`. v12.3.2 earlier the same day was the second security patch of the day: eleven more write routes were found declaring a permission that never ran. `Annotated[Any, require_permission("users:write")]` carries no `Depends()`, and FastAPI honours only `Annotated` metadata that is a `Depends` or a `FieldInfo` — everything else is silently dropped, so the check never happened and `current_user` degraded into a required query parameter. The tell was the status code: a `viewer` hitting these routes got **422, not 403**, which reads as a malformed request rather than a refusal. v12.3.1 was a security patch on top of v12.3.0, and the reason it exists separately is that a fix living on `main` is not a fix anyone has. Two reported advisories: a **critical** SQL injection in the osquery allowlist, where a denylist scanning rendered SQL for `--`, `/*` and `;` had never listed `'`, so a value could close a quoted literal and replace the WHERE clause — and reproducing it showed all six query templates were injectable, not the one reported, because the numeric parameters were never coerced either. Each parameter now declares what it is and anything else is refused rather than escaped, because an escaped path still reaches the endpoint, matches nothing, and reads to an operator as a clean host. The second is a **high** missing-authorization hole where every remediation write route authenticated and none authorized, so a `viewer` could raise the tenant to autonomy L4 and pre-approve a high blast-radius verb; the permission it needed already existed and was simply never enforced, which is the third time on this repository. The gate that should have caught it passed throughout, because it asks whether a route authenticates — so a second gate now asks whether it authorizes, and measures 103 of 246 state-changing routes making no authorization decision, as a ceiling that can only fall. Upgrading is `make up`. v12.3.0 (same day) closed six lettered sub-phases; its notes are below. None of the eight first-party npm/PyPI packages has been uploaded — the registries return 404 for all eight — and that remains credential-blocked rather than done. The latest GitHub release with notes and downloads: <https://github.com/beenuar/AiSOC/releases/latest>.
---
## What's new
-`VERSION` is `14.0.0`. The **v14.0.0** release (2026-09-29) closes a HIGH
+`VERSION` is `15.0.0`. The **v15.0.0** release (2026-10-01) is a security
+release closing **thirteen defects**, each found by reading the code at
+`v14.0.0` and each shipped with a reproduction that fails on the untouched
+tree for the stated reason.
+
+The ones with the widest blast radius: an **AI triage could teach the platform
+to stop showing an attacker their own alerts** — three AI verdicts at ≥0.90
+confidence on one evidence signature auto-closed every later alert sharing it,
+and the corroboration threshold was never a mitigation because the attacker
+picks how many alerts to send. **Both SSO handlers minted a signed session for
+an identity nobody authenticated**, and since `python3-saml` was declared in no
+install path, that branch was the *only* reachable path through the SAML
+assertion consumer on every deployment. **Six of the seven `mssp_*` tables had
+no row-level security**, so the query predicate was the single control between
+one MSSP's portfolio and another's. And an operator could **grant a permission
+in the console, watch it appear in the UI, and have 275 of 302 routes ignore
+it**.
+
+Two are breaking and are tabled in the `### BREAKING` sections of
+[`CHANGELOG.md`](CHANGELOG.md): `/api/v1/shifts` is removed and
+`/api/v1/threatintel/stix` reads answer 404 outside demo mode; and
+`ENVIRONMENT` defaults to `production` on every documented path, which turns
+several previously silent warnings into boot refusals. Upgrading is `make up`.
+
+Three findings are worth more than the fixes. **A real database caught what a
+static gate could not**: the obvious MSSP policies are mutually recursive and
+Postgres answers `infinite recursion detected` on the first `SELECT`, while
+`check_rls_policy_shape.py` passed throughout — shape is not liveness.
+**Adding one keyword broke four writer signatures and no test failed on the
+exception**, because the call sits inside `contextlib.suppress`; what surfaced
+was a zero write-count in an unrelated replay test three files away.
+And **the first design for database-backed permissions was wrong**: resolving
+inside the permission check would have made a transient database fault deny
+every request on the platform, so resolution happens at authentication and
+fails *open* to the static map, deliberately.
+
+The claim-to-gate matrix is at **255 rows, all GATED**. The chart publishes as
+**`7.1.0`**.
+
+`VERSION` was `14.0.0`. The **v14.0.0** release (2026-09-29) closes a HIGH
privilege-escalation advisory by scoping every grant to the granter: no
principal may confer a role, an API-key scope or an organisation membership
beyond what it holds itself, and the two wildcard roles are unreachable from
diff --git a/VERSION b/VERSION
index 4b964e965..94188a748 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-14.0.0
+15.0.0
diff --git a/apps/docs/static/data/scoreboard.json b/apps/docs/static/data/scoreboard.json
index 4085dd560..495347c37 100644
--- a/apps/docs/static/data/scoreboard.json
+++ b/apps/docs/static/data/scoreboard.json
@@ -3,9 +3,9 @@
"_readme": "Append-only public benchmark scoreboard. Each row is one eval run. Substrate rows (no LLM, deterministic) are marked substrate:true and MUST NOT be quoted as live agent performance. Wet-eval rows (substrate:false) are appended by the T5.5 weekly CI workflow once it lands. Newest row first.",
"rows": [
{
- "date": "2026-09-29",
- "agent_version": "v14.0.0",
- "commit_sha": "ebaa19a1",
+ "date": "2026-10-01",
+ "agent_version": "v15.0.0",
+ "commit_sha": "a227f4c3",
"substrate": true,
"eval_mode": "substrate-only",
"mitre_accuracy": 0.97,
diff --git a/apps/docs/static/llms-full.txt b/apps/docs/static/llms-full.txt
index 6c99458f3..6e097fdc6 100644
--- a/apps/docs/static/llms-full.txt
+++ b/apps/docs/static/llms-full.txt
@@ -3,7 +3,7 @@
<!-- Generated by scripts/generate_llms_txt.py. Do not edit by hand; run the script and commit the result. -->
> AiSOC is an open-source, self-hostable AI Security Operations Center, MIT
-> licensed and maintained by the AiSOC community. Version 14.0.0.
+> licensed and maintained by the AiSOC community. Version 15.0.0.
> Repository: https://github.com/beenuar/AiSOC. Documentation: https://beenuar.github.io/AiSOC/.
This file exists so an automated reader can answer questions about AiSOC
diff --git a/apps/docs/static/llms.txt b/apps/docs/static/llms.txt
index dc50661d1..9508cbbcd 100644
--- a/apps/docs/static/llms.txt
+++ b/apps/docs/static/llms.txt
@@ -6,7 +6,7 @@
> security telemetry from 84 first-party connectors, normalises it to OCSF,
> correlates it into alerts, and runs LLM agents that triage and investigate them.
> Every agent decision is written to an investigation ledger, so the reasoning
-> behind a verdict can be replayed step by step. MIT licensed. Current version 14.0.0.
+> behind a verdict can be replayed step by step. MIT licensed. Current version 15.0.0.
AiSOC is built and maintained by the AiSOC community. It is a complete SOC
platform rather than a single tool: ingestion, detection, correlation, agent
diff --git a/apps/web/package.json b/apps/web/package.json
index 5e24695ea..83d293a37 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -1,6 +1,6 @@
{
"name": "@aisoc/web",
- "version": "14.0.0",
+ "version": "15.0.0",
"private": true,
"description": "AiSOC SOC Console - Next.js 14 Frontend",
"license": "MIT",
diff --git a/infra/helm/aisoc/Chart.yaml b/infra/helm/aisoc/Chart.yaml
index 5dc0a1838..d347f1daf 100644
--- a/infra/helm/aisoc/Chart.yaml
+++ b/infra/helm/aisoc/Chart.yaml
@@ -25,13 +25,13 @@ type: application
# the chart refuses grants it used to accept (see the v14.0.0 BREAKING
# section), and the chart's major is the only coordinate a consumer pulling
# `oci://ghcr.io/beenuar/charts/aisoc` sees before they install it.
-version: 7.0.0
+version: 7.1.0
# Used as the image tag wherever a `tag:` in values.yaml is left empty, so
# it has to be a tag the registry actually holds — it read "5.2.0", which
# exists for no image, so every pod of a default install would have gone to
# ImagePullBackOff. scripts/check_published_images.py resolves it the same
# way the templates do and fails when it names nothing.
-appVersion: "v14.0.0"
+appVersion: "v15.0.0"
keywords:
- security