Skip to content

Commit a711f9a

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 f68db91 commit a711f9a

57 files changed

Lines changed: 328 additions & 16560 deletions

Some content is hidden

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

‎.gitattributes‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@ python/openshell/_proto/*_pb2.pyi linguist-generated
1010
crates/openshell-core/src/proto/openshell.*.rs linguist-generated
1111

1212
# Vendored OCSF schemas fetched from schema.ocsf.io
13-
crates/openshell-ocsf/schemas/** linguist-generated
1413
crates/openshell-ocsf-validate/schemas/v*/** linguist-generated

‎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)