mirror of https://github.com/MISP/MISP
fix: [stix2 import] Making the organisation uuid argument specific to external STIX 2 import
parent
3d2e563c33
commit
d262767ab7
|
@ -37,14 +37,18 @@ from stix2.parsing import parse as stix2_parser
|
|||
def _get_stix_parser(from_misp, args):
|
||||
arguments = {
|
||||
'distribution': args.distribution,
|
||||
'galaxies_as_tags': args.galaxies_as_tags,
|
||||
'organisation_uuid': args.org_uuid
|
||||
'galaxies_as_tags': args.galaxies_as_tags
|
||||
}
|
||||
if args.distribution == 4 and args.sharing_group_id is not None:
|
||||
arguments['sharing_group_id'] = args.sharing_group_id
|
||||
if from_misp:
|
||||
return 'InternalSTIX2toMISPParser', arguments
|
||||
arguments['cluster_distribution'] = args.cluster_distribution
|
||||
arguments.update(
|
||||
{
|
||||
'cluster_distribution': args.cluster_distribution,
|
||||
'organisation_uuid': args.org_uuid
|
||||
}
|
||||
)
|
||||
if args.cluster_distribution == 4 and args.cluster_sharing_group_id is not None:
|
||||
arguments['cluster_sharing_group_id'] = args.cluster_sharing_group_id
|
||||
return 'ExternalSTIX2toMISPParser', arguments
|
||||
|
|
Loading…
Reference in New Issue