Skip to content

Commit

Permalink
fixed a null malware family issue (TheHive-Project#18)
Browse files Browse the repository at this point in the history
* fixed a null malware family issue

* make sure that families is an array
  • Loading branch information
DUC H NGUYEN authored and Vivian-Dsilva committed Sep 2, 2021
1 parent a7aac84 commit d45fa91
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions analyzers/IBMXForce/ibmxforce_lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def cleanup(self, ip_data={}, malware_data={}, dns_data={}, whois_data={}):
score_nr = 10

families = malware_data.get('malware').get('origins').get('external').get('family', [])
families = families if families is not None and isinstance(families, list) else []
detectionCoverage = malware_data.get('malware').get('origins').get('external').get('detectionCoverage')
score = "%s [%d family(s)]" % (score_value, len(families)) if len(families) > 0 else score_value
cats = []
Expand Down

0 comments on commit d45fa91

Please sign in to comment.