From c306a672362728e96ab6d6dd161910b3e6325129 Mon Sep 17 00:00:00 2001 From: ygalnezri Date: Mon, 9 Dec 2024 15:26:48 +0100 Subject: [PATCH] Editing file 'THE_HIVE_KEY' --- .env | 2 +- Watcher/Watcher/common/core.py | 2 +- Watcher/Watcher/common/utils/send_thehive_alerts.py | 4 ++-- Watcher/Watcher/watcher/settings.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.env b/.env index 7289d5a..3f6cd40 100644 --- a/.env +++ b/.env @@ -43,7 +43,7 @@ EMAIL_CLASSIFICATION=INTERNAL # THE HIVE Setup THE_HIVE_URL= THE_HIVE_VERIFY_SSL=False -THE_HIVE_API_KEY= +THE_HIVE_KEY= THE_HIVE_CASE_ASSIGNEE=watcher THE_HIVE_TAGS=Watcher,Impersonation,Malicious Domain,Typosquatting THE_HIVE_CUSTOM_FIELD=watcher-id diff --git a/Watcher/Watcher/common/core.py b/Watcher/Watcher/common/core.py index 4312688..2d43fc4 100644 --- a/Watcher/Watcher/common/core.py +++ b/Watcher/Watcher/common/core.py @@ -324,7 +324,7 @@ def send_app_specific_notifications(app_name, context_data, subscribers): observables = collect_observables(app_name, context_data) thehive_url = settings.THE_HIVE_URL - api_key = settings.THE_HIVE_API_KEY + api_key = settings.THE_HIVE_KEY def send_notification(channel, content_template, subscribers_filter, send_func, **kwargs): """Helper to format and send notification based on the channel.""" diff --git a/Watcher/Watcher/common/utils/send_thehive_alerts.py b/Watcher/Watcher/common/utils/send_thehive_alerts.py index 263f2f6..4bc57dd 100644 --- a/Watcher/Watcher/common/utils/send_thehive_alerts.py +++ b/Watcher/Watcher/common/utils/send_thehive_alerts.py @@ -65,12 +65,12 @@ def send_thehive_alert(title, description, severity, tags, app_name, domain_name :rtype: None """ - if not settings.THE_HIVE_API_KEY or not settings.THE_HIVE_URL: + if not settings.THE_HIVE_KEY or not settings.THE_HIVE_URL: print(f"{str(timezone.now())} - No configuration for TheHive, notifications disabled. Configure it in the '.env' file.") return thehive_url = thehive_url or settings.THE_HIVE_URL - api_key = api_key or settings.THE_HIVE_API_KEY + api_key = api_key or settings.THE_HIVE_KEY ticket_id = None diff --git a/Watcher/Watcher/watcher/settings.py b/Watcher/Watcher/watcher/settings.py index 148a90e..6edd61a 100755 --- a/Watcher/Watcher/watcher/settings.py +++ b/Watcher/Watcher/watcher/settings.py @@ -116,7 +116,7 @@ THE_HIVE_VERIFY_SSL = True if THE_HIVE_VERIFY_SSL == "False": THE_HIVE_VERIFY_SSL = False -THE_HIVE_API_KEY = os.environ.get('THE_HIVE_API_KEY', '') +THE_HIVE_KEY = os.environ.get('THE_HIVE_KEY', '') THE_HIVE_CASE_ASSIGNEE = os.environ.get('THE_HIVE_CASE_ASSIGNEE', 'watcher') THE_HIVE_TAGS = os.environ.get('THE_HIVE_TAGS', "Watcher,Impersonation,Malicious Domain,Typosquatting").split(",") THE_HIVE_CUSTOM_FIELD = os.environ.get('THE_HIVE_CUSTOM_FIELD', 'watcher-id')