Repository navigation
Commit 4f8ea84
committed
fix(ocsf): emit schema-conformant OCSF events and honest downgrades
Native events failed the official OCSF 1.8.0 validator: device.os lacked
type_id, HTTP Activity emitted is_src_dst_assignment_known, sandbox
Process Activity events had no actor, connection_info lacked
direction_id, and SSH Activity events named no endpoint. Schema tests
missed these because they checked only top-level, non-profile
attributes. The 1.1 and 1.3 downgrade stripped three fields by name and
relabelled events that did not conform.
Add OS type and connection direction enums, require an actor on Process
Activity and an endpoint on SSH Activity at compile time, name the
supervisor's SSH server and domain endpoints with fields every version
accepts, and make schema validation recurse into nested objects, reject
undefined attributes, and honour declared profiles.
Make the downgrade schema-driven from definitions generated from the
vendored official 1.1.0 and 1.3.0 schemas: undefined attributes move
under unmapped.downgraded_attributes, unsupported profiles are dropped,
and an event is labelled with the target only when every requirement
holds. Otherwise it stays at native 1.8.0 and is counted by the gateway
metric openshell_ocsf_log_kept_native_total and a supervisor warning.
Keep it fixed with a Podman e2e test that validates the supervisor's
real JSONL, schemas compiled into test binaries so archived runs need no
source files, a production-like fallback context for producer tests, a
vendored-version guard, and documented schema update steps. Top-level
container stays unchanged pending a decision on #4283.
Closes #4283
Closes #4284
Signed-off-by: Adel Zaalouk <azaalouk@redhat.com>1 parent 834b79a commit 4f8ea84
98 files changed
Lines changed: 27048 additions & 367 deletions
File tree
- crates
- openshell-ocsf
- schemas/ocsf
- v1.1.0
- classes
- objects
- v1.3.0
- classes
- objects
- v1.8.0/objects
- src
- builders
- enums
- events
- format
- objects
- tracing_layers
- validation
- tests
- openshell-sandbox/src
- openshell-server/src
- openshell-supervisor-network/src/policy_dns
- openshell-supervisor-process/src
- openshell-supervisor/src
- docs
- how-it-works/gateways
- observability
- e2e/rust
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments