|
17 | 17 | from pycti.entities.opencti_campaign import Campaign
|
18 | 18 | from pycti.entities.opencti_channel import Channel
|
19 | 19 | from pycti.entities.opencti_course_of_action import CourseOfAction
|
| 20 | +from pycti.entities.opencti_data_component import DataComponent |
| 21 | +from pycti.entities.opencti_data_source import DataSource |
20 | 22 | from pycti.entities.opencti_event import Event
|
21 | 23 | from pycti.entities.opencti_external_reference import ExternalReference
|
22 | 24 | from pycti.entities.opencti_grouping import Grouping
|
|
52 | 54 | from pycti.entities.opencti_tool import Tool
|
53 | 55 | from pycti.entities.opencti_vulnerability import Vulnerability
|
54 | 56 | from pycti.utils.opencti_stix2 import OpenCTIStix2
|
| 57 | +from pycti.utils.opencti_stix2_utils import OpenCTIStix2Utils |
55 | 58 |
|
56 | 59 | urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
57 | 60 |
|
@@ -177,6 +180,8 @@ def __init__(
|
177 | 180 | self.vulnerability = Vulnerability(self)
|
178 | 181 | self.attack_pattern = AttackPattern(self)
|
179 | 182 | self.course_of_action = CourseOfAction(self)
|
| 183 | + self.data_component = DataComponent(self) |
| 184 | + self.data_source = DataSource(self) |
180 | 185 | self.report = Report(self)
|
181 | 186 | self.note = Note(self)
|
182 | 187 | self.observed_data = ObservedData(self)
|
@@ -497,6 +502,13 @@ def process_multiple_fields(self, data):
|
497 | 502 | :rtype: dict
|
498 | 503 | """
|
499 | 504 |
|
| 505 | + # Handle process_multiple_fields specific case |
| 506 | + attribute = OpenCTIStix2Utils.retrieveClassForMethod( |
| 507 | + self, data, "entity_type", "process_multiple_fields" |
| 508 | + ) |
| 509 | + if attribute is not None: |
| 510 | + data = attribute.process_multiple_fields(data) |
| 511 | + |
500 | 512 | if data is None:
|
501 | 513 | return data
|
502 | 514 | if "createdBy" in data and data["createdBy"] is not None:
|
|
0 commit comments