Architecture
CognisafeThreatEvents_CL schema, and forwards to the Log Analytics Data Collector API. No custom code deployment is required — all logic lives in the Logic App definition.
This integration uses the classic Log Analytics Data Collector API (HTTP Data Collector) which is GA and broadly available. Microsoft’s newer DCE/DCR pipeline is also supported; see the Tip at the end of Step 3 if you prefer it.
Step 1: Create a Log Analytics Workspace
Step 2: Create the Custom Table
Custom log tables in Log Analytics end with_CL. The schema below matches the Cognisafe threat_detected webhook payload.
Step 3: Logic App Webhook Receiver
Create the Logic App
az deployment group create):
Step 4: Sentinel Analytics Rules
Create these rules in Microsoft Sentinel → Analytics → Create → Scheduled query rule.Rule 1 — Critical Severity Spike
Fires when more than 5 critical events occur within any 10-minute window across a single project.- Query frequency: every 5 minutes
- Lookup period: 10 minutes
- Alert threshold: results > 0
- Incident grouping: group by
ProjectId
Rule 2 — LLM01 Prompt Injection Detected
Fires on any single detection of prompt injection regardless of severity — zero tolerance.- Query frequency: every 5 minutes
- Lookup period: 5 minutes
- Alert threshold: results > 0
- Severity: High
- Tactics: InitialAccess, Execution
Rule 3 — New Agent Name Appearing (Potential Rogue Agent)
Detects anAgentName that has not been seen in the previous 7 days — a signal that an unregistered or rogue agent is active.
- Query frequency: every 1 hour
- Lookup period: 1 day
- Alert threshold: results > 0
- Severity: Medium
- Tactics: Discovery, Persistence
Step 5: Sentinel Workbook
Create a new Workbook in Microsoft Sentinel → Workbooks → Add workbook and paste these query tiles.Threats by OWASP Category (Pie Chart)
OwaspCategory, Value = Count.
Threat Timeline (Line Chart)
TimeGenerated, Y = Threats, Split = Severity.
Top Flagged Agents (Bar Chart)
AgentName, Y = TotalThreats.
Incident Enrichment
Add the CognisafeRunId and ReportUrl to Sentinel incidents via a Playbook (Logic App triggered on incident creation):

