add: [stix import] Importing STIX header description as comment attribute

pull/3808/head
chrisr3d 2018-10-25 16:41:31 +02:00
parent fa462f5db5
commit 60548dc184
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 3 additions and 0 deletions

View File

@ -202,6 +202,9 @@ class StixParser():
def buildExternalDict(self):
self.dictTimestampAndDate()
self.eventInfo()
if hasattr(self.event.stix_header, 'description'):
self.misp_event.add_attribute(**{'type': 'comment', 'value': self.event.stix_header.description.value,
'comment': 'Imported from STIX header description'})
if self.event.indicators:
self.parse_external_indicators(self.event.indicators)
if self.event.observables: