From 97905367b64cdcf866d7cdeeb7cad730e9791c69 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Tue, 14 Jul 2020 15:58:27 +0200 Subject: [PATCH] fix: [TheHive feeder] create alert --- bin/MISP_The_Hive_feeder.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/MISP_The_Hive_feeder.py b/bin/MISP_The_Hive_feeder.py index 23043788..7cc312d4 100755 --- a/bin/MISP_The_Hive_feeder.py +++ b/bin/MISP_The_Hive_feeder.py @@ -58,15 +58,15 @@ from thehive4py.models import Case, CaseTask, CustomFieldHelper -def create_the_hive_alert(source, path, tag): +def create_the_hive_alert(source, item_id, tag): # # TODO: check items status (processed by all modules) # # TODO: add item metadata: decoded content, link to auto crawled content, pgp correlation, cryptocurrency correlation... # # # TODO: description, add AIL link:show items ? - tags = list( r_serv_metadata.smembers('tag:{}'.format(path)) ) + tags = list( r_serv_metadata.smembers('tag:{}'.format(item_id)) ) artifacts = [ AlertArtifact( dataType='uuid-ail', data=r_serv_db.get('ail:uuid') ), - AlertArtifact( dataType='file', data=path, tags=tags ) + AlertArtifact( dataType='file', data=item_id, tags=tags ) ] # Prepare the sample Alert @@ -115,7 +115,7 @@ def feeder(message, count=0): if HiveApi != False: if int(r_serv_db.get('hive:auto-alerts')) == 1: if r_serv_db.sismember('whitelist_hive', tag): - create_the_hive_alert(source, path, tag) + create_the_hive_alert(source, item_id, tag) else: print('hive, auto alerts creation disable') if flag_misp: