Skip to content

Commit

Permalink
unfinished updates #53, #34
Browse files Browse the repository at this point in the history
  • Loading branch information
z-priest committed Oct 19, 2021
1 parent 6143c54 commit a4a4d07
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 20 deletions.
12 changes: 6 additions & 6 deletions src/db/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand All @@ -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" },
Expand All @@ -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" },
Expand All @@ -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" },
Expand Down Expand Up @@ -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"},
],
},
Expand Down Expand Up @@ -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"},
Expand Down
11 changes: 1 addition & 10 deletions src/static/jsedit/common/bundle.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down Expand Up @@ -126,7 +118,6 @@
},
"required": [
"type",
"id",
"spec_version"
"id"
]
}
1 change: 1 addition & 0 deletions src/static/jsedit/grouping.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
1 change: 1 addition & 0 deletions src/static/jsedit/identity.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"type": "string",
"$ref": "#/definitions/industry-sector-ov"
},
"default": ["agriculture"],
"minItems": 1
},
"contact_information": {
Expand Down
4 changes: 3 additions & 1 deletion src/static/jsedit/indicator.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions src/static/jsedit/infrastructure.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"type": "string",
"$ref": "#/definitions/infrastructure-type-ov"
},
"default": ["unknown"],
"minItems": 1
},
"aliases": {
Expand Down
2 changes: 2 additions & 0 deletions src/static/jsedit/intrusion-set.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"type": "string",
"$ref": "#/definitions/attack-motivation-ov"
},
"default": ["accidental"],
"minItems": 1
},
"resource_level": {
Expand All @@ -70,6 +71,7 @@
"type": "string",
"$ref": "#/definitions/attack-motivation-ov"
},
"default": ["accidental"],
"minItems": 1
}
},
Expand Down
4 changes: 4 additions & 0 deletions src/static/jsedit/malware.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"type": "string",
"$ref": "#/definitions/malware-type-ov"
},
"default": ["unknown"],
"minItems": 1
},
"is_family": {
Expand Down Expand Up @@ -80,6 +81,7 @@
"items": {
"$ref": "#/definitions/processor-architecture-ov"
},
"default": ["x86-64"],
"minItems": 1
},
"implementation_languages": {
Expand All @@ -88,6 +90,7 @@
"items": {
"$ref": "#/definitions/implementation-language-ov"
},
"default": ["x86-64"],
"minItems": 1
},
"capabilites": {
Expand All @@ -96,6 +99,7 @@
"items": {
"$ref": "#/definitions/malware-capabilities-ov"
},
"default": ["accesses-remote-machines"],
"minItems": 1
},
"sample_refs": {
Expand Down
1 change: 1 addition & 0 deletions src/static/jsedit/report.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"type": "string",
"$ref": "#/definitions/report-type-ov"
},
"default": ["campaign"],
"minItems": 1
},
"published": {
Expand Down
10 changes: 7 additions & 3 deletions src/static/jsedit/threat-actor.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
"type": "string",
"$ref": "#/definitions/threat-actor-type-ov"
},
"minItems": 1,
"default": 0
"default": ["unknown"],
"minItems": 1
},
"aliases": {
"type": "array",
Expand All @@ -62,6 +62,7 @@
"type": "string",
"$ref": "#/definitions/threat-actor-role-ov"
},
"default": ["agent"],
"minItems": 1
},
"goals": {
Expand Down Expand Up @@ -94,6 +95,7 @@
"type": "string",
"$ref": "#/definitions/attack-motivation-ov"
},
"deafult": ["accidental"],
"minItems": 1
},
"personal_motivations": {
Expand All @@ -103,6 +105,7 @@
"type": "string",
"$ref": "#/definitions/attack-motivation-ov"
},
"deafult": ["accidental"],
"minItems": 1
}
},
Expand Down Expand Up @@ -150,7 +153,8 @@
"spy",
"terrorist",
"unknown"
]
],
"default": 1
},
"attack-resource-level-ov": {
"type": "string",
Expand Down
1 change: 1 addition & 0 deletions src/static/jsedit/tool.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"type": "string",
"$ref": "#/definitions/tool-type-ov"
},
"default": ["unknown"],
"minItems": 1
},
"tool_version": {
Expand Down

0 comments on commit a4a4d07

Please sign in to comment.