Events and audit log
JSON schema of usage events, HMAC integrity chain, Windows DLPIA/Security log, local retention and SIEM export. No sensitive value is ever stored.
The agent emits metadata events for every intercepted request to an AI service. Each event describes the action without ever carrying the prompt content, the detected values, or a plain-text file name.
Events live in a page-encrypted SQLite database, events.dat, chained by HMAC fingerprint. Any deletion or change is detectable, even by a local administrator.
Usage event schema
Every intercepted request produces an event of type usage. The body is a stable JSON, versioned by the applied policy and catalog.
{
"id": "018f3b2a-7c6d-7e4a-9f12-0a1b2c3d4e5f",
"seq": 48213,
"ts": "2026-10-18T09:42:11.837Z",
"user_sid": "h:7a1c…",
"session_id": "s-42",
"channel": "web",
"service_id": "openai-chat",
"process_image": "msedge.exe",
"process_signer": "Microsoft Corporation",
"request_kind": "prompt",
"size_bytes": 1842,
"file_count": 1,
"file_types": [{ "extension": "pdf", "size": 184320 }],
"entities": {
"pii.email": { "count": 2, "max_score": 9820, "severity": "high", "exposed": 0 },
"pii.iban": { "count": 1, "max_score": 9910, "severity": "high", "exposed": 0 }
},
"outcome": "obfuscated",
"bypass_reason": null,
"bypass_text": null,
"analysis_ms": 54,
"decision_ms": 2180,
"policy_version": "p-2026-10-14",
"catalog_version": "c-2026-10-11",
"model_versions": { "pii": "1.4.2", "health": "0.9.1" },
"prev_hash": "b5e1…",
"hash": "a7c2…"
}Event body fields
| Field | Type | Description |
|---|---|---|
id | UUIDv7 | Unique event identifier, time-ordered. |
seq | integer | Local sequence number, continuous within a chain. |
ts | ISO 8601 UTC | Production timestamp, millisecond precision. |
user_sid | string | Windows SID; pseudonymised to h:<hmac> depending on reporting settings. |
session_id | string | Windows session of the user. |
channel | enum | web, desktop, api, code_assistant, internal. |
service_id | string | AI service id in the catalog. |
process_image | string | Originating executable name, path stripped. |
process_signer | string | Authenticode publisher if the process is signed. |
request_kind | enum | prompt, upload, websocket. |
size_bytes | integer | Total request size in bytes. |
file_count | integer | Number of attached files. |
file_types | array | Per file: normalised extension and size. |
entities | object | Per detected category: count, max score, severity, exposed count. |
outcome | enum | Request outcome (see dedicated table). |
bypass_reason | string | Identifier of the reason picked by the user. |
bypass_text | string | Free justification, after entity replacement (redacted). |
analysis_ms | integer | Detection library analysis time. |
decision_ms | integer | Time between dialog opening and decision. |
policy_version | string | Applied policy version. |
catalog_version | string | Applied catalog version. |
model_versions | object | Version of each BLOB model loaded for analysis. |
prev_hash | string | HMAC of the previous event in the chain. |
hash | string | HMAC of this event, sealing the chain. |
Possible outcome values
| Value | Meaning | Request sent? |
|---|---|---|
clean | No sensitive data detected. | Yes |
obfuscated | Entities replaced by their label. | Yes |
auto_obfuscated | Automatic obfuscation, no user decision. | Yes |
edited | User manually edited the prompt. | Yes |
bypassed | Sent in clear after user justification. | Yes |
cancelled | User cancelled the request. | No |
blocked | Policy blocked with no user option. | No |
timeout | Decision dialog timed out. | No |
client_aborted | Client application closed the connection. | No |
analysis_failed_open | Analysis impossible, fail-open rule: allowed. | Yes |
analysis_failed_closed | Analysis impossible, fail-closed rule: blocked. | No |
not_inspectable | Flow not inspectable (pinning, end-to-end encryption). | Yes |
observed | Channel in observation mode: traced, not blocked. | Yes |
remembered | Memorised choice reapplied identically. | Yes / No |
Other event types
config_changed— effective configuration changed: source, version, list of changed paths. No values.config_rejected— configuration or catalog document refused: source and reason.tamper— tampering detected: kind, short detail, severity.lifecycle— start, stop, update, rollback, uninstall in progress.sync— integrity anchor sent to the server.data_loss— forced purge: number of lost events and covered period.
HMAC integrity chain
Each event carries two fingerprints that bind the database to its past.
hash = HMAC-SHA-256(
integrity_key,
prev_hash || canonical_json(event_without_hash)
)- Integrity key: per-device HMAC-SHA-256 key, wrapped by the TPM or machine-scope DPAPI.
- Chaining:
prev_hashis the previous event's hash. Breaking the chain is detected. - Anchors: every hour and on each upload, a signed
(seq, hash)pair is sent to the server. - Verification: at startup and every 24 h, the agent re-verifies the chain from the last anchor.
Windows DLPIA/Security log
In parallel with internal storage, the agent writes a subset of events into a dedicated Windows ETW channel, DLPIA/Security, declared by the manifest installer/etw/dlpia.man.
- Provider:
DLP-IA-Security· GUID{A7C3D2E1-1F4B-4C8A-9E6D-2B3C4D5E6F70}. - Channel:
DLPIA/Security, Admin type, value 16. - Template: every entry carries a redacted
Detailand a business severity from 0 (Low) to 3 (Critical). - Clients collect the channel with Windows Event Forwarding, the Microsoft Sentinel agent or the Splunk Universal Forwarder.
Windows event ids
| Id | Symbol | Level | Meaning |
|---|---|---|---|
| 1001 | LifecycleStarted | Information | Agent started. |
| 1002 | LifecycleStopped | Information | Agent stopped. |
| 1003 | LifecycleAbnormal | Error | Abnormal stop detected. |
| 1004 | LifecycleUpdated | Information | Agent updated. |
| 1005 | LifecycleRolledBack | Warning | Agent rolled back to previous version. |
| 1006 | LifecycleUninstall | Information | Uninstall in progress. |
| 2001 | UsageBypassed | Error | User bypass, reported within 5 s. |
| 2002 | UsageBlocked | Warning | Request blocked by policy. |
| 2003 | UsageObfuscated | Information | Request obfuscated or edited. |
| 2004 | UsageCancelled | Information | Request cancelled by the user. |
| 3001 | ConfigChanged | Information | Effective configuration changed. |
| 3002 | ConfigRejected | Error | Configuration or catalog document refused. |
| 4001 | TamperCaRemoved | Critical | Local CA removed from the store. |
| 4002 | TamperWfpRemoved | Critical | WFP filters removed. |
| 4003 | TamperDriverUnloaded | Critical | Driver unloaded. |
| 4004 | TamperServiceKilled | Critical | Service force-stopped. |
| 4005 | TamperExtensionMissing | Critical | Browser extension missing. |
| 4006 | TamperBrowserPolicy | Critical | Browser policy removed. |
| 4007 | TamperHostsRedirect | Critical | Hosts file redirect detected. |
| 4008 | TamperConfigSignature | Critical | Invalid configuration signature. |
| 4009 | TamperIntegrityChain | Critical | Integrity chain broken. |
| 4010 | TamperBinaryModified | Critical | Agent binary modified. |
| 4011 | TamperClockRollback | Critical | System clock rolled back. |
| 5001 | ModelUnavailable | Warning | Detection model unavailable. |
| 5002 | DataLoss | Error | Events lost before upload. |
| 5003 | StoreReset | Warning | Event database reset. |
| 6001 | UnknownAiEndpoint | Information | AI endpoint discovered outside the catalog. |
| 7001 | AdminAction | Information | Administrative action. |
ETW manifest compilation
# Generate the message header and resources (WDK/SDK required)
mc.exe -um installer\etw\dlpia.man -r installer\etw\gen -h installer\etw\gen
rc.exe installer\etw\gen\dlpia.rc
# Register the channel (admin; binary carrying the resources)
wevtutil im installer\etw\dlpia.man `
/rf:"%ProgramFiles%\DLP-IA\dlpia-svc.exe" `
/mf:"%ProgramFiles%\DLP-IA\dlpia-svc.exe"Local retention
| Limit | Default | Behaviour |
|---|---|---|
| Age | 90 days | Purges older events except those not yet uploaded. |
| Size | 2 GB | FIFO purge of the oldest already uploaded. |
| Both | First limit reached | Triggers the purge. |
| Not uploaded | Preserved | If size forces a purge, a data_loss event is produced. |
Both limits are configurable, from 1 to 3650 days and up to the disk size. Low-storage endpoints shrink the window to 30 days.
Server-side retention
| Type | Default | Configurable range |
|---|---|---|
| Raw events | 365 days | 1 to 3650 days |
| Daily aggregates | 1095 days | 90 to 3650 days |
| Alerts | 730 days | 30 to 3650 days |
| Audit log | 3650 days | Not reducible |
SIEM export
Beyond the Windows channel, the agent and the server can export to an external SIEM. The configured pseudonymisation level applies to all exports.
| Format | Transport | Source |
|---|---|---|
| Syslog RFC 5424 | TCP TLS, port 6514 | Agent or server. |
| OCSF | JSON over HTTPS | Server, via connector. |
| Splunk HEC | HTTPS, header Authorization: Splunk <token> | Server. |
| Microsoft Sentinel | Microsoft Monitoring Agent | Agent via the ETW channel. |
| Google Chronicle | JSON over HTTPS | Server, via connector. |
{
"time": "2026-10-18T09:42:11.837Z",
"severity": "high",
"activity_name": "ai_prompt_obfuscated",
"class_name": "Data Security Finding",
"category_name": "Findings",
"actor": { "user": { "uid_alt": "h:7a1c…" } },
"process": { "name": "msedge.exe", "publisher": "Microsoft Corporation" },
"network": { "application": "openai-chat", "channel": "web" },
"finding": { "types": ["pii.email", "pii.iban"], "exposed": 0, "count": 3 },
"metadata": { "product": "MaelGard", "version": "2026.10" }
}Pseudonymisation
| Level | Reported identity | Re-identification |
|---|---|---|
| Nominative | SID, UPN, machine name | Direct. |
| Pseudonymised (recommended default) | HMAC-SHA-256(client_key, UPN) and same for machine | Only by the key holder, following a documented procedure. |
| Anonymous | No identity, only organisational unit or group | Impossible. |
Redaction of text fields
- The
bypass_textfield comes from the user, but the service replaces each detected entity before storing. - The
Detailfield of the Windows channel is redacted by the logging layer: no value crosses it. - File names are never written: only the extension (10 ASCII characters, otherwise
other) and size are stored. - An automated test injects marker values and checks their absence at every log level, including
trace.