diff --git a/stix2/v21/common.py b/stix2/v21/common.py index a47418e..cf01cf2 100644 --- a/stix2/v21/common.py +++ b/stix2/v21/common.py @@ -52,6 +52,7 @@ class LanguageContent(_STIXBase): _type = 'language-content' _properties = OrderedDict([ ('type', TypeProperty(_type)), + ('spec_version', StringProperty(fixed='2.1')), ('id', IDProperty(_type)), ('created_by_ref', ReferenceProperty(type='identity')), ('created', TimestampProperty(default=lambda: NOW, precision='millisecond')), @@ -109,6 +110,7 @@ class MarkingDefinition(_STIXBase, _MarkingsMixin): _type = 'marking-definition' _properties = OrderedDict([ ('type', TypeProperty(_type)), + ('spec_version', StringProperty(fixed='2.1')), ('id', IDProperty(_type)), ('created_by_ref', ReferenceProperty(type='identity')), ('created', TimestampProperty(default=lambda: NOW)), diff --git a/stix2/v21/sdo.py b/stix2/v21/sdo.py index 743e788..4e45619 100644 --- a/stix2/v21/sdo.py +++ b/stix2/v21/sdo.py @@ -29,6 +29,7 @@ class AttackPattern(STIXDomainObject): _type = 'attack-pattern' _properties = OrderedDict([ ('type', TypeProperty(_type)), + ('spec_version', StringProperty(fixed='2.1')), ('id', IDProperty(_type)), ('created_by_ref', ReferenceProperty(type='identity')), ('created', TimestampProperty(default=lambda: NOW, precision='millisecond')), @@ -55,6 +56,7 @@ class Campaign(STIXDomainObject): _type = 'campaign' _properties = OrderedDict([ ('type', TypeProperty(_type)), + ('spec_version', StringProperty(fixed='2.1')), ('id', IDProperty(_type)), ('created_by_ref', ReferenceProperty(type='identity')), ('created', TimestampProperty(default=lambda: NOW, precision='millisecond')), @@ -84,6 +86,7 @@ class CourseOfAction(STIXDomainObject): _type = 'course-of-action' _properties = OrderedDict([ ('type', TypeProperty(_type)), + ('spec_version', StringProperty(fixed='2.1')), ('id', IDProperty(_type)), ('created_by_ref', ReferenceProperty(type='identity')), ('created', TimestampProperty(default=lambda: NOW, precision='millisecond')), @@ -109,6 +112,7 @@ class Identity(STIXDomainObject): _type = 'identity' _properties = OrderedDict([ ('type', TypeProperty(_type)), + ('spec_version', StringProperty(fixed='2.1')), ('id', IDProperty(_type)), ('created_by_ref', ReferenceProperty(type='identity')), ('created', TimestampProperty(default=lambda: NOW, precision='millisecond')), @@ -137,6 +141,7 @@ class Indicator(STIXDomainObject): _type = 'indicator' _properties = OrderedDict([ ('type', TypeProperty(_type)), + ('spec_version', StringProperty(fixed='2.1')), ('id', IDProperty(_type)), ('created_by_ref', ReferenceProperty(type='identity')), ('created', TimestampProperty(default=lambda: NOW, precision='millisecond')), @@ -166,6 +171,7 @@ class IntrusionSet(STIXDomainObject): _type = 'intrusion-set' _properties = OrderedDict([ ('type', TypeProperty(_type)), + ('spec_version', StringProperty(fixed='2.1')), ('id', IDProperty(_type)), ('created_by_ref', ReferenceProperty(type='identity')), ('created', TimestampProperty(default=lambda: NOW, precision='millisecond')), @@ -322,6 +328,7 @@ class ObservedData(STIXDomainObject): _type = 'observed-data' _properties = OrderedDict([ ('type', TypeProperty(_type)), + ('spec_version', StringProperty(fixed='2.1')), ('id', IDProperty(_type)), ('created_by_ref', ReferenceProperty(type='identity')), ('created', TimestampProperty(default=lambda: NOW, precision='millisecond')), @@ -389,6 +396,7 @@ class Report(STIXDomainObject): _type = 'report' _properties = OrderedDict([ ('type', TypeProperty(_type)), + ('spec_version', StringProperty(fixed='2.1')), ('id', IDProperty(_type)), ('created_by_ref', ReferenceProperty(type='identity')), ('created', TimestampProperty(default=lambda: NOW, precision='millisecond')), @@ -416,6 +424,7 @@ class ThreatActor(STIXDomainObject): _type = 'threat-actor' _properties = OrderedDict([ ('type', TypeProperty(_type)), + ('spec_version', StringProperty(fixed='2.1')), ('id', IDProperty(_type)), ('created_by_ref', ReferenceProperty(type='identity')), ('created', TimestampProperty(default=lambda: NOW, precision='millisecond')), @@ -449,6 +458,7 @@ class Tool(STIXDomainObject): _type = 'tool' _properties = OrderedDict([ ('type', TypeProperty(_type)), + ('spec_version', StringProperty(fixed='2.1')), ('id', IDProperty(_type)), ('created_by_ref', ReferenceProperty(type='identity')), ('created', TimestampProperty(default=lambda: NOW, precision='millisecond')), @@ -476,6 +486,7 @@ class Vulnerability(STIXDomainObject): _type = 'vulnerability' _properties = OrderedDict([ ('type', TypeProperty(_type)), + ('spec_version', StringProperty(fixed='2.1')), ('id', IDProperty(_type)), ('created_by_ref', ReferenceProperty(type='identity')), ('created', TimestampProperty(default=lambda: NOW, precision='millisecond')), @@ -530,6 +541,7 @@ def CustomObject(type='x-custom-type', properties=None): _type = type _properties = OrderedDict([ ('type', TypeProperty(_type)), + ('spec_version', StringProperty(fixed='2.1')), ('id', IDProperty(_type)), ('created_by_ref', ReferenceProperty(type='identity')), ('created', TimestampProperty(default=lambda: NOW, precision='millisecond')), diff --git a/stix2/v21/sro.py b/stix2/v21/sro.py index 3d29b62..6deada3 100644 --- a/stix2/v21/sro.py +++ b/stix2/v21/sro.py @@ -65,6 +65,7 @@ class Sighting(STIXRelationshipObject): _type = 'sighting' _properties = OrderedDict([ ('type', TypeProperty(_type)), + ('spec_version', StringProperty(fixed='2.1')), ('id', IDProperty(_type)), ('created_by_ref', ReferenceProperty(type='identity')), ('created', TimestampProperty(default=lambda: NOW, precision='millisecond')),