From 421daa4b34ec705a8d1d9c7982f611053752c708 Mon Sep 17 00:00:00 2001 From: Gwendoline Favre-Felix Date: Wed, 26 Mar 2025 15:11:16 +0100 Subject: [PATCH 1/2] [client] Handle platforms args from mitre extension (#8245) --- pycti/entities/opencti_indicator.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pycti/entities/opencti_indicator.py b/pycti/entities/opencti_indicator.py index f67162035..7ed26f3e3 100644 --- a/pycti/entities/opencti_indicator.py +++ b/pycti/entities/opencti_indicator.py @@ -401,6 +401,10 @@ def import_from_stix2(self, **kwargs): stix_object["x_opencti_workflow_id"] = ( self.opencti.get_attribute_in_extension("workflow_id", stix_object) ) + if "x_mitre_plateforms" not in stix_object: + stix_object["x_mitre_plateforms"] = ( + self.opencti.get_attribute_in_mitre_extension("platforms", stix_object) + ) return self.create( stix_id=stix_object["id"], From eacd1e8bfc350548cf8643cf93f951e1b6ea9e4f Mon Sep 17 00:00:00 2001 From: Gwendoline Favre-Felix Date: Wed, 26 Mar 2025 15:16:58 +0100 Subject: [PATCH 2/2] [client] linter (#8245) --- pycti/entities/opencti_indicator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pycti/entities/opencti_indicator.py b/pycti/entities/opencti_indicator.py index 7ed26f3e3..daf6e1bf0 100644 --- a/pycti/entities/opencti_indicator.py +++ b/pycti/entities/opencti_indicator.py @@ -403,7 +403,9 @@ def import_from_stix2(self, **kwargs): ) if "x_mitre_plateforms" not in stix_object: stix_object["x_mitre_plateforms"] = ( - self.opencti.get_attribute_in_mitre_extension("platforms", stix_object) + self.opencti.get_attribute_in_mitre_extension( + "platforms", stix_object + ) ) return self.create(