Skip to content

fix(ocsf): make exported events valid and attributable - #3103

Open
krishicks wants to merge 1 commit into
hicks/push-qkprrpqmxulufrom
hicks/push-onytvlvvyoxs
Open

fix(ocsf): make exported events valid and attributable#3103
krishicks wants to merge 1 commit into
hicks/push-qkprrpqmxulufrom
hicks/push-onytvlvvyoxs

Conversation

@krishicks

@krishicks krishicks commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Correct the OCSF fields emitted for API decisions and event identity.

Exported OCSF records are now schema-valid and can be reliably attributed. Gateway-origin records identify the configured gateway and emitting replica, while sandbox identity remains attached to the affected container and every event receives its own unique ID.

API activity records retain their action and disposition when consumed and re-exported. Events also include the required device classification and omit empty container or image objects instead of reporting misleading identities.

Summary

  • Deserialize action_id and disposition_id on ApiActivityEvent so round trips preserve the recorded decision.
  • Emit the schema-required device.type_id and its sibling label.
  • Identify gateway-origin events as the gateway rather than the sandbox they concern. Emit the operator-assigned gateway name as device.name and the per-replica identity as both device.uid and hostname.
  • Generate a distinct metadata.uid for each event, keep sandbox identity in container.uid, and omit empty container and image objects.

Related Issue

Refs #1055

Changes

Testing

  • mise run pre-commit passes
  • Unit tests added/updated
  • E2E tests added/updated (if applicable)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

@krishicks
krishicks force-pushed the hicks/push-onytvlvvyoxs branch 2 times, most recently from 591b77a to 38e79b1 Compare September 2, 2026 22:08
@krishicks
krishicks force-pushed the hicks/push-onytvlvvyoxs branch from 38e79b1 to dd3657c Compare September 2, 2026 23:32
@krishicks krishicks changed the title fix(ocsf): correct event schema conformance and origin identity fix(ocsf): make exported events valid and attributable Sep 3, 2026
Exported OCSF records are now schema-valid and can be reliably attributed.
Gateway-origin records identify the configured gateway and emitting replica,
while sandbox identity remains attached to the affected container and every
event receives its own unique ID.

API activity records retain their action and disposition when consumed and
re-exported. Events also include the required device classification and omit
empty container or image objects instead of reporting misleading identities.

Refs #1055

Signed-off-by: Kris Hicks <khicks@nvidia.com>
@krishicks
krishicks force-pushed the hicks/push-onytvlvvyoxs branch from dd3657c to c493338 Compare September 3, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant