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
fix(alerts): status follows agent verdicts; triaged visible in queue; release-assignee works
Alexandru Mateescuec34db67ffdb
diff --git a/apps/web/src/components/alerts/AlertsView.tsx b/apps/web/src/components/alerts/AlertsView.tsxindex 3130f3c5e..9ba165359 100644--- a/apps/web/src/components/alerts/AlertsView.tsx+++ b/apps/web/src/components/alerts/AlertsView.tsx@@ -147,7 +147,7 @@ function FiltersBar({total: number;}) {const severities = ['all', 'critical', 'high', 'medium', 'low', 'info'] as const;- const statuses = ['all', 'new', 'investigating', 'resolved', 'false_positive'] as const;+ const statuses = ['all', 'new', 'investigating', 'triaged', 'resolved', 'false_positive'] as const;return (<div className="flex items-center gap-3 flex-wrap py-3 px-4 bg-gray-900/40 border border-gray-800/60 rounded-xl">diff --git a/packages/types/src/alert.ts b/packages/types/src/alert.tsindex cb8b99fa2..15cb3ecf2 100644--- a/packages/types/src/alert.ts+++ b/packages/types/src/alert.ts@@ -8,6 +8,7 @@ export type AlertStatus =| "new"| "open"| "in_progress"+ | "triaged"| "pending_action"| "resolved"| "false_positive"diff --git a/services/agents/app/investigator/ledger.py b/services/agents/app/investigator/ledger.pyindex b0ace3522..99c1da8fe 100644--- a/services/agents/app/investigator/ledger.py+++ b/services/agents/app/investigator/ledger.py@@ -579,7 +579,16 @@ async def persist_auto_triage(ai_score = $4,ai_summary = $5,ai_recommendations = $6::jsonb,- status = CASE WHEN $7 AND NOT $10 THEN 'resolved' ELSE status END,+ -- If the agent produced a verdict, the alert has+ -- been triaged: surface that on the status badge+ -- so investigated alerts stop showing as 'new'.+ -- Never downgrades a further-along status; shadow+ -- runs leave it untouched.+ status = CASE+ WHEN $7 AND NOT $10 THEN 'resolved'+ WHEN status = 'new' AND NOT $10 THEN 'triaged'+ ELSE status+ END,resolved_at = CASE WHEN $7 AND NOT $10 THEN now() ELSE resolved_at END,-- Nullable on purpose: NULL is "not scored",-- which is a different fact from "scored zero".diff --git a/services/api/app/api/v1/endpoints/alerts.py b/services/api/app/api/v1/endpoints/alerts.pyindex ad4bfd8d5..79334dd7d 100644--- a/services/api/app/api/v1/endpoints/alerts.py+++ b/services/api/app/api/v1/endpoints/alerts.py@@ -7,7 +7,7 @@ from datetime import UTC, datetimefrom typing import Annotated, Literalfrom fastapi import APIRouter, Depends, Header, HTTPException, Query, status-from pydantic import BaseModel+from pydantic import BaseModel, ConfigDict, Fieldfrom sqlalchemy import and_, func, select, updatefrom sqlalchemy.exc import IntegrityError@@ -144,10 +144,14 @@ class AlertListResponse(BaseModel):class AlertUpdateRequest(BaseModel):+ model_config = ConfigDict(populate_by_name=True)+status: str | None = Nonepriority: int | None = Nonetags: list[str] | None = None- assigned_to_id: uuid.UUID | None = None+ # The queue UI releases alerts with {"assignee": null}; accept both the+ # canonical field name and that alias.+ assigned_to_id: uuid.UUID | None = Field(default=None, alias="assignee")case_id: uuid.UUID | None = None@@ -838,9 +842,12 @@ async def update_alert(updates["priority"] = request.priorityif request.tags is not None:updates["tags"] = request.tags- if request.assigned_to_id is not None:+ # Explicit null clears the assignment (release back to the pool);+ # absent field means "leave as-is". Key presence, not value truthiness,+ # decides — `is not None` here made release a silent no-op.+ if "assigned_to_id" in request.model_fields_set or "assignee" in request.model_fields_set:updates["assigned_to_id"] = request.assigned_to_id- updates["assigned_at"] = datetime.now(UTC)+ updates["assigned_at"] = datetime.now(UTC) if request.assigned_to_id else Noneif request.case_id is not None:updates["case_id"] = request.case_id