Repository navigation
fix(ocsf): address follow-ups from the #4288 review - #5020
Merged
Merged
Conversation
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>
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>
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>
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>
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>
Signed-off-by: Kris Hicks <khicks@nvidia.com>
|
🌿 Preview your docs: https://nvidia-preview-pr-5020.docs.buildwithfern.com/openshell |
|
Label |
TaylorMutch
approved these changes
Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix the five findings from the second review round on #4288 that were deferred to a follow-up, plus a Podman 6 failure in the new OCSF conformance e2e test.
Related Issue
Follow-up on #4288; no separate issue.
Changes
EventContextno longer carries a fake sandbox identity undertest-support, so a binary built with the feature unified in does not attribute unbound events to a nonexistent sandbox.compile_faildoctests (review): the HTTP, Network, Process, and SSH type-state doctests build their context withctx::ctx(), so the missing required field is their only compile error.ocsf-json-export.mdxincludes the requiredtype_uid.ocsf_jsonl_conformancereports the last traffic exec error instead of discarding it.ocsf_jsonl_conformancereads the sandbox ID label frompodman ps --format json. Podman 6 renders.Labelsin a format template as a string, so theindextemplate failed and the test never copied records.Testing
openshell-ocsf(including doctests), and the OCSF producer tests inopenshell-supervisor-network,openshell-supervisor-process, andopenshell-serverpass on this branchcompile_faildoctest compiled once its missing setter was added, so the missing field is its only errormise run pre-commitand Podman e2eocsf_jsonl_conformancepass with these commits on top of feat(ocsf): validate OCSF events against exported JSON Schemas #5019; on this branch the e2e test passes clippyChecklist