A security operations centre does not want another console. It wants the events in the SIEM it already watches, in a shape its parsers and detection rules already understand, with enough in each event to act on without logging in somewhere else. InsightAIShield decides every query and every AI prompt that passes its enforcement points. This post is about the last step: turning each of those decisions into an OCSF event or a CEF line, getting a batch of them to Splunk, a webhook, S3 or syslog, and making sure nothing leaves without a person saying so. The examples are from Northmere Bank, a fictional bank.
In short
- Three kinds of event. Query decisions, anomalies and AI gateway events, each with its principal, source, policy, rule, decision and data classes.
- Three formats. OCSF 1.1.0 JSON (a query is API Activity, class 6003; an anomaly is a Detection Finding, class 2004), CEF lines, or plain JSON rows.
- Four destinations. Splunk HTTP Event Collector, a signed webhook, an S3 bucket, or syslog over UDP. Credentials are secret references, never values.
- Held, then released. A batch is written held. A person releases it or cancels it. Outside production every release is a dry run: marked sent, nothing delivered.
What a decision record holds
Every statement that reaches an enforcement point, the PostgreSQL or MySQL proxy, the query gateway, or a monitor source reading pgaudit, Snowflake query history, Redshift logs or CloudTrail, produces one activity record. It keeps who ran it (the principal and the database user), from where (client address, country, region, city), what it touched (the stores and the data classes the classifier found in them), what the engine did (allowed, masked, rewritten, blocked, or in monitor mode “would block”), which policy, version and rule decided, the original SQL, the SQL that actually ran, every reason, the rows and bytes returned, the duration, and the anomaly score once the detectors have run.
That record is the source of truth. The SIEM export is a rendering of it, shaped for the tools that will read it, and each exported event carries the record’s identifier, so an analyst in the SIEM can always come back to the full detail.
OCSF: a decision as API Activity
The Open Cybersecurity Schema Framework has no Database Activity class, so InsightAIShield renders a query
decision as API Activity, class 6003 in the Application Activity category (6), with the
database objects in resources. The decision maps to OCSF’s disposition, which is
what most detection content keys on:
| Engine decision | OCSF disposition | status | CEF severity |
|---|---|---|---|
| allow | Allowed (1) | Success | 1 |
| mask, rewrite | Modified (17) | Success | 3 |
| would block (monitor mode) | Logged (16) | Success | 5 |
| block | Blocked (2) | Failure | 7 |
The rest of the event is where an analyst expects it: the principal in actor.user with its
type (human, service, AI agent) and the database account; the client in src_endpoint with
its location; the command in api.operation; the time in milliseconds; and a
metadata.product block naming the product and version. Fields OCSF has no place for (the
enforcement mode, the policy and its version, the rule type, rows, bytes, duration, data classes, the
anomaly score) go in unmapped, under stable names a parser can rely on.
The query text itself travels as a SHA-256 hash in the OCSF event. That lets the SIEM group identical queries, count them and alert on a new one, without copying SQL, which can contain customer identifiers in its WHERE clause, into a second system. The JSON format carries the original SQL text, for a SOAR workflow that needs it.
Anomalies export as OCSF Detection Finding events, class 2004, with the title, the
detector, every reason joined into the description, the score as risk_score, the severity
and the status. AI gateway events, prompts, responses and tool calls that were masked or blocked, export as
API Activity with the agent as the actor, the model or tool as the service, and the entities found.
CEF: one line per decision
Plenty of SOCs still run on syslog and CEF, and a CEF line is easy to grep. InsightAIShield writes the
standard header (vendor, product, version, a signature ID such as shield.query.mask, a name
and the severity) and an extension with the usual keys: suser for the principal,
duser for the database account, src, act for the decision, and
labelled custom strings for the policy, rule, stores, data classes and source, plus rows and duration as
custom numbers. Pipes, equals signs and line breaks are escaped as CEF requires.
Four destinations, and the credentials stay out
Northmere sends to four places, which is typical of a bank in the middle of a SIEM migration:
| Destination | Kind | Format | How it is delivered |
|---|---|---|---|
| SOC Splunk (HEC) | Splunk HEC | OCSF | POST to /services/collector with the HEC token |
| SOAR webhook | Webhook | JSON | POST of JSON lines with an HMAC-SHA256 signature header |
| Security lake (S3) | S3 | OCSF | one object per batch in the bank’s security lake bucket |
| Legacy SIEM (syslog CEF) | Syslog | CEF | UDP syslog, one CEF line per event |
Each destination names its secret, the HEC token or the webhook signing key, by reference to the secret store. Pasting a token into the form is refused. A destination can also filter: a SOAR webhook that only wants blocks and would-blocks gets only those.
Held, then released
Sending security events is sending data out of the product, and it gets the same treatment as every other outbound message in InsightAIShield: it is held until a person releases it.
A batch is written held. Only a person’s release sends it, and outside production the release is a dry run.
Writing a batch collects the events the destination has never received (up to 2,000 query decisions at a time, plus open anomalies and the AI events the gateway masked or blocked), renders them, and stores the batch held with a preview. A person reads it and releases it, or cancels it. On release the events are marked exported, so the next batch starts where this one ended, and the release is recorded with who released it and what the destination answered.
Outside production every release is a dry run: the batch is marked sent with a note, and nothing leaves
the building. Delivery is switched on in production with SHIELD_SIEM_LIVE=1. That is what
the demo shows: a batch of 1,569 OCSF events to Splunk released as a dry run, and a batch of 2 JSON
events for the SOAR webhook still held.
Detections worth writing on these events
Once the events are in the SIEM, the useful detections are short, because the hard part, deciding what each query did to sensitive data, has already happened:
- Blocked then allowed. A principal with several blocked events followed by an allowed one on the same store within the hour: someone probing the policy until something works.
- Would-block in monitor mode. Disposition Logged (16) on a store you plan to enforce: the list of people who will be refused when you switch the policy from monitor to enforce.
- New query hash on sensitive data. A
query_sha256never seen before, reading card numbers or SSNs, from a service account whose queries are normally a fixed set. - AI agents and modified responses. AI events from one agent where the disposition is Modified or Blocked, trending up: the agent is being fed customer identifiers.
- Findings joined to identity. Detection Findings by
actor.user.namejoined to your identity provider’s sign-in events for the same person.
Keep the analyst’s path short: the event’s identifier opens the record in InsightAIShield, with the original and rewritten SQL and every reason.
Where this fits the evidence
PCI DSS requirement 10.2.1 asks that audit logs capture access to cardholder data, and 10.4.1 that they be reviewed. InsightAIShield’s compliance view counts the queries recorded and blocked in the last 30 days, the enforcement and monitor points, the anomalies scored, the SIEM destinations and the batches sent. In the demo 10.2.1 is met, and 10.4.1 is partial because one high anomaly is still open. Sending the batches is part of what moves it.
Decide once, close to the data. Then tell the SOC in its own language.
The engine knows what each query did to which sensitive column. The SIEM knows everything else about that person and that machine. OCSF and CEF events with stable fields, released deliberately, are how the two meet.
Where people stay in charge
- A batch is written held; a person releases it or cancels it, and the release is recorded with their name.
- Every agent action is capped at L2, “ask first”: an agent prepares, and a person confirms, activates, revokes, sends or decides.
- A policy version goes live only when a second lead, not the person who proposed it, approves it.
- A revocation is proposed by one reviewer and approved by another; the REVOKE statement is kept on the record for your DBA to run.
- Detokenizing needs a stated purpose, is recorded, and is capped per person per period.
- SIEM batches and attestation requests are held until a person releases them.