From 94638841706b3706b61e01cd270cf1127f51f9f2 Mon Sep 17 00:00:00 2001 From: Emmanuelle Vargas-Gonzalez Date: Tue, 28 Jan 2020 13:19:23 -0500 Subject: [PATCH] add optional "name" StringProperty to MarkingDefinition update TLP_* v21 constants according to spec --- stix2/v21/common.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stix2/v21/common.py b/stix2/v21/common.py index 4a71308..cf3a3b3 100644 --- a/stix2/v21/common.py +++ b/stix2/v21/common.py @@ -150,6 +150,7 @@ class MarkingDefinition(_STIXBase, _MarkingsMixin): ('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))), ('granular_markings', ListProperty(GranularMarking)), ('definition_type', StringProperty(required=True)), + ('name', StringProperty()), ('definition', MarkingProperty(required=True)), ]) @@ -207,6 +208,7 @@ TLP_WHITE = MarkingDefinition( id='marking-definition--613f2e26-407d-48c7-9eca-b8e91df99dc9', created='2017-01-20T00:00:00.000Z', definition_type='tlp', + name='TLP:WHITE', definition=TLPMarking(tlp='white'), ) @@ -214,6 +216,7 @@ TLP_GREEN = MarkingDefinition( id='marking-definition--34098fce-860f-48ae-8e50-ebd3cc5e41da', created='2017-01-20T00:00:00.000Z', definition_type='tlp', + name='TLP:GREEN', definition=TLPMarking(tlp='green'), ) @@ -221,6 +224,7 @@ TLP_AMBER = MarkingDefinition( id='marking-definition--f88d31f6-486f-44da-b317-01333bde0b82', created='2017-01-20T00:00:00.000Z', definition_type='tlp', + name='TLP:AMBER', definition=TLPMarking(tlp='amber'), ) @@ -228,5 +232,6 @@ TLP_RED = MarkingDefinition( id='marking-definition--5e57c739-391a-4eb3-b6be-7d15ca92d5ed', created='2017-01-20T00:00:00.000Z', definition_type='tlp', + name='TLP:RED', definition=TLPMarking(tlp='red'), )