Skip to content

Commit 56390e5

Browse files
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, and connection_info lacked direction_id. 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 at compile time, set hostname on domain endpoints, 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. 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 56390e5

89 files changed

Lines changed: 26104 additions & 274 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎crates/openshell-ocsf/schemas/ocsf/v1.1.0/VERSION‎

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎crates/openshell-ocsf/schemas/ocsf/v1.1.0/classes/api_activity.json‎

Lines changed: 558 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎crates/openshell-ocsf/schemas/ocsf/v1.1.0/classes/application_lifecycle.json‎

Lines changed: 528 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎crates/openshell-ocsf/schemas/ocsf/v1.1.0/classes/base_event.json‎

Lines changed: 459 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎crates/openshell-ocsf/schemas/ocsf/v1.1.0/classes/detection_finding.json‎

Lines changed: 1005 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎crates/openshell-ocsf/schemas/ocsf/v1.1.0/classes/device_config_state_change.json‎

Lines changed: 616 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎crates/openshell-ocsf/schemas/ocsf/v1.1.0/classes/http_activity.json‎

Lines changed: 1032 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎crates/openshell-ocsf/schemas/ocsf/v1.1.0/classes/network_activity.json‎

Lines changed: 976 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎crates/openshell-ocsf/schemas/ocsf/v1.1.0/classes/process_activity.json‎

Lines changed: 869 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎crates/openshell-ocsf/schemas/ocsf/v1.1.0/classes/ssh_activity.json‎

Lines changed: 1057 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)