From 5204e7a72120dff962dafa39f9e1de1b5e85b4ea Mon Sep 17 00:00:00 2001 From: Christian Studer Date: Fri, 23 Feb 2024 14:34:16 +0100 Subject: [PATCH] fix: [stix2 import] Setting `single_event` when parsing a bundle with a single report/grouping, to avoid issues raised with multiple reports/groupings handling methods --- misp_stix_converter/stix2misp/stix2_to_misp.py | 1 + 1 file changed, 1 insertion(+) diff --git a/misp_stix_converter/stix2misp/stix2_to_misp.py b/misp_stix_converter/stix2misp/stix2_to_misp.py index cae8d22e..f3a69e3d 100644 --- a/misp_stix_converter/stix2misp/stix2_to_misp.py +++ b/misp_stix_converter/stix2misp/stix2_to_misp.py @@ -656,6 +656,7 @@ def _parse_bundle_with_no_report(self): self._handle_unparsed_content() def _parse_bundle_with_single_report(self): + self.__single_event = True if hasattr(self, '_report') and self._report is not None: for report in self._report.values(): self.__misp_event = self._misp_event_from_report(report)