From 72f09cd95353b77f29fa15da326e25f1ce3f2d42 Mon Sep 17 00:00:00 2001 From: Matan Yechiel Date: Mon, 11 Sep 2023 15:28:53 +0300 Subject: [PATCH 1/2] init --- CHANGES | 4 ++++ intezer_sdk/__init__.py | 2 +- intezer_sdk/alerts.py | 9 ++++++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index cf5d265..b5012c2 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +1.18.9 +------ +- Add additional info property to send phishing email. + 1.18.8 ------ - Fix is_available method. diff --git a/intezer_sdk/__init__.py b/intezer_sdk/__init__.py index 66d03e6..c22f0b5 100644 --- a/intezer_sdk/__init__.py +++ b/intezer_sdk/__init__.py @@ -1 +1 @@ -__version__ = '1.18.8' +__version__ = '1.18.9' diff --git a/intezer_sdk/alerts.py b/intezer_sdk/alerts.py index a312bac..f2ec78f 100644 --- a/intezer_sdk/alerts.py +++ b/intezer_sdk/alerts.py @@ -235,7 +235,8 @@ def send_phishing_email(cls, alert_sender: Optional[str] = None, wait: bool = False, timeout: Optional[int] = None, - email_path: Optional[str] = None): + email_path: Optional[str] = None, + additional_info: Optional[dict] = None): """ Send an alert for further investigation using the Intezer Analyze API. Should pass either raw_email or email_path. @@ -248,6 +249,7 @@ def send_phishing_email(cls, :param wait: Wait for the alert to finish processing before returning. :param timeout: The timeout for the wait operation. :param email_path: The path to the email file. + :param additional_info: Additional information to send with the alert. :raises: :class:`requests.HTTPError` if the request failed for any reason. :return: The Alert instance, initialized with the alert id. when the `wait` parameter is set to True, the resulting alert object will be initialized with the alert triage data. @@ -266,9 +268,10 @@ def send_phishing_email(cls, file_name=cls._parse_alert_id_from_alert_stream(raw_email), alert_source='phishing_emails', environment=environment, - display_fields=','.join(['sender', 'received', 'subject', 'message_id', 'to']), + display_fields=','.join(['received_by', 'sender', 'received', 'subject', 'message_id', 'to']), default_verdict=default_verdict, - alert_sender=alert_sender + alert_sender=alert_sender, + additional_info=json.dumps(additional_info) if additional_info else None ) send_alert_params = {key: value for key, value in send_alert_params.items() if value is not None} From a7b8b05796bdccd7add356df14a49c1b6f18e8d2 Mon Sep 17 00:00:00 2001 From: Matan Yechiel Date: Mon, 11 Sep 2023 15:33:38 +0300 Subject: [PATCH 2/2] init --- intezer_sdk/alerts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intezer_sdk/alerts.py b/intezer_sdk/alerts.py index f2ec78f..c536d9a 100644 --- a/intezer_sdk/alerts.py +++ b/intezer_sdk/alerts.py @@ -271,7 +271,7 @@ def send_phishing_email(cls, display_fields=','.join(['received_by', 'sender', 'received', 'subject', 'message_id', 'to']), default_verdict=default_verdict, alert_sender=alert_sender, - additional_info=json.dumps(additional_info) if additional_info else None + additional_info=json.dumps(additional_info) if additional_info else None, ) send_alert_params = {key: value for key, value in send_alert_params.items() if value is not None}