@@ -139,7 +139,7 @@ def extract_embedded_relationships(self, stix_object, types=None):
139
139
# TODO Import tags
140
140
# Object Tags
141
141
tags_ids = []
142
- #if CustomProperties.TAG_TYPE in stix_object:
142
+ # if CustomProperties.TAG_TYPE in stix_object:
143
143
# for tag in stix_object[CustomProperties.TAG_TYPE]:
144
144
# if tag['id'] in self.mapping_cache:
145
145
# tag_result = self.mapping_cache[tag['id']]
@@ -220,25 +220,16 @@ def extract_embedded_relationships(self, stix_object, types=None):
220
220
'intrusion-set' ,
221
221
'campaign' ,
222
222
'incident' ,
223
- 'malware'
223
+ 'malware' ,
224
+ 'attack-pattern'
224
225
] and (types is None or 'report' in types ):
225
226
# Add a corresponding report
226
227
# Extract date
227
228
try :
228
229
if 'description' in external_reference :
229
- matches = list (datefinder .find_dates (
230
- external_reference ['description' ],
231
- False ,
232
- False ,
233
- False ,
234
- ))
230
+ matches = list (datefinder .find_dates (external_reference ['description' ]))
235
231
else :
236
- matches = list (datefinder .find_dates (
237
- source_name ,
238
- False ,
239
- False ,
240
- False ,
241
- ))
232
+ matches = list (datefinder .find_dates (source_name ))
242
233
except :
243
234
matches = []
244
235
if len (matches ) > 0 :
@@ -441,19 +432,9 @@ def import_relationship(self, stix_relation, update=False, types=None):
441
432
for external_reference in stix_relation ['external_references' ]:
442
433
try :
443
434
if 'description' in external_reference :
444
- matches = list (datefinder .find_dates (
445
- external_reference ['description' ],
446
- False ,
447
- False ,
448
- False ,
449
- ))
435
+ matches = list (datefinder .find_dates (external_reference ['description' ]))
450
436
else :
451
- matches = list (datefinder .find_dates (
452
- external_reference ['source_name' ],
453
- False ,
454
- False ,
455
- False ,
456
- ))
437
+ matches = list (datefinder .find_dates (external_reference ['source_name' ]))
457
438
except :
458
439
matches = []
459
440
if len (matches ) > 0 :
0 commit comments