Skip to content

Commit

Permalink
introduce common metadata schema (#432)
Browse files Browse the repository at this point in the history
metadata field for incidents
  • Loading branch information
ereteog authored Nov 13, 2023
1 parent 6ecc2c9 commit 580f5d6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ctim/examples/incidents.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
:promotion_method "Manual"
:intended_effect "Extortion"
:scores {:asset 5
:ttp 98}})
:ttp 98}
:meta {:original-description "this description was generated by a very smart algorithm"
:ai-description true}})

(def incident-minimal
{:id "http://ex.tld/ctia/incident/incident-e1b8afdf-e3dd-45d9-961c-dd84f37a8587"
Expand Down
5 changes: 5 additions & 0 deletions src/ctim/schemas/common.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,11 @@
(f/entry :os f/any-str)))
:description "Describes the target of the sighting and contains identifying observables for the target.")

(def-map-type MetaData
(f/optional-entries
(f/entry f/any f/any
:description "custom field relevant to attach meta data to.")))

;; ---- helper fns used by schemas ----

(defn determine-disposition-id
Expand Down
2 changes: 2 additions & 0 deletions src/ctim/schemas/incident.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@
:comment "Was 'time'; renamed for clarity"
:description "Relevant time values associated with this Incident."))
(f/optional-entries
(f/entry :meta c/MetaData
:description "metadata associated to the incident.")
(f/entry :scores IncidentScores
:description "Used to indicate the severity or impact score of the threat represented by the incident.")
(f/entry :status_disposition v/StatusDisposition
Expand Down

0 comments on commit 580f5d6

Please sign in to comment.