From 39b669e0def318ef0094b7778766447dd1b500df Mon Sep 17 00:00:00 2001 From: Christian Studer Date: Mon, 23 Sep 2024 17:14:20 +0200 Subject: [PATCH] fix: [stix2 import] Fixed `synonyms_mapping` call - The `synonyms_mapping` attribute is reached when we want to convert some SDOs into tags while they're usually converted as custom Galaxy Cluster --- misp_stix_converter/stix2misp/converters/stix2converter.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misp_stix_converter/stix2misp/converters/stix2converter.py b/misp_stix_converter/stix2misp/converters/stix2converter.py index f288e0b..c830ab8 100644 --- a/misp_stix_converter/stix2misp/converters/stix2converter.py +++ b/misp_stix_converter/stix2misp/converters/stix2converter.py @@ -212,9 +212,9 @@ def parse(self, stix_object_ref: str): ############################################################################ def _check_existing_galaxy_name(self, stix_object_name: str) -> Union[list, None]: - if stix_object_name in self.synonyms_mapping: - return self.synonyms_mapping[stix_object_name] - for name, tag_names in self.synonyms_mapping.items(): + if stix_object_name in self.main_parser.synonyms_mapping: + return self.main_parser.synonyms_mapping[stix_object_name] + for name, tag_names in self.main_parser.synonyms_mapping.items(): if stix_object_name in name: return tag_names