mirror of https://github.com/MISP/MISP
fix: [stix2 import] Keeping uuids from STIX objects imported as attributes
parent
9c320179e9
commit
f378e521f1
|
@ -237,9 +237,10 @@ class StixParser():
|
|||
self.misp_event.add_object(**misp_object)
|
||||
|
||||
def parse_attribute(self, o, labels):
|
||||
attribute_uuid = o['id'].split('--')[1]
|
||||
attribute_type = self.get_misp_type(labels)
|
||||
attribute_category = self.get_misp_category(labels)
|
||||
attribute = {'type': attribute_type, 'category': attribute_category}
|
||||
attribute = {'uuid': attribute_uuid, 'type': attribute_type, 'category': attribute_category}
|
||||
tags = [{'name': label} for label in labels[3:]]
|
||||
if tags:
|
||||
attribute['Tag'] = tags
|
||||
|
|
Loading…
Reference in New Issue