Architecture overview
Cognisafe webhook payload
Everythreat_detected event sent by Cognisafe has this structure. This is the canonical source — all SIEM field mappings derive from it.
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)
CIM (Common Information Model — Splunk)
Map to theAlerts 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 tableCognisafeThreatEvents_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: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 thesourcetype 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 → indexcognisafe-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
ProjectIdandOwaspCategory. - Splunk: use
dedupin the correlation search or setnotable.group_byin thecorrelationsearches.conf. - Elastic: use the
event.idfield 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.

