changes to the ExtensionsProperty
parent
1180da7cc7
commit
4340be13c4
|
@ -20,7 +20,7 @@ class Bundle(_STIXBase20):
|
||||||
# Not technically correct: STIX 2.0 spec doesn't say spec_version must
|
# Not technically correct: STIX 2.0 spec doesn't say spec_version must
|
||||||
# have this value, but it's all we support for now.
|
# have this value, but it's all we support for now.
|
||||||
('spec_version', StringProperty(fixed='2.0')),
|
('spec_version', StringProperty(fixed='2.0')),
|
||||||
('objects', ListProperty(STIXObjectProperty(spec_version="2.0"))),
|
('objects', ListProperty(STIXObjectProperty(spec_version='2.0'))),
|
||||||
])
|
])
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
|
|
@ -31,7 +31,7 @@ class Artifact(_Observable):
|
||||||
('payload_bin', BinaryProperty()),
|
('payload_bin', BinaryProperty()),
|
||||||
('url', StringProperty()),
|
('url', StringProperty()),
|
||||||
('hashes', HashesProperty(spec_version='2.0')),
|
('hashes', HashesProperty(spec_version='2.0')),
|
||||||
('extensions', ExtensionsProperty(spec_version="2.0", enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.0')),
|
||||||
])
|
])
|
||||||
|
|
||||||
def _check_object_constraints(self):
|
def _check_object_constraints(self):
|
||||||
|
@ -51,7 +51,7 @@ class AutonomousSystem(_Observable):
|
||||||
('number', IntegerProperty(required=True)),
|
('number', IntegerProperty(required=True)),
|
||||||
('name', StringProperty()),
|
('name', StringProperty()),
|
||||||
('rir', StringProperty()),
|
('rir', StringProperty()),
|
||||||
('extensions', ExtensionsProperty(spec_version="2.0", enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.0')),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ class Directory(_Observable):
|
||||||
('modified', TimestampProperty()),
|
('modified', TimestampProperty()),
|
||||||
('accessed', TimestampProperty()),
|
('accessed', TimestampProperty()),
|
||||||
('contains_refs', ListProperty(ObjectReferenceProperty(valid_types=['file', 'directory']))),
|
('contains_refs', ListProperty(ObjectReferenceProperty(valid_types=['file', 'directory']))),
|
||||||
('extensions', ExtensionsProperty(spec_version="2.0", enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.0')),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ class DomainName(_Observable):
|
||||||
('type', TypeProperty(_type, spec_version='2.0')),
|
('type', TypeProperty(_type, spec_version='2.0')),
|
||||||
('value', StringProperty(required=True)),
|
('value', StringProperty(required=True)),
|
||||||
('resolves_to_refs', ListProperty(ObjectReferenceProperty(valid_types=['ipv4-addr', 'ipv6-addr', 'domain-name']))),
|
('resolves_to_refs', ListProperty(ObjectReferenceProperty(valid_types=['ipv4-addr', 'ipv6-addr', 'domain-name']))),
|
||||||
('extensions', ExtensionsProperty(spec_version="2.0", enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.0')),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ class EmailAddress(_Observable):
|
||||||
('value', StringProperty(required=True)),
|
('value', StringProperty(required=True)),
|
||||||
('display_name', StringProperty()),
|
('display_name', StringProperty()),
|
||||||
('belongs_to_ref', ObjectReferenceProperty(valid_types='user-account')),
|
('belongs_to_ref', ObjectReferenceProperty(valid_types='user-account')),
|
||||||
('extensions', ExtensionsProperty(spec_version="2.0", enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.0')),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
@ -138,11 +138,11 @@ class EmailMessage(_Observable):
|
||||||
('bcc_refs', ListProperty(ObjectReferenceProperty(valid_types='email-addr'))),
|
('bcc_refs', ListProperty(ObjectReferenceProperty(valid_types='email-addr'))),
|
||||||
('subject', StringProperty()),
|
('subject', StringProperty()),
|
||||||
('received_lines', ListProperty(StringProperty)),
|
('received_lines', ListProperty(StringProperty)),
|
||||||
('additional_header_fields', DictionaryProperty(spec_version="2.0")),
|
('additional_header_fields', DictionaryProperty(spec_version='2.0')),
|
||||||
('body', StringProperty()),
|
('body', StringProperty()),
|
||||||
('body_multipart', ListProperty(EmbeddedObjectProperty(type=EmailMIMEComponent))),
|
('body_multipart', ListProperty(EmbeddedObjectProperty(type=EmailMIMEComponent))),
|
||||||
('raw_email_ref', ObjectReferenceProperty(valid_types='artifact')),
|
('raw_email_ref', ObjectReferenceProperty(valid_types='artifact')),
|
||||||
('extensions', ExtensionsProperty(spec_version="2.0", enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.0')),
|
||||||
])
|
])
|
||||||
|
|
||||||
def _check_object_constraints(self):
|
def _check_object_constraints(self):
|
||||||
|
@ -199,7 +199,7 @@ class PDFExt(_Extension):
|
||||||
_properties = OrderedDict([
|
_properties = OrderedDict([
|
||||||
('version', StringProperty()),
|
('version', StringProperty()),
|
||||||
('is_optimized', BooleanProperty()),
|
('is_optimized', BooleanProperty()),
|
||||||
('document_info_dict', DictionaryProperty(spec_version="2.0")),
|
('document_info_dict', DictionaryProperty(spec_version='2.0')),
|
||||||
('pdfid0', StringProperty()),
|
('pdfid0', StringProperty()),
|
||||||
('pdfid1', StringProperty()),
|
('pdfid1', StringProperty()),
|
||||||
])
|
])
|
||||||
|
@ -216,7 +216,7 @@ class RasterImageExt(_Extension):
|
||||||
('image_width', IntegerProperty()),
|
('image_width', IntegerProperty()),
|
||||||
('bits_per_pixel', IntegerProperty()),
|
('bits_per_pixel', IntegerProperty()),
|
||||||
('image_compression_algorithm', StringProperty()),
|
('image_compression_algorithm', StringProperty()),
|
||||||
('exif_tags', DictionaryProperty(spec_version="2.0")),
|
('exif_tags', DictionaryProperty(spec_version='2.0')),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
@ -323,7 +323,7 @@ class File(_Observable):
|
||||||
('decryption_key', StringProperty()),
|
('decryption_key', StringProperty()),
|
||||||
('contains_refs', ListProperty(ObjectReferenceProperty)),
|
('contains_refs', ListProperty(ObjectReferenceProperty)),
|
||||||
('content_ref', ObjectReferenceProperty(valid_types='artifact')),
|
('content_ref', ObjectReferenceProperty(valid_types='artifact')),
|
||||||
('extensions', ExtensionsProperty(spec_version="2.0", enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.0')),
|
||||||
])
|
])
|
||||||
|
|
||||||
def _check_object_constraints(self):
|
def _check_object_constraints(self):
|
||||||
|
@ -343,7 +343,7 @@ class IPv4Address(_Observable):
|
||||||
('value', StringProperty(required=True)),
|
('value', StringProperty(required=True)),
|
||||||
('resolves_to_refs', ListProperty(ObjectReferenceProperty(valid_types='mac-addr'))),
|
('resolves_to_refs', ListProperty(ObjectReferenceProperty(valid_types='mac-addr'))),
|
||||||
('belongs_to_refs', ListProperty(ObjectReferenceProperty(valid_types='autonomous-system'))),
|
('belongs_to_refs', ListProperty(ObjectReferenceProperty(valid_types='autonomous-system'))),
|
||||||
('extensions', ExtensionsProperty(spec_version="2.0", enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.0')),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
@ -358,7 +358,7 @@ class IPv6Address(_Observable):
|
||||||
('value', StringProperty(required=True)),
|
('value', StringProperty(required=True)),
|
||||||
('resolves_to_refs', ListProperty(ObjectReferenceProperty(valid_types='mac-addr'))),
|
('resolves_to_refs', ListProperty(ObjectReferenceProperty(valid_types='mac-addr'))),
|
||||||
('belongs_to_refs', ListProperty(ObjectReferenceProperty(valid_types='autonomous-system'))),
|
('belongs_to_refs', ListProperty(ObjectReferenceProperty(valid_types='autonomous-system'))),
|
||||||
('extensions', ExtensionsProperty(spec_version="2.0", enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.0')),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
@ -371,7 +371,7 @@ class MACAddress(_Observable):
|
||||||
_properties = OrderedDict([
|
_properties = OrderedDict([
|
||||||
('type', TypeProperty(_type, spec_version='2.0')),
|
('type', TypeProperty(_type, spec_version='2.0')),
|
||||||
('value', StringProperty(required=True)),
|
('value', StringProperty(required=True)),
|
||||||
('extensions', ExtensionsProperty(spec_version="2.0", enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.0')),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
@ -384,7 +384,7 @@ class Mutex(_Observable):
|
||||||
_properties = OrderedDict([
|
_properties = OrderedDict([
|
||||||
('type', TypeProperty(_type, spec_version='2.0')),
|
('type', TypeProperty(_type, spec_version='2.0')),
|
||||||
('name', StringProperty(required=True)),
|
('name', StringProperty(required=True)),
|
||||||
('extensions', ExtensionsProperty(spec_version="2.0", enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.0')),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
@ -398,7 +398,7 @@ class HTTPRequestExt(_Extension):
|
||||||
('request_method', StringProperty(required=True)),
|
('request_method', StringProperty(required=True)),
|
||||||
('request_value', StringProperty(required=True)),
|
('request_value', StringProperty(required=True)),
|
||||||
('request_version', StringProperty()),
|
('request_version', StringProperty()),
|
||||||
('request_header', DictionaryProperty(spec_version="2.0")),
|
('request_header', DictionaryProperty(spec_version='2.0')),
|
||||||
('message_body_length', IntegerProperty()),
|
('message_body_length', IntegerProperty()),
|
||||||
('message_body_data_ref', ObjectReferenceProperty(valid_types='artifact')),
|
('message_body_data_ref', ObjectReferenceProperty(valid_types='artifact')),
|
||||||
])
|
])
|
||||||
|
@ -449,7 +449,7 @@ class SocketExt(_Extension):
|
||||||
"PF_NETROM",
|
"PF_NETROM",
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
('options', DictionaryProperty(spec_version="2.0")),
|
('options', DictionaryProperty(spec_version='2.0')),
|
||||||
(
|
(
|
||||||
'socket_type', EnumProperty(allowed=[
|
'socket_type', EnumProperty(allowed=[
|
||||||
"SOCK_STREAM",
|
"SOCK_STREAM",
|
||||||
|
@ -496,12 +496,12 @@ class NetworkTraffic(_Observable):
|
||||||
('dst_byte_count', IntegerProperty()),
|
('dst_byte_count', IntegerProperty()),
|
||||||
('src_packets', IntegerProperty()),
|
('src_packets', IntegerProperty()),
|
||||||
('dst_packets', IntegerProperty()),
|
('dst_packets', IntegerProperty()),
|
||||||
('ipfix', DictionaryProperty(spec_version="2.0")),
|
('ipfix', DictionaryProperty(spec_version='2.0')),
|
||||||
('src_payload_ref', ObjectReferenceProperty(valid_types='artifact')),
|
('src_payload_ref', ObjectReferenceProperty(valid_types='artifact')),
|
||||||
('dst_payload_ref', ObjectReferenceProperty(valid_types='artifact')),
|
('dst_payload_ref', ObjectReferenceProperty(valid_types='artifact')),
|
||||||
('encapsulates_refs', ListProperty(ObjectReferenceProperty(valid_types='network-traffic'))),
|
('encapsulates_refs', ListProperty(ObjectReferenceProperty(valid_types='network-traffic'))),
|
||||||
('encapsulates_by_ref', ObjectReferenceProperty(valid_types='network-traffic')),
|
('encapsulates_by_ref', ObjectReferenceProperty(valid_types='network-traffic')),
|
||||||
('extensions', ExtensionsProperty(spec_version="2.0", enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.0')),
|
||||||
])
|
])
|
||||||
|
|
||||||
def _check_object_constraints(self):
|
def _check_object_constraints(self):
|
||||||
|
@ -521,7 +521,7 @@ class WindowsProcessExt(_Extension):
|
||||||
('priority', StringProperty()),
|
('priority', StringProperty()),
|
||||||
('owner_sid', StringProperty()),
|
('owner_sid', StringProperty()),
|
||||||
('window_title', StringProperty()),
|
('window_title', StringProperty()),
|
||||||
('startup_info', DictionaryProperty(spec_version="2.0")),
|
('startup_info', DictionaryProperty(spec_version='2.0')),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
@ -584,13 +584,13 @@ class Process(_Observable):
|
||||||
('cwd', StringProperty()),
|
('cwd', StringProperty()),
|
||||||
('arguments', ListProperty(StringProperty)),
|
('arguments', ListProperty(StringProperty)),
|
||||||
('command_line', StringProperty()),
|
('command_line', StringProperty()),
|
||||||
('environment_variables', DictionaryProperty(spec_version="2.0")),
|
('environment_variables', DictionaryProperty(spec_version='2.0')),
|
||||||
('opened_connection_refs', ListProperty(ObjectReferenceProperty(valid_types='network-traffic'))),
|
('opened_connection_refs', ListProperty(ObjectReferenceProperty(valid_types='network-traffic'))),
|
||||||
('creator_user_ref', ObjectReferenceProperty(valid_types='user-account')),
|
('creator_user_ref', ObjectReferenceProperty(valid_types='user-account')),
|
||||||
('binary_ref', ObjectReferenceProperty(valid_types='file')),
|
('binary_ref', ObjectReferenceProperty(valid_types='file')),
|
||||||
('parent_ref', ObjectReferenceProperty(valid_types='process')),
|
('parent_ref', ObjectReferenceProperty(valid_types='process')),
|
||||||
('child_refs', ListProperty(ObjectReferenceProperty('process'))),
|
('child_refs', ListProperty(ObjectReferenceProperty('process'))),
|
||||||
('extensions', ExtensionsProperty(spec_version="2.0", enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.0')),
|
||||||
])
|
])
|
||||||
|
|
||||||
def _check_object_constraints(self):
|
def _check_object_constraints(self):
|
||||||
|
@ -621,7 +621,7 @@ class Software(_Observable):
|
||||||
('languages', ListProperty(StringProperty)),
|
('languages', ListProperty(StringProperty)),
|
||||||
('vendor', StringProperty()),
|
('vendor', StringProperty()),
|
||||||
('version', StringProperty()),
|
('version', StringProperty()),
|
||||||
('extensions', ExtensionsProperty(spec_version="2.0", enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.0')),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
@ -634,7 +634,7 @@ class URL(_Observable):
|
||||||
_properties = OrderedDict([
|
_properties = OrderedDict([
|
||||||
('type', TypeProperty(_type, spec_version='2.0')),
|
('type', TypeProperty(_type, spec_version='2.0')),
|
||||||
('value', StringProperty(required=True)),
|
('value', StringProperty(required=True)),
|
||||||
('extensions', ExtensionsProperty(spec_version="2.0", enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.0')),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
@ -673,7 +673,7 @@ class UserAccount(_Observable):
|
||||||
('password_last_changed', TimestampProperty()),
|
('password_last_changed', TimestampProperty()),
|
||||||
('account_first_login', TimestampProperty()),
|
('account_first_login', TimestampProperty()),
|
||||||
('account_last_login', TimestampProperty()),
|
('account_last_login', TimestampProperty()),
|
||||||
('extensions', ExtensionsProperty(spec_version="2.0", enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.0')),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
@ -720,7 +720,7 @@ class WindowsRegistryKey(_Observable):
|
||||||
('modified', TimestampProperty()),
|
('modified', TimestampProperty()),
|
||||||
('creator_user_ref', ObjectReferenceProperty(valid_types='user-account')),
|
('creator_user_ref', ObjectReferenceProperty(valid_types='user-account')),
|
||||||
('number_of_subkeys', IntegerProperty()),
|
('number_of_subkeys', IntegerProperty()),
|
||||||
('extensions', ExtensionsProperty(spec_version="2.0", enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.0')),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
@ -771,7 +771,7 @@ class X509Certificate(_Observable):
|
||||||
('subject_public_key_modulus', StringProperty()),
|
('subject_public_key_modulus', StringProperty()),
|
||||||
('subject_public_key_exponent', IntegerProperty()),
|
('subject_public_key_exponent', IntegerProperty()),
|
||||||
('x509_v3_extensions', EmbeddedObjectProperty(type=X509V3ExtensionsType)),
|
('x509_v3_extensions', EmbeddedObjectProperty(type=X509V3ExtensionsType)),
|
||||||
('extensions', ExtensionsProperty(spec_version="2.0", enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.0')),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -211,7 +211,7 @@ class ObservedData(_DomainObject):
|
||||||
('first_observed', TimestampProperty(required=True)),
|
('first_observed', TimestampProperty(required=True)),
|
||||||
('last_observed', TimestampProperty(required=True)),
|
('last_observed', TimestampProperty(required=True)),
|
||||||
('number_observed', IntegerProperty(min=1, max=999999999, required=True)),
|
('number_observed', IntegerProperty(min=1, max=999999999, required=True)),
|
||||||
('objects', ObservableProperty(spec_version="2.0", required=True)),
|
('objects', ObservableProperty(spec_version='2.0', required=True)),
|
||||||
('revoked', BooleanProperty(default=lambda: False)),
|
('revoked', BooleanProperty(default=lambda: False)),
|
||||||
('labels', ListProperty(StringProperty)),
|
('labels', ListProperty(StringProperty)),
|
||||||
('external_references', ListProperty(ExternalReference)),
|
('external_references', ListProperty(ExternalReference)),
|
||||||
|
|
|
@ -101,7 +101,7 @@ class LanguageContent(_STIXBase21):
|
||||||
('external_references', ListProperty(ExternalReference)),
|
('external_references', ListProperty(ExternalReference)),
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
@ -203,7 +203,7 @@ class MarkingDefinition(_STIXBase21, _MarkingsMixin):
|
||||||
('external_references', ListProperty(ExternalReference)),
|
('external_references', ListProperty(ExternalReference)),
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
|
|
|
@ -39,7 +39,7 @@ class Artifact(_Observable):
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('defanged', BooleanProperty(default=lambda: False)),
|
('defanged', BooleanProperty(default=lambda: False)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
_id_contributing_properties = ["hashes", "payload_bin"]
|
_id_contributing_properties = ["hashes", "payload_bin"]
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ class AutonomousSystem(_Observable):
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('defanged', BooleanProperty(default=lambda: False)),
|
('defanged', BooleanProperty(default=lambda: False)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
_id_contributing_properties = ["number"]
|
_id_contributing_properties = ["number"]
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ class Directory(_Observable):
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('defanged', BooleanProperty(default=lambda: False)),
|
('defanged', BooleanProperty(default=lambda: False)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
_id_contributing_properties = ["path"]
|
_id_contributing_properties = ["path"]
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ class DomainName(_Observable):
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('defanged', BooleanProperty(default=lambda: False)),
|
('defanged', BooleanProperty(default=lambda: False)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
_id_contributing_properties = ["value"]
|
_id_contributing_properties = ["value"]
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ class EmailAddress(_Observable):
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('defanged', BooleanProperty(default=lambda: False)),
|
('defanged', BooleanProperty(default=lambda: False)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
_id_contributing_properties = ["value"]
|
_id_contributing_properties = ["value"]
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ class EmailMIMEComponent(_STIXBase21):
|
||||||
|
|
||||||
_properties = OrderedDict([
|
_properties = OrderedDict([
|
||||||
('body', StringProperty()),
|
('body', StringProperty()),
|
||||||
('body_raw_ref', ReferenceProperty(valid_types=['artifact', 'file'], spec_version="2.1")),
|
('body_raw_ref', ReferenceProperty(valid_types=['artifact', 'file'], spec_version='2.1')),
|
||||||
('content_type', StringProperty()),
|
('content_type', StringProperty()),
|
||||||
('content_disposition', StringProperty()),
|
('content_disposition', StringProperty()),
|
||||||
])
|
])
|
||||||
|
@ -181,7 +181,7 @@ class EmailMessage(_Observable):
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('defanged', BooleanProperty(default=lambda: False)),
|
('defanged', BooleanProperty(default=lambda: False)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
_id_contributing_properties = ["from_ref", "subject", "body"]
|
_id_contributing_properties = ["from_ref", "subject", "body"]
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ class ArchiveExt(_Extension):
|
||||||
|
|
||||||
_type = 'archive-ext'
|
_type = 'archive-ext'
|
||||||
_properties = OrderedDict([
|
_properties = OrderedDict([
|
||||||
('contains_refs', ListProperty(ReferenceProperty(valid_types=['file', 'directory'], spec_version="2.1"), required=True)),
|
('contains_refs', ListProperty(ReferenceProperty(valid_types=['file', 'directory'], spec_version='2.1'), required=True)),
|
||||||
('comment', StringProperty()),
|
('comment', StringProperty()),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
@ -362,7 +362,7 @@ class File(_Observable):
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('defanged', BooleanProperty(default=lambda: False)),
|
('defanged', BooleanProperty(default=lambda: False)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
_id_contributing_properties = ["hashes", "name", "parent_directory_ref", "extensions"]
|
_id_contributing_properties = ["hashes", "name", "parent_directory_ref", "extensions"]
|
||||||
|
|
||||||
|
@ -387,7 +387,7 @@ class IPv4Address(_Observable):
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('defanged', BooleanProperty(default=lambda: False)),
|
('defanged', BooleanProperty(default=lambda: False)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
_id_contributing_properties = ["value"]
|
_id_contributing_properties = ["value"]
|
||||||
|
|
||||||
|
@ -408,7 +408,7 @@ class IPv6Address(_Observable):
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('defanged', BooleanProperty(default=lambda: False)),
|
('defanged', BooleanProperty(default=lambda: False)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
_id_contributing_properties = ["value"]
|
_id_contributing_properties = ["value"]
|
||||||
|
|
||||||
|
@ -427,7 +427,7 @@ class MACAddress(_Observable):
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('defanged', BooleanProperty(default=lambda: False)),
|
('defanged', BooleanProperty(default=lambda: False)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
_id_contributing_properties = ["value"]
|
_id_contributing_properties = ["value"]
|
||||||
|
|
||||||
|
@ -446,7 +446,7 @@ class Mutex(_Observable):
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('defanged', BooleanProperty(default=lambda: False)),
|
('defanged', BooleanProperty(default=lambda: False)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
_id_contributing_properties = ["name"]
|
_id_contributing_properties = ["name"]
|
||||||
|
|
||||||
|
@ -463,7 +463,7 @@ class HTTPRequestExt(_Extension):
|
||||||
('request_version', StringProperty()),
|
('request_version', StringProperty()),
|
||||||
('request_header', DictionaryProperty(spec_version='2.1')),
|
('request_header', DictionaryProperty(spec_version='2.1')),
|
||||||
('message_body_length', IntegerProperty()),
|
('message_body_length', IntegerProperty()),
|
||||||
('message_body_data_ref', ReferenceProperty(valid_types='artifact', spec_version="2.1")),
|
('message_body_data_ref', ReferenceProperty(valid_types='artifact', spec_version='2.1')),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
@ -573,7 +573,7 @@ class NetworkTraffic(_Observable):
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('defanged', BooleanProperty(default=lambda: False)),
|
('defanged', BooleanProperty(default=lambda: False)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
_id_contributing_properties = ["start", "src_ref", "dst_ref", "src_port", "dst_port", "protocols"]
|
_id_contributing_properties = ["start", "src_ref", "dst_ref", "src_port", "dst_port", "protocols"]
|
||||||
|
|
||||||
|
@ -642,7 +642,7 @@ class WindowsServiceExt(_Extension):
|
||||||
"SERVICE_SYSTEM_ALERT",
|
"SERVICE_SYSTEM_ALERT",
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
('service_dll_refs', ListProperty(ReferenceProperty(valid_types='file', spec_version="2.1"))),
|
('service_dll_refs', ListProperty(ReferenceProperty(valid_types='file', spec_version='2.1'))),
|
||||||
(
|
(
|
||||||
'service_type', EnumProperty(allowed=[
|
'service_type', EnumProperty(allowed=[
|
||||||
"SERVICE_KERNEL_DRIVER",
|
"SERVICE_KERNEL_DRIVER",
|
||||||
|
@ -690,7 +690,7 @@ class Process(_Observable):
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('defanged', BooleanProperty(default=lambda: False)),
|
('defanged', BooleanProperty(default=lambda: False)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
_id_contributing_properties = []
|
_id_contributing_properties = []
|
||||||
|
|
||||||
|
@ -728,7 +728,7 @@ class Software(_Observable):
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('defanged', BooleanProperty(default=lambda: False)),
|
('defanged', BooleanProperty(default=lambda: False)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
_id_contributing_properties = ["name", "cpe", "swid", "vendor", "version"]
|
_id_contributing_properties = ["name", "cpe", "swid", "vendor", "version"]
|
||||||
|
|
||||||
|
@ -747,7 +747,7 @@ class URL(_Observable):
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('defanged', BooleanProperty(default=lambda: False)),
|
('defanged', BooleanProperty(default=lambda: False)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
_id_contributing_properties = ["value"]
|
_id_contributing_properties = ["value"]
|
||||||
|
|
||||||
|
@ -793,7 +793,7 @@ class UserAccount(_Observable):
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('defanged', BooleanProperty(default=lambda: False)),
|
('defanged', BooleanProperty(default=lambda: False)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
_id_contributing_properties = ["account_type", "user_id", "account_login"]
|
_id_contributing_properties = ["account_type", "user_id", "account_login"]
|
||||||
|
|
||||||
|
@ -846,7 +846,7 @@ class WindowsRegistryKey(_Observable):
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('defanged', BooleanProperty(default=lambda: False)),
|
('defanged', BooleanProperty(default=lambda: False)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
_id_contributing_properties = ["key", "values"]
|
_id_contributing_properties = ["key", "values"]
|
||||||
|
|
||||||
|
@ -903,7 +903,7 @@ class X509Certificate(_Observable):
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('defanged', BooleanProperty(default=lambda: False)),
|
('defanged', BooleanProperty(default=lambda: False)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
_id_contributing_properties = ["hashes", "serial_number"]
|
_id_contributing_properties = ["hashes", "serial_number"]
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ class AttackPattern(_DomainObject):
|
||||||
('external_references', ListProperty(ExternalReference)),
|
('external_references', ListProperty(ExternalReference)),
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ class Campaign(_DomainObject):
|
||||||
('external_references', ListProperty(ExternalReference)),
|
('external_references', ListProperty(ExternalReference)),
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
|
|
||||||
def _check_object_constraints(self):
|
def _check_object_constraints(self):
|
||||||
|
@ -112,7 +112,7 @@ class CourseOfAction(_DomainObject):
|
||||||
('external_references', ListProperty(ExternalReference)),
|
('external_references', ListProperty(ExternalReference)),
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ class Grouping(_DomainObject):
|
||||||
('external_references', ListProperty(ExternalReference)),
|
('external_references', ListProperty(ExternalReference)),
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ class Identity(_DomainObject):
|
||||||
('external_references', ListProperty(ExternalReference)),
|
('external_references', ListProperty(ExternalReference)),
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
@ -203,7 +203,7 @@ class Indicator(_DomainObject):
|
||||||
('external_references', ListProperty(ExternalReference)),
|
('external_references', ListProperty(ExternalReference)),
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
@ -261,7 +261,7 @@ class Infrastructure(_DomainObject):
|
||||||
('external_references', ListProperty(ExternalReference)),
|
('external_references', ListProperty(ExternalReference)),
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
|
|
||||||
def _check_object_constraints(self):
|
def _check_object_constraints(self):
|
||||||
|
@ -304,7 +304,7 @@ class IntrusionSet(_DomainObject):
|
||||||
('external_references', ListProperty(ExternalReference)),
|
('external_references', ListProperty(ExternalReference)),
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
|
|
||||||
def _check_object_constraints(self):
|
def _check_object_constraints(self):
|
||||||
|
@ -349,7 +349,7 @@ class Location(_DomainObject):
|
||||||
('external_references', ListProperty(ExternalReference)),
|
('external_references', ListProperty(ExternalReference)),
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
|
|
||||||
def _check_object_constraints(self):
|
def _check_object_constraints(self):
|
||||||
|
@ -459,7 +459,7 @@ class Malware(_DomainObject):
|
||||||
('external_references', ListProperty(ExternalReference)),
|
('external_references', ListProperty(ExternalReference)),
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
|
|
||||||
def _check_object_constraints(self):
|
def _check_object_constraints(self):
|
||||||
|
@ -507,7 +507,7 @@ class MalwareAnalysis(_DomainObject):
|
||||||
('result_name', StringProperty()),
|
('result_name', StringProperty()),
|
||||||
('result', StringProperty()),
|
('result', StringProperty()),
|
||||||
('analysis_sco_refs', ListProperty(ReferenceProperty(valid_types="SCO", spec_version='2.1'))),
|
('analysis_sco_refs', ListProperty(ReferenceProperty(valid_types="SCO", spec_version='2.1'))),
|
||||||
('sample_ref', ReferenceProperty(valid_types="SCO", spec_version="2.1")),
|
('sample_ref', ReferenceProperty(valid_types="SCO", spec_version='2.1')),
|
||||||
('revoked', BooleanProperty(default=lambda: False)),
|
('revoked', BooleanProperty(default=lambda: False)),
|
||||||
('labels', ListProperty(StringProperty)),
|
('labels', ListProperty(StringProperty)),
|
||||||
('confidence', IntegerProperty()),
|
('confidence', IntegerProperty()),
|
||||||
|
@ -515,7 +515,7 @@ class MalwareAnalysis(_DomainObject):
|
||||||
('external_references', ListProperty(ExternalReference)),
|
('external_references', ListProperty(ExternalReference)),
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
|
|
||||||
def _check_object_constraints(self):
|
def _check_object_constraints(self):
|
||||||
|
@ -548,7 +548,7 @@ class Note(_DomainObject):
|
||||||
('external_references', ListProperty(ExternalReference)),
|
('external_references', ListProperty(ExternalReference)),
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
@ -569,7 +569,7 @@ class ObservedData(_DomainObject):
|
||||||
('last_observed', TimestampProperty(required=True)),
|
('last_observed', TimestampProperty(required=True)),
|
||||||
('number_observed', IntegerProperty(min=1, max=999999999, required=True)),
|
('number_observed', IntegerProperty(min=1, max=999999999, required=True)),
|
||||||
('objects', ObservableProperty(spec_version='2.1')),
|
('objects', ObservableProperty(spec_version='2.1')),
|
||||||
('object_refs', ListProperty(ReferenceProperty(valid_types=["SCO", "SRO"], spec_version="2.1"))),
|
('object_refs', ListProperty(ReferenceProperty(valid_types=["SCO", "SRO"], spec_version='2.1'))),
|
||||||
('revoked', BooleanProperty(default=lambda: False)),
|
('revoked', BooleanProperty(default=lambda: False)),
|
||||||
('labels', ListProperty(StringProperty)),
|
('labels', ListProperty(StringProperty)),
|
||||||
('confidence', IntegerProperty()),
|
('confidence', IntegerProperty()),
|
||||||
|
@ -577,7 +577,7 @@ class ObservedData(_DomainObject):
|
||||||
('external_references', ListProperty(ExternalReference)),
|
('external_references', ListProperty(ExternalReference)),
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
@ -642,7 +642,7 @@ class Opinion(_DomainObject):
|
||||||
('external_references', ListProperty(ExternalReference)),
|
('external_references', ListProperty(ExternalReference)),
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
@ -671,7 +671,7 @@ class Report(_DomainObject):
|
||||||
('external_references', ListProperty(ExternalReference)),
|
('external_references', ListProperty(ExternalReference)),
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
@ -708,7 +708,7 @@ class ThreatActor(_DomainObject):
|
||||||
('external_references', ListProperty(ExternalReference)),
|
('external_references', ListProperty(ExternalReference)),
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
|
|
||||||
def _check_object_constraints(self):
|
def _check_object_constraints(self):
|
||||||
|
@ -748,7 +748,7 @@ class Tool(_DomainObject):
|
||||||
('external_references', ListProperty(ExternalReference)),
|
('external_references', ListProperty(ExternalReference)),
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
@ -774,7 +774,7 @@ class Vulnerability(_DomainObject):
|
||||||
('external_references', ListProperty(ExternalReference)),
|
('external_references', ListProperty(ExternalReference)),
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ class Relationship(_RelationshipObject):
|
||||||
('external_references', ListProperty(ExternalReference)),
|
('external_references', ListProperty(ExternalReference)),
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
|
|
||||||
# Explicitly define the first three kwargs to make readable Relationship declarations.
|
# Explicitly define the first three kwargs to make readable Relationship declarations.
|
||||||
|
@ -97,7 +97,7 @@ class Sighting(_RelationshipObject):
|
||||||
('external_references', ListProperty(ExternalReference)),
|
('external_references', ListProperty(ExternalReference)),
|
||||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
|
|
||||||
# Explicitly define the first kwargs to make readable Sighting declarations.
|
# Explicitly define the first kwargs to make readable Sighting declarations.
|
||||||
|
|
Loading…
Reference in New Issue