Alerts Module

Complete

Overview

The Alerts module is the frontline of the ThreatOps SOCaaS platform. In a multi-tenant security operations center, thousands of alerts stream in every hour from customer SIEM deployments (Sentinel, Splunk, CrowdStrike, Elastic, Chronicle). Without intelligent triage, SOC analysts face overwhelming alert fatigue and critical threats slip through.

This module provides real-time alert ingestion, AI-powered scoring and disposition, bulk analyst actions, and autonomous auto-resolution for known benign patterns. It is the primary data source for the Incidents, Dashboard, and MDR modules.

What Was Proposed

What's Built

Multi-SIEM alert ingestion✓ Complete
6-stage AI triage pipeline✓ Complete
ML ensemble scoring (70/30 blend)✓ Complete
Bulk actions with ML feedback✓ Complete
Real-time notifications (WebSocket)✓ Complete
Alert statistics endpoint✓ Complete
Autonomous SOC auto-triage✓ Complete
SLA tracking integration✓ Complete
Rule optimizer FP rate tracking✓ Complete
Frontend table with AI score bars, disposition labels, bulk select✓ Complete

Architecture

Backend Service: TriageService

The core AI engine lives in app/services/triage_service.py. It orchestrates a 6-stage async pipeline:

  1. Entity Extraction — Parses alert payloads for IPs, domains, hashes, and usernames via EntityExtractor
  2. Threat Intelligence Enrichment — Parallel multi-provider lookups for IPs, domains, and file hashes via ThreatIntelAggregator
  3. UEBA Analysis — Behavioral deviation scoring for users via UEBAService
  4. Correlation — Checks for matching entities across alerts in the last 24 hours
  5. ML Scoring — Rule-based risk scoring via RiskScoringModel
  6. ML Ensemble — sklearn models (AlertClassifier RF, AnomalyDetector IF, ThreatScorer GB) with 70/30 blend

Dispositions: benign_auto_resolved, requires_investigation, suspicious_escalate, critical_immediate

API Router

File: app/routers/alerts.py — Prefix: /api/v1/alerts

GET    /api/v1/alerts/              # List alerts (filters: status, severity, source_siem)
POST   /api/v1/alerts/              # Create alert (triggers autonomous SOC + notifications)
PATCH  /api/v1/alerts/{alert_id}    # Update alert fields
GET    /api/v1/alerts/stats         # Alert statistics (total, new, auto_resolved, escalated, rate)
POST   /api/v1/alerts/{alert_id}/triage  # Trigger 6-stage AI triage on an alert
POST   /api/v1/alerts/bulk          # Bulk action (resolve, escalate, false_positive) + ML feedback

Frontend Page

File: src/app/alerts/page.tsx

The frontend calls GET /api/v1/alerts/ on mount, falling back to mock data. It renders a stats bar (new, investigating, auto-resolved, escalated counts), a bulk action toolbar, and a sortable table with AI score progress bars, severity badges, SIEM source, and disposition labels. Analysts can select multiple alerts and bulk-resolve or bulk-escalate via PATCH /api/v1/alerts/{id}.

Routing

LayerPath
/alertsFrontend route (Next.js App Router)
/api/v1/alertsAPI prefix (FastAPI router)

Prerequisites

Data Model

Model: app/models/alert.py — Table: alerts (extends TenantScopedBase)

FieldTypeDescription
idString(36) PKUUID primary key (from TenantScopedBase)
tenant_idString(36) FKTenant scope (from TenantScopedBase)
rule_idString(36) FKLinked detection rule
incident_idString(36) FKLinked incident (if escalated)
titleString(500)Alert title
raw_payloadJSONOriginal SIEM payload
normalized_payloadJSONNormalized alert data
severityString(20)critical / high / medium / low
statusEnum(AlertStatus)new / auto_resolved / investigating / escalated / false_positive / true_positive
source_siemString(50)sentinel / splunk / crowdstrike / elastic / chronicle
ai_scoreFloatML triage confidence score (0-100)
ai_dispositionString(100)ML disposition label
ai_reasoningTextHuman-readable triage reasoning
resolution_typeEnum(ResolutionType)automated / manual / pending
analyst_notesTextAnalyst-provided notes
resolved_atDateTimeResolution timestamp
created_atDateTimeCreation timestamp (from base)
updated_atDateTimeLast update timestamp (from base)

UI Layout

Alerts Page Layout

The page uses a full-width layout on a light slate background (bg-slate-50) with the following structure:

AI score bars use color coding: green (≥0.7), amber (0.3-0.7), red (<0.3). The table supports hover highlighting and row-level checkbox selection.