Skip to content

Commit

Permalink
update json schemas for latest adoc version
Browse files Browse the repository at this point in the history
  • Loading branch information
rpiazza committed Sep 14, 2024
1 parent b39aa92 commit a809a14
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 269 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
"title": "Event",
"description": "An extension for recording events in STIX.",
"type": "object",
"unevaluatedProperties": false,
"required": [
"extensions"
, "status"
, "type"
"extensions",
"status",
"type"
],
"allOf": [
{
Expand All @@ -33,17 +32,12 @@
}
}
},
"created": {},
"modified": {},
"spec_version": {},
"labels": {},
"external_references": {},
"type": {
"type": "string",
"const": "event"
},
"id": {
"type": "string",
"$ref": "https://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/common/identifier.json",
"pattern": "^event--"
},
"event_types": {
Expand Down Expand Up @@ -131,72 +125,15 @@
"pattern": "^sighting--"
}
},
"subevents": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/Event_Sequence"
}
}
}
}
],
"definitions": {
"Event_Sequence": {
"type": "object",
"additionalProperties": false,
"required": ["event_ref"],
"properties": {
"event_ref": {
"type": "string",
"$ref": "https://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/common/identifier.json",
"pattern": "^event--",
"description": "The event"
},
"sequence_start": {
"type": "boolean",
"description": "If this event is the start of a sequence.",
"default": true
},
"next_steps": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"condition_type",
"event_ref",
"transition_type"
],
"properties": {
"condition_type": {
"type": "string",
"enum": [
"optional",
"required",
"unknown"
]
},
"event_ref": {
"type": "string",
"$ref": "https://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/common/identifier.json",
"pattern": "^event--"
},
"transition_type": {
"type": "string",
"description": "What end-state causes the target to begin",
"enum": [
"completion",
"failure",
"success",
"unknown"
]
}
}
"next_event_refs": {
"type": "array",
"items": {
"$ref": "https://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/common/identifier.json",
"pattern": "^event--"
}
}
},
"unevaluatedProperties": false
}
}
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,22 @@
}
}
},
"events": {
"event_refs": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/Event_Sequence"
"type": "string",
"$ref": "https://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/common/identifier.json",
"pattern": "^event--"
}
},
"tasks": {
"task_refs": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/Task_Sequence"
"type": "string",
"$ref": "https://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/common/identifier.json",
"pattern": "^task--"
}
},
"determination": {
Expand Down Expand Up @@ -134,118 +138,6 @@
}
],
"definitions": {
"Event_Sequence": {
"type": "object",
"additionalProperties": false,
"required": ["event_ref"],
"properties": {
"event_ref": {
"type": "string",
"$ref": "https://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/common/identifier.json",
"pattern": "^event--",
"description": "The event"
},
"sequence_start": {
"type": "boolean",
"description": "If this event is the start of a sequence.",
"default": true
},
"next_steps": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"condition_type",
"event_ref",
"transition_type"
],
"properties": {
"condition_type": {
"type": "string",
"enum": [
"optional",
"required",
"unknown"
]
},
"event_ref": {
"type": "string",
"$ref": "https://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/common/identifier.json",
"pattern": "^event--"
},
"transition_type": {
"type": "string",
"description": "What end-state causes the target to begin",
"enum": [
"completion",
"failure",
"success",
"unknown"
]
}
}
}
}
}
},
"Task_Sequence": {
"type": "object",
"additionalProperties": false,
"required": ["task_ref"],
"properties": {
"task_ref": {
"type": "string",
"$ref": "https://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/common/identifier.json",
"pattern": "^task--",
"description": "The event or task"
},
"sequence_start": {
"type": "boolean",
"description": "If this task is the start of a sequence.",
"default": true
},
"next_steps": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"condition_type",
"task_ref",
"transition_type"
],
"properties": {
"condition_type": {
"type": "string",
"enum": [
"optional",
"required",
"unknown"
]
},
"task_ref": {
"type": "string",
"$ref": "https://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/common/identifier.json",
"pattern": "^task--"
},
"transition_type": {
"type": "string",
"description": "What end-state causes the target to begin",
"enum": [
"completion",
"failure",
"success",
"unknown"
]
}
}
}
}
}
},
"Recoverability": {
"type": "string",
"description": "The scope of impact required to recover from an incident",
Expand All @@ -256,7 +148,7 @@
"extended",
"not-recoverable"
],
"$comment": "This is a closed vocabulary: non-applicable is an addition to what is found on https://us-cert.cisa.gov/incident-notification-guidelines for Incident reports that do not have associated recover costs. For example a phishing email that was detected successfully."
"$comment": "This is a closed vocabulary (enumeration): non-applicable is an addition to what is found on https://us-cert.cisa.gov/incident-notification-guidelines for Incident reports that do not have associated recover costs. For example a phishing email that was detected successfully."
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@
},
{
"properties": {
"created": {},
"modified": {},
"spec_version": {},
"labels": {},
"external_references": {},
"name": {
"type": "string"
},
"extensions": {
"type": "object",
"description": "STIX extensions.",
Expand All @@ -47,9 +39,12 @@
"const": "task"
},
"id": {
"type": "string",
"$ref": "https://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/common/identifier.json",
"pattern": "^task--"
},
"name": {
"type": "string"
},
"changed_objects": {
"type": "array",
"minItems": 1,
Expand Down Expand Up @@ -132,72 +127,14 @@
"minimum": 0,
"maximum": 100
},
"subtasks": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/Task_Sequence"
}
}
}
}
],
"definitions": {
"Task_Sequence": {
"type": "object",
"additionalProperties": false,
"required": ["task_ref"],
"properties": {
"task_ref": {
"type": "string",
"$ref": "https://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/common/identifier.json",
"pattern": "^task--",
"description": "The task"
},
"sequence_start": {
"type": "boolean",
"description": "If this task is the start of a sequence.",
"default": true
},
"next_steps": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"condition_type",
"task_ref",
"transition_type"
],
"properties": {
"condition_type": {
"type": "string",
"enum": [
"optional",
"required",
"unknown"
]
},
"task_ref": {
"type": "string",
"$ref": "https://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/common/identifier.json",
"pattern": "^(event|task)--"
},
"transition_type": {
"type": "string",
"description": "What end-state causes the target to begin",
"enum": [
"completion",
"failure",
"success",
"unknown"
]
}
}
"next_task_refs": {
"type": "array",
"items": {
"$ref": "https://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/common/identifier.json",
"pattern": "^task--"
}
}
}
}
}
}
}
]
}

0 comments on commit a809a14

Please sign in to comment.