Docs

Event Schema v1 & SIEM Mapping (OCSF / ECS)

Every security finding emitted by pisentry on stdout, in output.json_file, over /api/events, and to generic JSON webhooks conforms to Event Schema v1 (docs/event-schema.json).

All attacker-influenced string fields (summary, typed entity strings, and fields values) pass through the central sanitizer (engine.SanitizeEvent) before serialization: C0/C1 control characters, DEL, Unicode bidi overrides, and invalid UTF-8 are neutralized, and strings are bounded on a UTF-8 rune boundary.

Example Event (v1)

{
  "id": "c4f1d2e8-7a3b-4c91-8e2f-19a0b3c4d5e6",
  "schema_version": 1,
  "time": "2026-10-15T05:14:02Z",
  "host": "kubepi",
  "category": "PS08",
  "category_name": "Reverse shell",
  "severity": "critical",
  "mitre": ["T1059.004"],
  "detector": "proc",
  "summary": "Reverse shell: bash (pid 5358) has fd 0 connected to 192.0.2.2:4445",
  "key": "5358:98112",
  "process": {
    "pid": 5358,
    "ppid": 1,
    "start_time": 98112,
    "uid": 0,
    "comm": "bash",
    "exe": "/usr/bin/bash",
    "cmdline": "bash -i"
  },
  "source": {
    "ip": "192.0.2.2",
    "port": 4445
  },
  "user": {
    "uid": 0
  },
  "fields": {
    "cmdline": "bash -i",
    "comm": "bash",
    "exe": "/usr/bin/bash",
    "fd": "0",
    "local": "192.0.2.10:51234",
    "parent": "systemd",
    "pid": "5358",
    "ppid": "1",
    "remote": "192.0.2.2:4445",
    "uid": "0"
  }
}

Typed Entity Groups

EntityFieldTypeDescription
processpidintegerProcess ID
processppidintegerParent process ID
processstart_timeintegerProcess start time in clock ticks since boot (/proc/[pid]/stat field 22)
processuidintegerReal user ID (0 for root)
processcommstringKernel task comm name
processexestringResolved /proc/[pid]/exe target
processcmdlinestringSanitized command line (argv)
sourceipstringSource IP address (or bound/remote socket IP)
sourceportintegerSource or target port (0 to 65535)
usernamestringAccount username
useruidintegerAccount numeric UID
filepathstringHost file path
filehash_beforestringPrevious SHA-256 fingerprint prefix
filehash_afterstringCurrent SHA-256 fingerprint prefix
containeridstringContainer runtime ID
containerpodstringKubernetes pod name
containernamespacestringKubernetes namespace
ruleidstringDetection rule ID or posture check ID
ruletitlestringHuman-readable rule or posture check title

Deprecated fields Keys (v0.1 Compatibility)

To avoid breaking existing jq scripts, alerts, or log pipelines, every fields key from v0.1.0 continues to be emitted in v0.2.0 alongside the new typed entity groups. The following keys in fields are deprecated in v0.2.0 and scheduled for removal in v0.3.0:

Deprecated fields keyDetector(s)Schema v1 replacement
fields.pidproc, listenersprocess.pid (integer)
fields.ppidprocprocess.ppid (integer)
fields.commproc, listenersprocess.comm
fields.exeproc, listenersprocess.exe
fields.cmdlineprocprocess.cmdline
fields.commandauth (sudo)process.cmdline
fields.src_ipauth, portscansource.ip
fields.portlistenerssource.port (integer)
fields.userauth, fimuser.name
fields.uidproc, fimprocess.uid / user.uid (integer)
fields.owner_uidsuiduser.uid (integer)
fields.pathfim, suidfile.path
fields.old_sha256fim, suidfile.hash_before
fields.sha256fim, suidfile.hash_after
fields.checkauditrule.id

Detector-specific context keys (failures, window, users, method, recent_failures, distinct_ports, ports, proto, change, mode, keys, package_manager_active, cpu_percent, reason, fd, local, remote, parent, bit, detail, fix, group, shell, old_shell) remain in fields.

Mapping to OCSF and ECS

For SIEM ingestion without custom guesswork, map Event Schema v1 fields directly to OCSF v1.1+ (Detection Finding, class 2004) or Elastic Common Schema (ECS v8.x):

pisentry v1 fieldOCSF v1.1 (Detection Finding / 2004)Elastic Common Schema (ECS v8.x)
idmetadata.uid / finding_info.uidevent.id
schema_versionmetadata.versionecs.version (custom pisentry.schema_version)
timetime / time_dt@timestamp
hostdevice.hostnamehost.hostname / host.name
categoryfinding_info.analytic.uidrule.category / event.code
category_namefinding_info.analytic.nameevent.action
severityseverity (info=1, low=2, medium=3, high=4, critical=5)event.severity_name (event.severity: 1 to 5)
mitre[]attacks[].technique.uidthreat.technique.id
detectormetadata.product.feature.nameevent.module / event.dataset
summarymessage / finding_info.titlemessage
keyfinding_info.src_url / unmapped.keyevent.Action / pisentry.key
process.pidevidences[].process.pidprocess.pid
process.ppidevidences[].process.parent_process.pidprocess.parent.pid
process.start_timeevidences[].process.created_timeprocess.start
process.uidevidences[].process.user.uidprocess.user.id
process.commevidences[].process.nameprocess.name
process.exeevidences[].process.file.pathprocess.executable
process.cmdlineevidences[].process.cmd_lineprocess.command_line
source.ipevidences[].src_endpoint.ipsource.ip
source.portevidences[].src_endpoint.portsource.port
user.nameevidences[].actor.user.nameuser.name
user.uidevidences[].actor.user.uiduser.id
file.pathevidences[].file.pathfile.path
file.hash_beforeevidences[].file.hashes[0].valuefile.hash.sha256 (previous)
file.hash_afterevidences[].file.hashes[1].valuefile.hash.sha256
container.idevidences[].container.uidcontainer.id
container.podevidences[].pod_uidkubernetes.pod.name
container.namespaceevidences[].namespacekubernetes.namespace
rule.idfinding_info.uidrule.id
rule.titlefinding_info.titlerule.name
fields.*unmapped.*labels.*

Source: docs/event-schema.md