fix: [stix2 import] Setting the `single_event` argument to avoid skipping content in case of multiple reports or groupings

pull/9594/head
Christian Studer 2024-02-21 11:46:21 +01:00
parent e29924b55d
commit 9573c308e0
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ def _process_stix_file(args: argparse.Namespace):
arguments['sharing_group_id'] = args.sharing_group_id
parser = globals()[f'{to_call}STIX2toMISPParser'](**arguments)
parser.load_stix_bundle(bundle)
parser.parse_stix_bundle()
parser.parse_stix_bundle(single_event=True)
with open(f'{args.input}.out', 'wt', encoding='utf-8') as f:
f.write(parser.misp_event.to_json())
print(
@ -122,4 +122,4 @@ if __name__ == '__main__':
)
sys.exit(1)
_process_stix_file(args)
_process_stix_file(args)