diff --git a/src/db/schema.ts b/src/db/schema.ts index 719bb357..ac182824 100644 --- a/src/db/schema.ts +++ b/src/db/schema.ts @@ -26,7 +26,7 @@ export const schema: ISchemaFile = { properties: [ { name: "id_", type: "String", mandatory: true, notNull: true, collate: "default" }, { name: "type", type: "String", mandatory: true, notNull: true, collate: "default" }, - { name: "spec_version", type: "String", mandatory: true, notNull: true, collate: "default" }, + { name: "spec_version", type: "String", mandatory: true, notNull: true, collate: "default", default: "2.1" }, { name: "created_by_ref", type: "String", collate: "default" }, { name: "created", type: "DateTime", mandatory: true, notNull: true, collate: "default" }, { name: "modified", type: "DateTime", mandatory: true, notNull: true, collate: "default" }, @@ -45,7 +45,7 @@ export const schema: ISchemaFile = { properties: [ { name: "id_", type: "String", mandatory: true, notNull: true, collate: "default" }, { name: "type", type: "String", mandatory: true, notNull: true, collate: "default" }, - { name: "spec_version", type: "String", collate: "default", default: "2.1" }, + // { name: "spec_version", type: "String", collate: "default", default: "2.1" }, { name: "object_marking_refs", type: "EmbeddedList", collate: "default" }, { name: "granular_markings", type: "EmbeddedList", collate: "default" }, { name: "extensions", type: "EmbeddedMap", collate: "default" }, @@ -58,7 +58,7 @@ export const schema: ISchemaFile = { properties: [ { name: "id_", type: "String", mandatory: true, notNull: true, collate: "default" }, { name: "type", type: "String", mandatory: true, notNull: true, collate: "default" }, - { name: "spec_version", type: "String", mandatory: true, notNull: true, collate: "default" }, + { name: "spec_version", type: "String", mandatory: true, notNull: true, collate: "default", default: "2.0" }, { name: "created_by_ref", type: "String", collate: "default" }, { name: "created", type: "DateTime", mandatory: true, notNull: true, collate: "default" }, { name: "modified", type: "DateTime", mandatory: true, notNull: true, collate: "default" }, @@ -84,7 +84,7 @@ export const schema: ISchemaFile = { properties: [ { name: "id_", type: "String", mandatory: true, notNull: true, collate: "default" }, { name: "type", type: "String", mandatory: true, notNull: true, collate: "default" }, - { name: "spec_version", type: "String", mandatory: true, notNull: true, collate: "default" }, + { name: "spec_version", type: "String", mandatory: true, notNull: true, collate: "default", default: "2.1" }, { name: "created_by_ref", type: "String", collate: "default" }, { name: "created", type: "DateTime", mandatory: true, notNull: true, collate: "default" }, { name: "modified", type: "DateTime", mandatory: true, notNull: true, collate: "default" }, @@ -373,7 +373,7 @@ export const schema: ISchemaFile = { properties: [ { name: "name", type: "String", collate: "default" }, { name: "description", type: "String", collate: "default" }, - { name: "context", type: "String", mandatory: true, notNull: true, collate: "default"}, + { name: "context", type: "String", mandatory: true, notNull: true, collate: "default" }, { name: "object_refs", type: "EmbeddedList", mandatory: true, notNull: true, collate: "default"}, ], }, @@ -706,7 +706,7 @@ export const schema: ISchemaFile = { properties: [ { name: "name", type: "String", mandatory: true, notNull: true, collate: "default" }, { name: "description", type: "String", collate: "default" }, - { name: "threat_actor_types", type: "EmbeddedList", mandatory: true, notNull: true, collate: "default"}, + { name: "threat_actor_types", type: "EmbeddedList", mandatory: true, notNull: true, collate: "default", default: 1}, { name: "aliases", type: "EmbeddedList", collate: "default" }, { name: "first_seen", type: "DateTime", collate: "default"}, { name: "last_seen", type: "DateTime", collate: "default"}, diff --git a/src/static/jsedit/common/bundle.json b/src/static/jsedit/common/bundle.json index 4df11653..9c6b885a 100644 --- a/src/static/jsedit/common/bundle.json +++ b/src/static/jsedit/common/bundle.json @@ -23,14 +23,6 @@ "bundle" ] }, - "spec_version": { - "type": "string", - "enum": [ - "2.0", - "2.1" - ], - "description": "The version of the STIX specification used to represent the content in this bundle." - }, "objects": { "type": "array", "description": "Specifies a set of one or more STIX Objects.", @@ -126,7 +118,6 @@ }, "required": [ "type", - "id", - "spec_version" + "id" ] } diff --git a/src/static/jsedit/grouping.json b/src/static/jsedit/grouping.json index 8f3cd1ec..e5cc30a1 100644 --- a/src/static/jsedit/grouping.json +++ b/src/static/jsedit/grouping.json @@ -30,6 +30,7 @@ "context": { "type": "string", "description": "A short description of the particular context shared by the content referenced by the Grouping.", + "default": "unspecified", "$ref": "#/definitions/grouping-context-ov" }, "object_refs": { diff --git a/src/static/jsedit/identity.json b/src/static/jsedit/identity.json index 418ac1d6..bf834747 100644 --- a/src/static/jsedit/identity.json +++ b/src/static/jsedit/identity.json @@ -48,6 +48,7 @@ "type": "string", "$ref": "#/definitions/industry-sector-ov" }, + "default": ["agriculture"], "minItems": 1 }, "contact_information": { diff --git a/src/static/jsedit/indicator.json b/src/static/jsedit/indicator.json index e966bcab..68372f67 100644 --- a/src/static/jsedit/indicator.json +++ b/src/static/jsedit/indicator.json @@ -34,12 +34,14 @@ "type": "string", "$ref": "#/definitions/indicator-type-ov" }, + "default": ["unknown"], "minItems": 1 }, "pattern": { "type": "string", "description": "The detection pattern for this Indicator MAY be expressed as a STIX Pattern as specified in section 9 or another appropriate language such as SNORT, YARA, etc.", - "format": "textarea" + "format": "textarea", + "default": "empty" }, "pattern_type": { "type": "string", diff --git a/src/static/jsedit/infrastructure.json b/src/static/jsedit/infrastructure.json index 70ba8c09..5ff71e80 100644 --- a/src/static/jsedit/infrastructure.json +++ b/src/static/jsedit/infrastructure.json @@ -34,6 +34,7 @@ "type": "string", "$ref": "#/definitions/infrastructure-type-ov" }, + "default": ["unknown"], "minItems": 1 }, "aliases": { diff --git a/src/static/jsedit/intrusion-set.json b/src/static/jsedit/intrusion-set.json index 84ef4952..9f0598a6 100644 --- a/src/static/jsedit/intrusion-set.json +++ b/src/static/jsedit/intrusion-set.json @@ -51,6 +51,7 @@ "type": "string", "$ref": "#/definitions/attack-motivation-ov" }, + "default": ["accidental"], "minItems": 1 }, "resource_level": { @@ -70,6 +71,7 @@ "type": "string", "$ref": "#/definitions/attack-motivation-ov" }, + "default": ["accidental"], "minItems": 1 } }, diff --git a/src/static/jsedit/malware.json b/src/static/jsedit/malware.json index 51f49780..684031e0 100644 --- a/src/static/jsedit/malware.json +++ b/src/static/jsedit/malware.json @@ -34,6 +34,7 @@ "type": "string", "$ref": "#/definitions/malware-type-ov" }, + "default": ["unknown"], "minItems": 1 }, "is_family": { @@ -80,6 +81,7 @@ "items": { "$ref": "#/definitions/processor-architecture-ov" }, + "default": ["x86-64"], "minItems": 1 }, "implementation_languages": { @@ -88,6 +90,7 @@ "items": { "$ref": "#/definitions/implementation-language-ov" }, + "default": ["x86-64"], "minItems": 1 }, "capabilites": { @@ -96,6 +99,7 @@ "items": { "$ref": "#/definitions/malware-capabilities-ov" }, + "default": ["accesses-remote-machines"], "minItems": 1 }, "sample_refs": { diff --git a/src/static/jsedit/report.json b/src/static/jsedit/report.json index 8f2c43ed..23c7af90 100644 --- a/src/static/jsedit/report.json +++ b/src/static/jsedit/report.json @@ -34,6 +34,7 @@ "type": "string", "$ref": "#/definitions/report-type-ov" }, + "default": ["campaign"], "minItems": 1 }, "published": { diff --git a/src/static/jsedit/threat-actor.json b/src/static/jsedit/threat-actor.json index aba6de76..0b4eccf2 100644 --- a/src/static/jsedit/threat-actor.json +++ b/src/static/jsedit/threat-actor.json @@ -34,8 +34,8 @@ "type": "string", "$ref": "#/definitions/threat-actor-type-ov" }, - "minItems": 1, - "default": 0 + "default": ["unknown"], + "minItems": 1 }, "aliases": { "type": "array", @@ -62,6 +62,7 @@ "type": "string", "$ref": "#/definitions/threat-actor-role-ov" }, + "default": ["agent"], "minItems": 1 }, "goals": { @@ -94,6 +95,7 @@ "type": "string", "$ref": "#/definitions/attack-motivation-ov" }, + "deafult": ["accidental"], "minItems": 1 }, "personal_motivations": { @@ -103,6 +105,7 @@ "type": "string", "$ref": "#/definitions/attack-motivation-ov" }, + "deafult": ["accidental"], "minItems": 1 } }, @@ -150,7 +153,8 @@ "spy", "terrorist", "unknown" - ] + ], + "default": 1 }, "attack-resource-level-ov": { "type": "string", diff --git a/src/static/jsedit/tool.json b/src/static/jsedit/tool.json index a5dec0bc..912cff69 100644 --- a/src/static/jsedit/tool.json +++ b/src/static/jsedit/tool.json @@ -34,6 +34,7 @@ "type": "string", "$ref": "#/definitions/tool-type-ov" }, + "default": ["unknown"], "minItems": 1 }, "tool_version": {