fix: [stix import] Avoiding issue with test_mechanisms with no rule value

pull/6538/head
chrisr3d 2020-11-02 12:23:09 +01:00
parent 6dbc6ab396
commit 8dd380852f
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 2 additions and 0 deletions

View File

@ -1241,6 +1241,8 @@ class ExternalStixParser(StixParser):
except KeyError:
print(f'Unknown Test Mechanism type: {test_mechanism._XSI_TYPE}', file=sys.stderr)
continue
if test_mechanism.rule.value is None:
continue
attribute = MISPAttribute()
attribute.from_dict(**{
'type': attribute_type,