mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-11-01 07:53:42 +08:00
* fix(ocsf): keep the fallback event context feature-independent With test-support, the fallback EventContext carried a fake sandbox identity, so a binary built with that feature unified in, such as by cargo build --workspace --all-targets, attributed unbound events to a sandbox that does not exist. Producer tests no longer need it: the validator accepts top-level container on its own, and the builder conformance test uses an explicit sandbox context. Signed-off-by: Kris Hicks <khicks@nvidia.com> * test(ocsf): pin builder compile_fail doctests to the missing field The HTTP, Network, Process, and SSH type-state doctests built their EventContext from a struct literal, so a new EventContext field would also make them fail to compile and they would keep passing with the guard removed. Build the context with ctx::ctx() so the missing required field is the only compile error. Signed-off-by: Kris Hicks <khicks@nvidia.com> * refactor(ocsf): share setter macros with type-state builders The HTTP, Network, Process, and SSH builders carry a type-state parameter, so they hand-copied the activity, action, disposition, severity, status, and message setters that the shared macros generate for other builders. Let the macros take an optional state parameter and use them on all four, and route both SSH endpoint setters through one state transition. Signed-off-by: Kris Hicks <khicks@nvidia.com> * docs(ocsf): add type_uid to the Network Activity example OCSF 1.8.0 requires type_uid, so the example that follows the conformance claim failed validation as written. Signed-off-by: Kris Hicks <khicks@nvidia.com> * test(e2e): report the last exec error in the OCSF conformance test The test discarded the result of the exec that generates traffic, so when the exec failed, for example without python3 in the image, the test retried for a minute and then blamed the JSONL copy. Keep the latest exec error and include it in the missing-classes failure. Signed-off-by: Kris Hicks <khicks@nvidia.com> * test(e2e): read the sandbox id label from podman ps JSON Signed-off-by: Kris Hicks <khicks@nvidia.com> --------- Signed-off-by: Kris Hicks <khicks@nvidia.com>