Skip to content

Commit c3c8114

Browse files
committed
test(ocsf): validate OCSF events with openshell-ocsf-validate
Replace openshell-ocsf's hand-written schema walker with openshell-ocsf-validate in the builder, producer, gateway audit and Podman e2e tests. One validate_event call now covers what the per-object validate_required_fields, validate_known_fields and validate_enum_value calls checked, and adds type checks and enum checks for every attribute. Remove the validation module and the vendored OCSF object and class schemas from openshell-ocsf. The e2e suite no longer depends on openshell-ocsf directly. Signed-off-by: Kris Hicks <khicks@nvidia.com>
1 parent 0301e5b commit c3c8114

56 files changed

Lines changed: 328 additions & 16559 deletions

Some content is hidden

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

‎Cargo.lock‎

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

‎crates/openshell-ocsf/Cargo.toml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ license.workspace = true
1111
repository.workspace = true
1212

1313
[features]
14-
# Share vendored-schema assertions with producer regression tests.
14+
# Share OCSF event capture and a sandbox test context with producer tests.
1515
test-support = []
1616

1717
[dependencies]
@@ -24,6 +24,7 @@ uuid = { workspace = true }
2424
tracing-subscriber = { workspace = true }
2525

2626
[dev-dependencies]
27+
openshell-ocsf-validate = { path = "../openshell-ocsf-validate" }
2728
tracing-subscriber = { workspace = true, features = ["env-filter", "json"] }
2829

2930
[lints]

‎crates/openshell-ocsf/schemas/ocsf/README.md‎

Lines changed: 0 additions & 112 deletions
This file was deleted.

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

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)