Outbound Webhooks
Sub-second delivery of structured JSON. Recommended for real-time SOC alerting.
Log Shipping
Fluentd or Vector tail API pod stdout. Works with any SIEM that has a log collector agent.
PostgreSQL Direct
Point your SIEM’s JDBC/ODBC connector or a scheduled ETL at the
safety_scores table.Method 1: Outbound Webhooks (Recommended)
Configure in the Dashboard
1
Open Webhook Settings
Navigate to Settings → Webhooks → Add Endpoint.
2
Enter Target URL
Provide the HTTPS URL your SIEM or middleware exposes as a receiver. The URL must return HTTP 2xx within 10 seconds.
3
Select Event Types
Choose one or more:
threat_detected, usage_alert, redteam_complete.4
Copy the Signing Secret
After saving, copy the webhook signing secret. You will use it to verify the
X-Cognisafe-Signature header on every delivery.Event Types and Payload Schemas
threat_detected
Fired whenever a safety scorer produces a score_label of fail for any request.
usage_alert
Fired when a project exceeds its monthly request quota or a cost threshold you configure.
redteam_complete
Fired when an automated red-team run finishes.
Signature Verification
Every delivery includes anX-Cognisafe-Signature header containing an HMAC-SHA256 digest of the raw request body, hex-encoded, prefixed with sha256=.
Verification — Python:
Retry Behaviour
If your endpoint returns a non-2xx status or times out (>10s), Cognisafe retries with exponential backoff:
After three failures the event is marked
failed in the webhook delivery log (Settings → Webhooks → Delivery Log). You can manually replay any delivery from that log.

