A STIX Package object. Args: id_ (optional): An identifier. If ``None``, a value will be generated via ``mixbox.idgen.create_id()``. If set, this will unset the ``idref`` property. idref: **DEPRECATED** An identifier reference. If set this will unset
| 40 | import mixbox.entities |
| 41 | |
| 42 | class STIXPackage(stix.Entity): |
| 43 | """A STIX Package object. |
| 44 | |
| 45 | Args: |
| 46 | id_ (optional): An identifier. If ``None``, a value will be generated |
| 47 | via ``mixbox.idgen.create_id()``. If set, this will unset the |
| 48 | ``idref`` property. |
| 49 | idref: **DEPRECATED** An identifier reference. If set this will unset |
| 50 | the ``id_`` property. |
| 51 | timestamp: **DEPRECATED** A timestamp value. Can be an instance of |
| 52 | ``datetime.datetime`` or ``str``. |
| 53 | header: A Report :class:`.Header` object. |
| 54 | campaigns: A collection of :class:`.Campaign` objects. |
| 55 | course_of_action: A collection of :class:`.CourseOfAction` objects. |
| 56 | exploit_targets: A collection of :class:`.ExploitTarget` objects. |
| 57 | incidents: A collection of :class:`.Incident` objects. |
| 58 | indicators: A collection of :class:`.Indicator` objects. |
| 59 | threat_actors: A collection of :class:`.ThreatActor` objects. |
| 60 | ttps: A collection of :class:`.TTP` objects. |
| 61 | related_packages: **DEPRECATED**. A collection of |
| 62 | :class:`.RelatedPackage` objects. |
| 63 | reports: A collection of :class:`.Report` objects. |
| 64 | |
| 65 | """ |
| 66 | _binding = stix_core_binding |
| 67 | _binding_class = _binding.STIXType |
| 68 | _namespace = 'http://docs.oasis-open.org/cti/ns/stix/core-1' |
| 69 | _version = "1.2.1" |
| 70 | _ALL_VERSIONS = ("1.0", "1.0.1", "1.1", "1.1.1", "1.2", "1.2.1") |
| 71 | |
| 72 | id_ = fields.IdField("id") |
| 73 | idref = fields.IdrefField("idref", preset_hook=deprecated.field) |
| 74 | version = fields.TypedField("version") |
| 75 | timestamp = fields.DateTimeField("timestamp", preset_hook=deprecated.field) |
| 76 | stix_header = fields.TypedField("STIX_Header", STIXHeader) |
| 77 | campaigns = fields.TypedField("Campaigns", Campaigns) |
| 78 | courses_of_action = fields.TypedField("Courses_Of_Action", CoursesOfAction) |
| 79 | exploit_targets = fields.TypedField("Exploit_Targets", ExploitTargets) |
| 80 | observables = fields.TypedField("Observables", Observables) |
| 81 | indicators = fields.TypedField("Indicators", Indicators) |
| 82 | incidents = fields.TypedField("Incidents", Incidents) |
| 83 | threat_actors = fields.TypedField("Threat_Actors", ThreatActors) |
| 84 | ttps = fields.TypedField("TTPs", TTPs) |
| 85 | related_packages = fields.TypedField("Related_Packages", RelatedPackages) |
| 86 | reports = fields.TypedField("Reports", Reports) |
| 87 | |
| 88 | def __init__(self, id_=None, idref=None, timestamp=None, stix_header=None, |
| 89 | courses_of_action=None, exploit_targets=None, indicators=None, |
| 90 | observables=None, incidents=None, threat_actors=None, |
| 91 | ttps=None, campaigns=None, related_packages=None, |
| 92 | reports=None): |
| 93 | |
| 94 | super(STIXPackage, self).__init__() |
| 95 | |
| 96 | self.id_ = id_ or idgen.create_id("Package") |
| 97 | self.idref = idref |
| 98 | self.version = STIXPackage._version |
| 99 | self.stix_header = stix_header |
no outgoing calls