Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect sample for 1.1.0 incident_finding #123

Open
frenchy64 opened this issue Dec 23, 2024 · 0 comments
Open

Incorrect sample for 1.1.0 incident_finding #123

frenchy64 opened this issue Dec 23, 2024 · 0 comments

Comments

@frenchy64
Copy link

frenchy64 commented Dec 23, 2024

According to the 1.1.0 schema, incident_finding's priority should be an integer. This changed in later versions but https://schema.ocsf.io/1.1.0/sample/classes/incident_finding returns strings as if it were later versions.

The same problem occurs with the distributor field.

$ curl https://schema.ocsf.io/1.1.0/sample/classes/incident_finding &>/dev/null | jq .priority
"jack"
$ curl https://schema.ocsf.io/1.1.0/sample/classes/incident_finding &>/dev/null | jq .priority
"High"

# the 1.1.0 schema
$ curl https://schema.ocsf.io/1.1.0/api/classes/incident_finding &>/dev/null | bb '(as-> (json/decode (slurp *in*)) % (get % "attributes") (apply merge %) (select-keys % ["priority"]) (println (json/encode % {:pretty true})))'
{
  "priority" : {
    "type" : "integer_t",
    "description" : "The priority, normalized to the caption of the priority_id value. In the case of 'Other', it is defined by the event source.",
    "group" : "context",
    "requirement" : "optional",
    "_source" : "incident_finding",
    "caption" : "Priority",
    "type_name" : "Integer"
  }
}

# changed to string in 1.2.0
$ curl https://schema.ocsf.io/1.2.0/api/classes/incident_finding &>/dev/null | bb '(as-> (json/decode (slurp *in*)) % (get % "attributes") (apply merge %) (select-keys % ["priority"]) (println (json/encode % {:pretty true})))'
{
  "priority" : {
    "type" : "string_t",
    "description" : "The priority, normalized to the caption of the priority_id value. In the case of 'Other', it is defined by the event source.",
    "group" : "context",
    "requirement" : "optional",
    "_source" : "incident_finding",
    "caption" : "Priority",
    "type_name" : "String"
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant