Skip to main content
AI threats are a new event class. They do not arrive as failed authentication attempts, network anomalies, or malware signatures — the signals your SIEM was built to correlate. Without deliberate integration work, Cognisafe detections remain siloed in the Cognisafe dashboard while your SOC analysts monitor a different screen entirely. This reference architecture makes AI threat data a first-class citizen in your security operations stack. By the end, Cognisafe threat events are queryable alongside traditional security events, alert rules fire in your existing incident queue, and compliance evidence is generated automatically.

Architecture overview

Cognisafe webhook payload

Every threat_detected event sent by Cognisafe has this structure. This is the canonical source — all SIEM field mappings derive from it.
Requests are signed with X-Cognisafe-Signature: sha256=<hmac-hex>. Always verify this before processing. The HMAC is computed over the raw request body using your webhook secret as the key.

Common schema mapping

Map Cognisafe fields to your SIEM’s common schema before ingestion. This ensures AI threat events appear in existing dashboards and correlation searches without custom parser work later.

ECS (Elastic Common Schema — Elastic/OpenSearch)

CEF (Common Event Format — ArcSight, generic SIEM)

CEF severity: critical=10, high=8, medium=5, low=3.

CIM (Common Information Model — Splunk)

Map to the Alerts and Intrusion_Detection data models:

Target 1: Microsoft Sentinel

The Sentinel blueprint in this documentation covers the complete setup procedure including Logic App ARM template and KQL analytics rules. This section frames those same mechanics as a reference architecture — the design decisions, not the step-by-step.

Design

Cognisafe fires webhooks at a Logic App (HTTP trigger). The Logic App verifies the HMAC signature and forwards a mapped payload to the Log Analytics Data Collector API, which writes to a custom table CognisafeThreatEvents_CL. Sentinel analytics rules query this table on a schedule and create incidents in the Sentinel incident queue. The Logic App is the right choice here because it requires no infrastructure, handles retries natively, and has a system-assigned managed identity that can write to Log Analytics without storing credentials.

Schema: CognisafeThreatEvents_CL

Analytics rules (KQL)

Critical severity spike — 5 events in 10 minutes per project:
Prompt injection (LLM01) — zero tolerance, single event fires:
New agent name — potential rogue or misconfigured agent:
Sensitive data leakage trend — LLM06 week-over-week increase:

Target 2: Splunk

Architecture

Cognisafe webhook → Event Normaliser → Splunk HTTP Event Collector (HEC). HEC accepts JSON over HTTPS on port 8088. The Event Normaliser maps Cognisafe fields to the CIM schema and sets the sourcetype so Splunk’s field extractions apply automatically.

HEC configuration

Event Normaliser: Splunk HEC output (Python)

Field extractions (props.conf)

Correlation search: Excessive Agency burst


Target 3: Elastic / OpenSearch

Architecture

Cognisafe webhook → Event Normaliser → Logstash HTTP input plugin → Elasticsearch ingest pipeline → index cognisafe-threats-{YYYY.MM} → Kibana detection rules + dashboards.

Logstash pipeline

Index template

ILM policy (hot/warm/cold/delete)

Kibana detection rule


Event enrichment pipeline

Before forwarding to the SIEM, the Event Normaliser should add context that your analysts will need. Do this in the normaliser, not in the SIEM — enrichment logic should be centralised and version-controlled.

Alert severity mapping


Deduplication strategy

A burst of jailbreak attempts from the same agent will generate many events. Without deduplication, this creates alert fatigue. Apply deduplication at two levels: Level 1 — Normaliser (within 5 minutes): Cache event signatures (project_id + agent_name + owasp_category + score_label) in Redis with a 5-minute TTL. Drop duplicate events within the window. Always forward the first event in any burst so the SIEM sees the initial detection. Level 2 — SIEM native deduplication:
  • Sentinel: set “Event grouping: Group all alerts triggered by this rule into a single alert” with grouping by ProjectId and OwaspCategory.
  • Splunk: use dedup in the correlation search or set notable.group_by in the correlationsearches.conf.
  • Elastic: use the event.id field as the document ID in Elasticsearch (document_id => "%{event.id}"), which makes the write idempotent.

Retention policy

Adjust the warm/cold boundary based on your SOC investigation SLA. If active investigations span more than 30 days (common for regulatory enquiries), extend the hot tier.

Compliance use cases

SOC 2 CC7.3 — Security event detection

AI threat events are evidence that automated detection controls are operating. The SIEM query below generates a coverage report suitable for auditor review:

SOC 2 CC7.4 — Incident response

Pair Cognisafe alert data with your ITSM ticket records to evidence response timeliness:
Export the results of both queries as PDFs and store them in your GRC platform (Vanta, Drata, Secureframe, or equivalent) against the CC7.3 and CC7.4 controls. Run this monthly during audit preparation so you have a 12-month evidence trail before the auditor requests it.