-
I am working on a OCSF producer and I found that the online tool /api/v2/validate to validate JSON against the schema produces an error related to malware[0].classification_ids. I think the JSON is correct but the JSON does not validate. I am doing something wrong?
I get the following error:
Is this a problem with the schema or with the validator? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Trying other methods of validation: Using the schema for detection finding at https://schema.ocsf.io/schema/1.2.0/classes/detection_finding?profiles= and the event JSON you have above, validation passes when I try them out together in https://www.jsonschemavalidator.net/ I also found that this event passes the "v1" validation endpoint on the schema server at That makes me think this is possibly an issue with the validation logic in the schema server in the v2 endpoint? cc: @rmouritzen-splunk |
Beta Was this translation helpful? Give feedback.
-
This is (almost certainly) a gap in the v2 validation logic. I don't think it's handling arrays of enumerations. @erikloman Your event's malware classification_ids value looks correct, so you're good. I'm going to Thanks! |
Beta Was this translation helpful? Give feedback.
-
@erikloman The public OCSF Server (https://schema.ocsf.io/) has been updated with a fix to the v2 validation APIs that addresses this problem. Thanks for pointing this out! |
Beta Was this translation helpful? Give feedback.
Trying other methods of validation:
Using the schema for detection finding at https://schema.ocsf.io/schema/1.2.0/classes/detection_finding?profiles= and the event JSON you have above, validation passes when I try them out together in https://www.jsonschemavalidator.net/
I also found that this event passes the "v1" validation endpoint on the schema server at
/api/validate
.That makes me think this is possibly an issue with the validation logic in the schema server in the v2 endpoint? cc: @rmouritzen-splunk