Skip to content

Commit

Permalink
fix: [stix2 import] Fixed synonyms_mapping call
Browse files Browse the repository at this point in the history
- The `synonyms_mapping` attribute is reached when
  we want to convert some SDOs into tags while
  they're usually converted as custom Galaxy Cluster
  • Loading branch information
chrisr3d committed Sep 23, 2024
1 parent 1b3909b commit 39b669e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions misp_stix_converter/stix2misp/converters/stix2converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 39b669e

Please sign in to comment.