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.

An activity record for a SELECT by lena.okafor: masked, through pg_proxy on core_banking, with the original SQL beside the rewritten SQL that ran, the four reasons (filter to region NE, limit 5,000 rows, SSN redacted, grant held), and the context panel listing principal, database user, client, location, enforcement point, policy, rule, stores, data classes, rows, bytes and duration.
Demo data One decision as InsightAIShield keeps it: the SQL before and after, the reasons and the context.

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 decisionOCSF dispositionstatusCEF severity
allowAllowed (1)Success1
mask, rewriteModified (17)Success3
would block (monitor mode)Logged (16)Success5
blockBlocked (2)Failure7

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.

The SIEM preview in CEF: several lines for masked SELECTs by devon.price and lena.okafor on core_banking customers under the core_customer_pii FILTER rule, one line for a blocked SELECT by support-assistant under ai_agent_data, and an anomaly line for the dormant account tom.becker with its score and reasons.
Demo data The same decisions as CEF lines: masked queries, a blocked AI agent query, and the dormant-account anomaly.

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:

DestinationKindFormatHow it is delivered
SOC Splunk (HEC)Splunk HECOCSFPOST to /services/collector with the HEC token
SOAR webhookWebhookJSONPOST of JSON lines with an HMAC-SHA256 signature header
Security lake (S3)S3OCSFone object per batch in the bank’s security lake bucket
Legacy SIEM (syslog CEF)SyslogCEFUDP 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.

DestinationInsightAIShieldPersonDestinationInsightAIShieldPersonalt[Release][Cancel]Write a batch for a destination1Unexported events, rendered in its format2Batch held, with a preview3Release4Deliver (production only)5Events marked exported, release recorded6Cancel7Nothing sent, events stay unexported8

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.

The SIEM exports page: a held-then-released note, four destinations (legacy SIEM over syslog in CEF, the S3 security lake in OCSF, a SOAR webhook in JSON with one batch held, SOC Splunk HEC in OCSF with one sent), the batches (2 events for the SOAR webhook held with Release and Cancel, 1,569 OCSF events to Splunk sent as a dry run), and an OCSF preview.
Demo data Destinations, batches and an OCSF preview. One batch released as a dry run, one held for a person.

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_sha256 never 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.name joined 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.

Keep reading