diff --git a/Packs/AnythingLLM/Integrations/AnythingLLM/AnythingLLM.py b/Packs/AnythingLLM/Integrations/AnythingLLM/AnythingLLM.py index 8b90235bee3e..ac8c1ca6b22c 100644 --- a/Packs/AnythingLLM/Integrations/AnythingLLM/AnythingLLM.py +++ b/Packs/AnythingLLM/Integrations/AnythingLLM/AnythingLLM.py @@ -6,21 +6,21 @@ ''' CLIENT CLASS ''' + + class Client(BaseClient): def test_module(self): self._http_request("GET", "/v1/auth") - def document_list(self): return self._list("documents") - def document_get(self, folder: str, document: str): try: name = document_name(folder, document, self.document_list()) response = self._http_request( - method = "GET", - url_suffix = f"/v1/document/{name}" + method="GET", + url_suffix=f"/v1/document/{name}" ) except Exception as e: msg = f"AnythingLLM: document_get: exception getting document details - {str(e)}" @@ -29,7 +29,6 @@ def document_get(self, folder: str, document: str): return response - def document_delete(self, folder: str, document: str): try: name = document_name(folder, document, self.document_list()) @@ -39,9 +38,9 @@ def document_delete(self, folder: str, document: str): ] } response = self._http_request( - method = "DELETE", - url_suffix = "/v1/system/remove-documents", - json_data = data + method="DELETE", + url_suffix="/v1/system/remove-documents", + json_data=data ) except Exception as e: msg = f"AnythingLLM: document_delete: exception deleting document - {str(e)}" @@ -50,16 +49,15 @@ def document_delete(self, folder: str, document: str): return {"message": response} - def document_createfolder(self, folder: str): try: data = { "name": folder } response = self._http_request( - method = "POST", - url_suffix = "/v1/document/create-folder", - json_data = data + method="POST", + url_suffix="/v1/document/create-folder", + json_data=data ) except Exception as e: msg = f"AnythingLLM: document_createfolder: exception creating folder - {str(e)}" @@ -68,22 +66,21 @@ def document_createfolder(self, folder: str): return response - def document_move(self, srcfolder: str, dstfolder: str, document: str): try: name = document_name(srcfolder, document, self.document_list()) data = { "files": [ { - "from": f"{srcfolder}/{name}", - "to": f"{dstfolder}/{name}" + "from": f"{srcfolder}/{name}", + "to": f"{dstfolder}/{name}" } ] } response = self._http_request( - method = "POST", - url_suffix = "/v1/document/move-files", - json_data = data + method="POST", + url_suffix="/v1/document/move-files", + json_data=data ) except Exception as e: msg = f"AnythingLLM: document_move: exception moving document - {str(e)}" @@ -92,7 +89,6 @@ def document_move(self, srcfolder: str, dstfolder: str, document: str): return response - def document_upload_text(self, text: str, title: str, description: str, author: str, source: str): try: try: @@ -110,9 +106,9 @@ def document_upload_text(self, text: str, title: str, description: str, author: } } response = self._http_request( - method = "POST", - url_suffix = "/v1/document/raw-text", - json_data = data + method="POST", + url_suffix="/v1/document/raw-text", + json_data=data ) finally: if exists: # pylint: disable=E0601 @@ -124,7 +120,6 @@ def document_upload_text(self, text: str, title: str, description: str, author: return response # pylint: disable=E0601 - def document_upload_link(self, link: str, title: str, description: str, author: str, source: str): try: try: @@ -142,9 +137,9 @@ def document_upload_link(self, link: str, title: str, description: str, author: } } response = self._http_request( - method = "POST", - url_suffix = "/v1/document/raw-text", - json_data = data + method="POST", + url_suffix="/v1/document/raw-text", + json_data=data ) finally: if exists: # pylint: disable=E0601 @@ -156,7 +151,6 @@ def document_upload_link(self, link: str, title: str, description: str, author: return response # pylint: disable=E0601 - def document_upload_file(self, entry_id): try: headers = self._headers @@ -170,10 +164,10 @@ def document_upload_file(self, entry_id): except Exception: shutil.copy(file_path, file_name) response = self._http_request( - method = 'POST', - headers = headers, - url_suffix = "/v1/document/upload", - files = {'file': (file_name, open(file_name, 'rb'))} + method='POST', + headers=headers, + url_suffix="/v1/document/upload", + files={'file': (file_name, open(file_name, 'rb'))} ) finally: if exists: # pylint: disable=E0601 @@ -187,7 +181,6 @@ def document_upload_file(self, entry_id): return response # pylint: disable=E0601 - def workspace_new(self, workspace: str): try: if len(workspace.strip()) == 0: @@ -201,9 +194,9 @@ def workspace_new(self, workspace: str): 'name': workspace } response = self._http_request( - method = "POST", - url_suffix = "/v1/workspace/new", - json_data = data + method="POST", + url_suffix="/v1/workspace/new", + json_data=data ) return response finally: @@ -214,25 +207,21 @@ def workspace_new(self, workspace: str): demisto.debug(msg) raise Exception(msg) - def workspace_chat(self, workspace: str, message: str, mode: str): return self._chat(workspace, message, mode, "chat") - def workspace_stream_chat(self, workspace: str, message: str, mode: str): return self._chat(workspace, message, mode, "stream-chat") - def workspace_list(self): return self._list("workspaces") - - def workspace_get(self, workspace:str ): + def workspace_get(self, workspace: str): try: slug = workspace_slug(workspace, self.workspace_list()) response = self._http_request( - method = "GET", - url_suffix = f"/v1/workspace/{slug}", + method="GET", + url_suffix=f"/v1/workspace/{slug}", ) except Exception as e: msg = f"AnythingLLM: workspace_get: exception getting workspace details - {str(e)}" @@ -241,13 +230,12 @@ def workspace_get(self, workspace:str ): return response - - def workspace_delete(self, workspace:str ): + def workspace_delete(self, workspace: str): try: slug = workspace_slug(workspace, self.workspace_list()) self._http_request( - method = "DELETE", - url_suffix = f"/v1/workspace/{slug}", + method="DELETE", + url_suffix=f"/v1/workspace/{slug}", resp_type='bytes' ) except Exception as e: @@ -257,15 +245,14 @@ def workspace_delete(self, workspace:str ): return {"message": {"success": True, "message": "Workspace removed successfully"}} - - def workspace_settings(self, workspace:str, settings: dict ): + def workspace_settings(self, workspace: str, settings: dict): try: settings = validate_workspace_settings(settings) slug = workspace_slug(workspace, self.workspace_list()) response = self._http_request( - method = "POST", - url_suffix = f"/v1/workspace/{slug}/update", - json_data = settings + method="POST", + url_suffix=f"/v1/workspace/{slug}/update", + json_data=settings ) except Exception as e: msg = f"AnythingLLM: workspace_settings: exception updating workspace settings - {str(e)}" @@ -274,16 +261,13 @@ def workspace_settings(self, workspace:str, settings: dict ): return response - def workspace_add_embedding(self, workspace: str, folder: str, document: str): return self._embedding(workspace, folder, document, "adds") - def workspace_delete_embedding(self, workspace: str, folder: str, document: str): return self._embedding(workspace, folder, document, "deletes") - - def workspace_pin(self, workspace:str, folder:str, document:str, status: str): + def workspace_pin(self, workspace: str, folder: str, document: str, status: str): try: if status.lower() == "true": pinst = True @@ -298,9 +282,9 @@ def workspace_pin(self, workspace:str, folder:str, document:str, status: str): } slug = workspace_slug(workspace, self.workspace_list()) response = self._http_request( - method = "POST", - url_suffix = f"/v1/workspace/{slug}/update-pin", - json_data = data + method="POST", + url_suffix=f"/v1/workspace/{slug}/update-pin", + json_data=data ) except Exception as e: msg = f"AnythingLLM: workspace_pin: exception pinning embedded document to workspace - {str(e)}" @@ -309,7 +293,6 @@ def workspace_pin(self, workspace:str, folder:str, document:str, status: str): return response - def _chat(self, workspace: str, message: str, mode: str, type: str): try: data = { @@ -318,9 +301,9 @@ def _chat(self, workspace: str, message: str, mode: str, type: str): } slug = workspace_slug(workspace, self.workspace_list()) response = self._http_request( - method = "POST", - url_suffix = f"/v1/workspace/{slug}/{type}", - json_data = data + method="POST", + url_suffix=f"/v1/workspace/{slug}/{type}", + json_data=data ) except Exception as e: msg = f"AnythingLLM: _chat: exception chatting - {str(e)}" @@ -329,7 +312,6 @@ def _chat(self, workspace: str, message: str, mode: str, type: str): return response - def _list(self, items: str): try: response = self._http_request( @@ -343,7 +325,6 @@ def _list(self, items: str): return response - def _embedding(self, workspace: str, folder: str, document: str, action: str): try: name = document_name(folder, document, self.document_list()) @@ -356,18 +337,17 @@ def _embedding(self, workspace: str, folder: str, document: str, action: str): if action == "adds": if embedding_exists(name, ws): raise Exception(f"[{document}] already embedded") - elif action == "deletes": - if not embedding_exists(name, ws): - raise Exception(f"[{document}] not embedded") + elif action == "deletes" and not embedding_exists(name, ws): + raise Exception(f"[{document}] not embedded") data = { action: [f"{folder}/{name}"] } slug = workspace_slug(workspace, self.workspace_list()) response = self._http_request( - method = "POST", - url_suffix = f"/v1/workspace/{slug}/update-embeddings", - json_data = data + method="POST", + url_suffix=f"/v1/workspace/{slug}/update-embeddings", + json_data=data ) except Exception as e: msg = f"AnythingLLM: _embedding: exception [{action}] a document embedding - {str(e)}" @@ -376,13 +356,12 @@ def _embedding(self, workspace: str, folder: str, document: str, action: str): return response + ''' HELPER FUNCTIONS ''' + def embedding_exists(docname: str, ws: dict) -> bool: - for doc in ws['workspace']['documents']: - if doc['filename'] == docname: - return True - return False + return any(doc["filename"] == docname for doc in ws["workspace"]["documents"]) def workspace_slug(workspace: str, workspaces) -> str: @@ -416,7 +395,7 @@ def validate_workspace_settings(settings: dict): new_settings = {} if "name" in settings: new_settings['name'] = settings['name'] - #if "vectorTag" in settings: + # if "vectorTag" in settings: # new_settings['vectorTag'] = settings['vectorTag'] if "openAiTemp" in settings: new_settings['openAiTemp'] = float(settings['openAiTemp']) @@ -426,9 +405,9 @@ def validate_workspace_settings(settings: dict): new_settings['openAiPrompt'] = settings['openAiPrompt'] if "similarityThreshold" in settings: new_settings['similarityThreshold'] = float(settings['similarityThreshold']) - #if "chatProvider" in settings: + # if "chatProvider" in settings: # new_settings['chatProvider'] = settings['chatProvider'] - #if "chatModel" in settings: + # if "chatModel" in settings: # new_settings['chatModel'] = settings['chatModel'] if "topN" in settings: new_settings['topN'] = int(settings['topN']) @@ -444,7 +423,7 @@ def DictMarkdown(nested, indent): if indent == "": indent = "-" else: - indent = " "+indent + indent = " " + indent if isinstance(nested, dict): for key, val in nested.items(): if isinstance(val, dict): @@ -487,72 +466,72 @@ def test_module(client: Client, args: dict) -> str: def list_command(client: Client, args: dict) -> CommandResults: response: dict = {} return CommandResults( - outputs_prefix = 'AnythingLLM.list', - readable_output = DictMarkdown(response, ""), - outputs = response + outputs_prefix='AnythingLLM.list', + readable_output=DictMarkdown(response, ""), + outputs=response ) def settings_command(client: Client, args: dict) -> CommandResults: response: dict = {} return CommandResults( - outputs_prefix = 'AnythingLLM.settings', - readable_output = DictMarkdown(response, ""), - outputs = response + outputs_prefix='AnythingLLM.settings', + readable_output=DictMarkdown(response, ""), + outputs=response ) def document_list_command(client: Client, args: dict) -> CommandResults: response = client.document_list() return CommandResults( - outputs_prefix = 'AnythingLLM.workspace_list', - readable_output = DictMarkdown(response, ""), - outputs = response + outputs_prefix='AnythingLLM.workspace_list', + readable_output=DictMarkdown(response, ""), + outputs=response ) def document_createfolder_command(client: Client, args: dict) -> CommandResults: response = client.document_createfolder(args['folder']) return CommandResults( - outputs_prefix = 'AnythingLLM.document_createfolder', - readable_output = DictMarkdown(response, ""), - outputs = response + outputs_prefix='AnythingLLM.document_createfolder', + readable_output=DictMarkdown(response, ""), + outputs=response ) def document_delete_command(client: Client, args: dict) -> CommandResults: response = client.document_delete(args['folder'], args['document']) return CommandResults( - outputs_prefix = 'AnythingLLM.document_delete', - readable_output = DictMarkdown(response, ""), - outputs = response + outputs_prefix='AnythingLLM.document_delete', + readable_output=DictMarkdown(response, ""), + outputs=response ) def document_move_command(client: Client, args: dict) -> CommandResults: response = client.document_move(args['srcfolder'], args['dstfolder'], args['document']) return CommandResults( - outputs_prefix = 'AnythingLLM.document_move', - readable_output = DictMarkdown(response, ""), - outputs = response + outputs_prefix='AnythingLLM.document_move', + readable_output=DictMarkdown(response, ""), + outputs=response ) def document_get_command(client: Client, args: dict) -> CommandResults: response = client.document_get(args['folder'], args['document']) return CommandResults( - outputs_prefix = 'AnythingLLM.document_move', - readable_output = DictMarkdown(response, ""), - outputs = response + outputs_prefix='AnythingLLM.document_move', + readable_output=DictMarkdown(response, ""), + outputs=response ) def document_upload_file_command(client: Client, args: dict) -> CommandResults: response = client.document_upload_file(args['fileentry']) return CommandResults( - outputs_prefix = 'AnythingLLM.upload_file', - readable_output = DictMarkdown(response, ""), - outputs = response + outputs_prefix='AnythingLLM.upload_file', + readable_output=DictMarkdown(response, ""), + outputs=response ) @@ -565,9 +544,9 @@ def document_upload_link_command(client: Client, args: dict) -> CommandResults: args['source'] ) return CommandResults( - outputs_prefix = 'AnythingLLM.upload_link', - readable_output = DictMarkdown(response, ""), - outputs = response + outputs_prefix='AnythingLLM.upload_link', + readable_output=DictMarkdown(response, ""), + outputs=response ) @@ -580,104 +559,104 @@ def document_upload_text_command(client: Client, args: dict) -> CommandResults: args['source'] ) return CommandResults( - outputs_prefix = 'AnythingLLM.upload_text', - readable_output = DictMarkdown(response, ""), - outputs = response + outputs_prefix='AnythingLLM.upload_text', + readable_output=DictMarkdown(response, ""), + outputs=response ) def workspace_delete_command(client: Client, args: dict) -> CommandResults: response = client.workspace_delete(args['workspace']) return CommandResults( - outputs_prefix = 'AnythingLLM.workspace_delete', - readable_output = DictMarkdown(response, ""), - outputs = response + outputs_prefix='AnythingLLM.workspace_delete', + readable_output=DictMarkdown(response, ""), + outputs=response ) def workspace_get_command(client: Client, args: dict) -> CommandResults: response = client.workspace_get(args['workspace']) return CommandResults( - outputs_prefix = 'AnythingLLM.workspace_get', - readable_output = DictMarkdown(response, ""), - outputs = response + outputs_prefix='AnythingLLM.workspace_get', + readable_output=DictMarkdown(response, ""), + outputs=response ) def workspace_list_command(client: Client, args: dict) -> CommandResults: response = client.workspace_list() return CommandResults( - outputs_prefix = 'AnythingLLM.workspace_list', - readable_output = DictMarkdown(response, ""), - outputs = response + outputs_prefix='AnythingLLM.workspace_list', + readable_output=DictMarkdown(response, ""), + outputs=response ) def workspace_new_command(client: Client, args: dict) -> CommandResults: - #if 'workspace' in args: + # if 'workspace' in args: response = client.workspace_new(args['workspace']) return CommandResults( - outputs_prefix ='AnythingLLM.workspace_new', - readable_output = DictMarkdown(response, ""), - outputs = response + outputs_prefix='AnythingLLM.workspace_new', + readable_output=DictMarkdown(response, ""), + outputs=response ) - #msg = f"AnythingLLM: workspace_new_command: missing command arguments [workspace]" - #demisto.debug(msg) - #raise Exception(msg) + # msg = f"AnythingLLM: workspace_new_command: missing command arguments [workspace]" + # demisto.debug(msg) + # raise Exception(msg) def workspace_chat_command(client: Client, args: dict) -> CommandResults: response = client.workspace_chat(args['workspace'], args['message'], args['mode']) return CommandResults( - outputs_prefix ='AnythingLLM.workspace_chat', - readable_output = DictMarkdown(response, ""), - outputs = response + outputs_prefix='AnythingLLM.workspace_chat', + readable_output=DictMarkdown(response, ""), + outputs=response ) def workspace_stream_chat_command(client: Client, args: dict) -> CommandResults: response = client.workspace_stream_chat(args['workspace'], args['message'], args['mode']) return CommandResults( - outputs_prefix = 'AnythingLLM.workspace_stream_chat', - readable_output = DictMarkdown(response, ""), - outputs = response + outputs_prefix='AnythingLLM.workspace_stream_chat', + readable_output=DictMarkdown(response, ""), + outputs=response ) def workspace_delete_embedding_command(client: Client, args: dict) -> CommandResults: response = client.workspace_delete_embedding(args['workspace'], args['folder'], args['document']) return CommandResults( - outputs_prefix = 'AnythingLLM.workspace_delete_embedding', - readable_output = DictMarkdown(response, ""), - outputs = response + outputs_prefix='AnythingLLM.workspace_delete_embedding', + readable_output=DictMarkdown(response, ""), + outputs=response ) def workspace_add_embedding_command(client: Client, args: dict) -> CommandResults: response = client.workspace_add_embedding(args['workspace'], args['folder'], args['document']) return CommandResults( - outputs_prefix = 'AnythingLLM.workspace_add_embedding', - readable_output = DictMarkdown(response, ""), - outputs = response + outputs_prefix='AnythingLLM.workspace_add_embedding', + readable_output=DictMarkdown(response, ""), + outputs=response ) def workspace_pin_command(client: Client, args: dict) -> CommandResults: response = client.workspace_pin(args['workspace'], args['folder'], args['document'], args['status']) return CommandResults( - outputs_prefix = 'AnythingLLM.workspace_pin', - readable_output = DictMarkdown(response, ""), - outputs = response + outputs_prefix='AnythingLLM.workspace_pin', + readable_output=DictMarkdown(response, ""), + outputs=response ) def workspace_settings_command(client: Client, args: dict) -> CommandResults: response = client.workspace_settings(args['workspace'], json.loads(args['settings'])) return CommandResults( - outputs_prefix = 'AnythingLLM.workspace_settings', - readable_output = DictMarkdown(response, ""), - outputs = response + outputs_prefix='AnythingLLM.workspace_settings', + readable_output=DictMarkdown(response, ""), + outputs=response ) @@ -695,10 +674,10 @@ def main() -> None: # pragma: no cover 'Content-Type': "application/json" } client = Client( - base_url = params.get('url') + "/api", - verify = not params.get('insecure', False), - headers = headers, - proxy = params.get('proxy', False) + base_url=params.get('url') + "/api", + verify=not params.get('insecure', False), + headers=headers, + proxy=params.get('proxy', False) ) if command == 'test-module': @@ -706,9 +685,9 @@ def main() -> None: # pragma: no cover result = test_module(client, params) return_results(result) - #elif command == "anyllm-list": + # elif command == "anyllm-list": # return_results(list_command(client, args)) - #elif command == "anyllm-settings": + # elif command == "anyllm-settings": # return_results(settings_command(client, args)) elif command == "anyllm-document-list": diff --git a/Packs/AnythingLLM/Integrations/AnythingLLM/AnythingLLM.yml b/Packs/AnythingLLM/Integrations/AnythingLLM/AnythingLLM.yml index fff7a1c5fcc3..c40218a5ec86 100644 --- a/Packs/AnythingLLM/Integrations/AnythingLLM/AnythingLLM.yml +++ b/Packs/AnythingLLM/Integrations/AnythingLLM/AnythingLLM.yml @@ -204,7 +204,7 @@ script: - 'false' description: Set pin status to true or false. description: Set the pinned status of a document embedding. - dockerimage: demisto/python3:3.11.9.104657 + dockerimage: demisto/python3:3.12.8.1983910 runonce: false subtype: python3 fromversion: 6.10.0 diff --git a/Packs/AnythingLLM/ReleaseNotes/1_0_1.md b/Packs/AnythingLLM/ReleaseNotes/1_0_1.md new file mode 100644 index 000000000000..900f4ce901e3 --- /dev/null +++ b/Packs/AnythingLLM/ReleaseNotes/1_0_1.md @@ -0,0 +1,7 @@ + +#### Integrations + +##### AnythingLLM + +Updated the Docker image to: *demisto/python3:3.12.8.1983910*. + diff --git a/Packs/AnythingLLM/pack_metadata.json b/Packs/AnythingLLM/pack_metadata.json index df9d841e1576..5722f9371784 100644 --- a/Packs/AnythingLLM/pack_metadata.json +++ b/Packs/AnythingLLM/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Anything LLM", "description": "This content pack contains an integration for Anything LLM that supports the use of Retrieval Augmented Generation (RAG) with an LLM and vector DB. The LLM and vector DB can be fully local for maximum data privacy or configured to use cloud-based services such as OpenAI. A large range of LLMs and vector DBs are supported. ", "support": "community", - "currentVersion": "1.0.0", + "currentVersion": "1.0.1", "author": "Randy Uhrlaub", "url": "", "email": "", diff --git a/Packs/CommonScripts/TestPlaybooks/script-executecommand-deletecontext-test.yml b/Packs/CommonScripts/TestPlaybooks/script-executecommand-deletecontext-test.yml index 7f36770ea250..8b2fb75c0a0d 100644 --- a/Packs/CommonScripts/TestPlaybooks/script-executecommand-deletecontext-test.yml +++ b/Packs/CommonScripts/TestPlaybooks/script-executecommand-deletecontext-test.yml @@ -14,5 +14,5 @@ enabled: true scripttarget: 0 subtype: python3 runonce: false -dockerimage: demisto/python3:3.10.14.92207 +dockerimage: demisto/python3:3.12.8.1983910 fromversion: 5.0.0 diff --git a/Packs/CommunityCommonScripts/ReleaseNotes/1_3_13.md b/Packs/CommunityCommonScripts/ReleaseNotes/1_3_13.md new file mode 100644 index 000000000000..ac2c8b4b3e86 --- /dev/null +++ b/Packs/CommunityCommonScripts/ReleaseNotes/1_3_13.md @@ -0,0 +1,9 @@ + +#### Scripts + +##### Defang +- Updated the Docker image to: *demisto/python3:3.12.8.1983910*. + + + + diff --git a/Packs/CommunityCommonScripts/Scripts/Defang/Defang.py b/Packs/CommunityCommonScripts/Scripts/Defang/Defang.py index adfc1f773342..d882838501db 100644 --- a/Packs/CommunityCommonScripts/Scripts/Defang/Defang.py +++ b/Packs/CommunityCommonScripts/Scripts/Defang/Defang.py @@ -3,6 +3,7 @@ import re + def defang(content, defang_options, mail_options, url_options): if "ip" in defang_options: ip_regex = r"(\b25[0-5]|\b2[0-4][0-9]|\b[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}" @@ -81,6 +82,7 @@ def defang(content, defang_options, mail_options, url_options): return content, outputs + if __name__ in ("__main__", "builtins", "__builtin__"): try: input = demisto.args().get("input") diff --git a/Packs/CommunityCommonScripts/Scripts/Defang/Defang.yml b/Packs/CommunityCommonScripts/Scripts/Defang/Defang.yml index 00c89e09118a..371115e8f4bf 100644 --- a/Packs/CommunityCommonScripts/Scripts/Defang/Defang.yml +++ b/Packs/CommunityCommonScripts/Scripts/Defang/Defang.yml @@ -38,7 +38,7 @@ comment: Defangs IP, Mail and URL address to prevent them from being recognized. commonfields: id: Defang version: -1 -dockerimage: demisto/python3:3.10.14.99474 +dockerimage: demisto/python3:3.12.8.1983910 enabled: true name: Defang runas: DBotWeakRole diff --git a/Packs/CommunityCommonScripts/pack_metadata.json b/Packs/CommunityCommonScripts/pack_metadata.json index afcf15330f87..f11781059953 100644 --- a/Packs/CommunityCommonScripts/pack_metadata.json +++ b/Packs/CommunityCommonScripts/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Community Common Scripts", "description": "A pack that contains community scripts", "support": "community", - "currentVersion": "1.3.12", + "currentVersion": "1.3.13", "author": "", "url": "https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/bd-p/Cortex_XSOAR_Discussions", "email": "", diff --git a/Packs/Coralogix/Integrations/Coralogix/Coralogix.py b/Packs/Coralogix/Integrations/Coralogix/Coralogix.py index 49000d5297ed..711a061da98a 100644 --- a/Packs/Coralogix/Integrations/Coralogix/Coralogix.py +++ b/Packs/Coralogix/Integrations/Coralogix/Coralogix.py @@ -1,7 +1,7 @@ import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 # TODO: Add description to the integration in /Packs/Coralogix/Integrations/Coralogix/Coralogix_description.md -from datetime import timezone +from datetime import datetime, UTC from CommonServerUserPython import * ''' IMPORTS ''' @@ -362,11 +362,11 @@ def fetch_incidents( } incidents.append(incident) incident_date_obj = dateutil.parser.parse(incident_date) - if incident_date_obj.replace(tzinfo=timezone.utc).timestamp() > \ - newest_incident_date_obj.replace(tzinfo=timezone.utc).timestamp(): + if incident_date_obj.replace(tzinfo=UTC).timestamp() > \ + newest_incident_date_obj.replace(tzinfo=UTC).timestamp(): newest_incident_date_obj = incident_date_obj - demisto.setLastRun({"last_run_timestamp": newest_incident_date_obj.replace(tzinfo=timezone.utc).timestamp()}) + demisto.setLastRun({"last_run_timestamp": newest_incident_date_obj.replace(tzinfo=UTC).timestamp()}) return incidents diff --git a/Packs/Coralogix/Integrations/Coralogix/Coralogix.yml b/Packs/Coralogix/Integrations/Coralogix/Coralogix.yml index c02c437c040f..e1fb1d548c15 100644 --- a/Packs/Coralogix/Integrations/Coralogix/Coralogix.yml +++ b/Packs/Coralogix/Integrations/Coralogix/Coralogix.yml @@ -112,7 +112,7 @@ script: required: true description: Query Coralogix for information. name: coralogix-search - dockerimage: demisto/python3:3.10.14.95956 + dockerimage: demisto/python3:3.12.8.1983910 isfetch: true runonce: false script: '-' diff --git a/Packs/Coralogix/ReleaseNotes/1_0_9.md b/Packs/Coralogix/ReleaseNotes/1_0_9.md new file mode 100644 index 000000000000..a08e01cbfaa9 --- /dev/null +++ b/Packs/Coralogix/ReleaseNotes/1_0_9.md @@ -0,0 +1,9 @@ + +#### Integrations + +##### Coralogix +- Updated the Docker image to: *demisto/python3:3.12.8.1983910*. + + + + diff --git a/Packs/Coralogix/pack_metadata.json b/Packs/Coralogix/pack_metadata.json index 9fa7131d2b3a..a49cef2fb0eb 100644 --- a/Packs/Coralogix/pack_metadata.json +++ b/Packs/Coralogix/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Coralogix", "description": "Coralogix Integration can be used for searching incidents and other data from Coralogix as well as tagging interesting timestamps at Coralogix from Cortex XSOAR", "support": "partner", - "currentVersion": "1.0.8", + "currentVersion": "1.0.9", "author": "Coralogix", "url": "", "email": "support@coralogix.com", diff --git a/Packs/Core/Integrations/CortexCoreXQLQueryEngine/CortexCoreXQLQueryEngine.yml b/Packs/Core/Integrations/CortexCoreXQLQueryEngine/CortexCoreXQLQueryEngine.yml index e6d268a5ba9e..fc43698ef68f 100644 --- a/Packs/Core/Integrations/CortexCoreXQLQueryEngine/CortexCoreXQLQueryEngine.yml +++ b/Packs/Core/Integrations/CortexCoreXQLQueryEngine/CortexCoreXQLQueryEngine.yml @@ -1551,7 +1551,7 @@ script: - contextPath: PaloAltoNetworksXQL.ProcessCausalityNetworkActivity.results._product description: The result product. type: String - dockerimage: demisto/python3:3.10.14.99144 + dockerimage: demisto/python3:3.12.8.1983910 runonce: false script: '-' subtype: python3 diff --git a/Packs/Core/ReleaseNotes/3_2_21.md b/Packs/Core/ReleaseNotes/3_2_21.md new file mode 100644 index 000000000000..13ec3872ff51 --- /dev/null +++ b/Packs/Core/ReleaseNotes/3_2_21.md @@ -0,0 +1,8 @@ + +#### Integrations + +##### XQL Query Engine + +- Updated the Docker image to: *demisto/python3:3.12.8.1983910*. + + diff --git a/Packs/Core/pack_metadata.json b/Packs/Core/pack_metadata.json index d7b6b3c64c18..f3210f2565eb 100644 --- a/Packs/Core/pack_metadata.json +++ b/Packs/Core/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Core - Investigation and Response", "description": "Automates incident response", "support": "xsoar", - "currentVersion": "3.2.20", + "currentVersion": "3.2.21", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/CybleEvents/Integrations/CybleEvents/CybleEvents.py b/Packs/CybleEvents/Integrations/CybleEvents/CybleEvents.py index 42f865c439f4..641286673ef0 100644 --- a/Packs/CybleEvents/Integrations/CybleEvents/CybleEvents.py +++ b/Packs/CybleEvents/Integrations/CybleEvents/CybleEvents.py @@ -55,9 +55,9 @@ def get_event_types(self, method, etypeurl, params): if resp.get('success') or False: event_type_alias = resp['data'] else: - demisto.error("Error trying to Fetch EventTypess {}".format(resp)) + demisto.error(f"Error trying to Fetch EventTypess {resp}") except Exception as e: - demisto.error("Exception with Fetch EventTypes [{}]".format(e)) + demisto.error(f"Exception with Fetch EventTypes [{e}]") raise e return event_type_alias @@ -74,7 +74,7 @@ def get_iocs(self, method, iocurl, params): resp = {} token = params.get('token', '') payload = { - 'token': '{}'.format(token), + 'token': f'{token}', 'from': arg_to_number(params.get('from', '0')), 'limit': arg_to_number(params.get('limit', '50')), 'start_date': '{}'.format(params.get('start_date')), @@ -84,20 +84,20 @@ def get_iocs(self, method, iocurl, params): } files: List[Any] = [] headers = { - "Cookie": "XSRF-TOKEN={}".format(token) + "Cookie": f"XSRF-TOKEN={token}" } url = urljoin(self._base_url, iocurl) - response = requests.request('{}'.format(str(method).upper()), url, headers=headers, data=payload, files=files) + response = requests.request(f'{str(method).upper()}', url, headers=headers, data=payload, files=files) try: resp = response.json() if resp.get('count'): ioc_data = resp else: - demisto.error("Error trying to Fetch IOC's {}".format(resp)) + demisto.error(f"Error trying to Fetch IOC's {resp}") except Exception as e: - raise Exception("Error: [{}] for response [{}]".format(e, resp)) + raise Exception(f"Error: [{e}] for response [{resp}]") return ioc_data @@ -125,7 +125,7 @@ def get_alerts(self, method, eventurl, params): } url = urljoin(self._base_url, eventurl) - response = requests.request('{}'.format(str(method).upper()), url, headers=headers, data=payload) + response = requests.request(f'{str(method).upper()}', url, headers=headers, data=payload) try: resp = response.json() @@ -134,7 +134,7 @@ def get_alerts(self, method, eventurl, params): else: raise Exception(resp) except Exception as e: - demisto.error("Exception with Fetch Events [{}]".format(e)) + demisto.error(f"Exception with Fetch Events [{e}]") raise e return events_data @@ -159,21 +159,21 @@ def get_event_details(self, method, eventurl, params, events_data): } url = urljoin(self._base_url, eventurl) - response = requests.request('{}'.format(str(method).upper()), url, headers=headers, data=payload) + response = requests.request(f'{str(method).upper()}', url, headers=headers, data=payload) resp = {} try: if response.status_code == 200: resp = response.json() except Exception as e: - demisto.error('Exception while fetching the event details {}'.format(e)) + demisto.error(f'Exception while fetching the event details {e}') raise e if response.status_code == 200 and (resp.get('success') or False): events_data.update(resp) else: raise Exception( - "Fetch event detail error (code:{}, reason:{})".format(response.status_code, response.reason)) + f"Fetch event detail error (code:{response.status_code}, reason:{response.reason})") def get_test_response(client, method, token): @@ -275,20 +275,20 @@ def format_incidents(resp, eventTypes): for e_type in list(alert_data.get('services', {}).keys()): event_type = eventTypes.get(e_type) alert_details = { - "name": "Cyble Intel Alert on {}".format(event_type), - "eventtype": "{}".format(e_type), + "name": f"Cyble Intel Alert on {event_type}", + "eventtype": f"{e_type}", "severity": INCIDENT_SEVERITY.get(alert_priority.lower()), - "occurred": "{}".format(alert_created_at), - "eventid": "{}".format(alert_id), - "cybleeventsname": "Incident of {} type".format(event_type), - "cybleeventsbucket": "{}".format(alert_bucket_name), - "cybleeventskeyword": "{}".format(alert_keyword), - "cybleeventsalias": "{}".format(event_type) + "occurred": f"{alert_created_at}", + "eventid": f"{alert_id}", + "cybleeventsname": f"Incident of {event_type} type", + "cybleeventsbucket": f"{alert_bucket_name}", + "cybleeventskeyword": f"{alert_keyword}", + "cybleeventsalias": f"{event_type}" } events.append(alert_details) return events except Exception as e: - demisto.debug('Unable to format incidents, error: {}'.format(e)) + demisto.debug(f'Unable to format incidents, error: {e}') return [] @@ -355,7 +355,7 @@ def fetch_alert_details(client, args): if not eventid: raise ValueError('Event ID not specified') - events_url = r'/api/v2/events/{}/{}'.format(eventtype, eventid) + events_url = fr'/api/v2/events/{eventtype}/{eventid}' results: Dict[str, Any] = {} params = { 'token': args.get('token', None), @@ -438,7 +438,7 @@ def fetch_incidents(client, method, token, maxResults): incidents.append(inci) except Exception as e: - demisto.error("Error formating incidents, {}".format(e)) + demisto.error(f"Error formating incidents, {e}") if last_run['event_pull_start_date'] < date.today().strftime("%Y/%m/%d"): last_run['event_pull_start_date'] = date.today().strftime("%Y/%m/%d") @@ -482,9 +482,9 @@ def validate_input(args, is_iocs=False): if _start_date > _end_date: raise ValueError(f"Start date {args.get('start_date')} cannot be after end date {args.get('end_date')}") - return None + return except Exception as e: - demisto.error("Exception with validating inputs [{}]".format(e)) + demisto.error(f"Exception with validating inputs [{e}]") raise e diff --git a/Packs/CybleEvents/Integrations/CybleEvents/CybleEvents.yml b/Packs/CybleEvents/Integrations/CybleEvents/CybleEvents.yml index afa2ae03859f..13284dfc294e 100644 --- a/Packs/CybleEvents/Integrations/CybleEvents/CybleEvents.yml +++ b/Packs/CybleEvents/Integrations/CybleEvents/CybleEvents.yml @@ -159,7 +159,7 @@ script: - contextPath: CybleEvents.Events.Details description: Returns details for given event of specific type. type: String - dockerimage: demisto/python3:3.10.13.84405 + dockerimage: demisto/python3:3.12.8.1983910 isfetch: true runonce: false script: '-' diff --git a/Packs/CybleEvents/Integrations/CybleEvents/CybleEvents_test.py b/Packs/CybleEvents/Integrations/CybleEvents/CybleEvents_test.py index f9f0186fc9da..b7b05989df04 100644 --- a/Packs/CybleEvents/Integrations/CybleEvents/CybleEvents_test.py +++ b/Packs/CybleEvents/Integrations/CybleEvents/CybleEvents_test.py @@ -10,7 +10,7 @@ def load_json_file(filename): :param filename: :return: """ - with open("test_data/{0}".format(filename), 'r') as f: + with open(f"test_data/{filename}") as f: return json.load(f) @@ -276,7 +276,7 @@ def test_cyble_vision_fetch_detail(requests_mock, eID, eType): mock_response_1 = load_json_file("dummy_fetch_detail.json") - requests_mock.post('https://test.com/api/v2/events/{}/{}'.format(eType, eID), json=mock_response_1) + requests_mock.post(f'https://test.com/api/v2/events/{eType}/{eID}', json=mock_response_1) client = Client( base_url='https://test.com', @@ -296,11 +296,11 @@ def test_cyble_vision_fetch_detail(requests_mock, eID, eType): for i, el in enumerate(response['events']): assert el['id'] == i + 1 - assert el['eventtitle'] == 'some_event_title_{0}'.format(i + 1) + assert el['eventtitle'] == f'some_event_title_{i + 1}' assert el['createdat'] == '2020-06-15T07:34:20.062000' assert el['modified'] == 'Mar 01 2022' - assert el['type'] == 'some_type_{0}'.format(i + 1) - assert el['indicator'] == 'some_indicator_{0}'.format(i + 1) + assert el['type'] == f'some_type_{i + 1}' + assert el['indicator'] == f'some_indicator_{i + 1}' assert el['references'] == '' assert el['lastseenon'] == '2022-03-02' @@ -340,10 +340,9 @@ def test_limit_cyble_vision_fetch_detail(requests_mock, capfd, offset, limit): 'limit': limit } - with capfd.disabled(): - with pytest.raises(ValueError, - match=f"Limit should a positive number up to 1000, limit: {limit}"): - fetch_alert_details(client=client, args=args) + with capfd.disabled(), pytest.raises(ValueError, + match=f"Limit should a positive number up to 1000, limit: {limit}"): + fetch_alert_details(client=client, args=args) def test_offset_cyble_vision_fetch_detail(requests_mock, capfd): @@ -376,10 +375,9 @@ def test_offset_cyble_vision_fetch_detail(requests_mock, capfd): 'limit': 1 } - with capfd.disabled(): - with pytest.raises(ValueError, - match="Parameter having negative value, from: -1'"): - fetch_alert_details(client=client, args=args) + with capfd.disabled(), pytest.raises(ValueError, + match="Parameter having negative value, from: -1'"): + fetch_alert_details(client=client, args=args) def test_etype_cyble_vision_fetch_detail(requests_mock, capfd): @@ -408,10 +406,9 @@ def test_etype_cyble_vision_fetch_detail(requests_mock, capfd): 'event_id': 'eID' } - with capfd.disabled(): - with pytest.raises(ValueError, - match="Event Type not specified"): - fetch_alert_details(client=client, args=args) + with capfd.disabled(), pytest.raises(ValueError, + match="Event Type not specified"): + fetch_alert_details(client=client, args=args) def test_eid_cyble_vision_fetch_detail(requests_mock, capfd): @@ -440,10 +437,9 @@ def test_eid_cyble_vision_fetch_detail(requests_mock, capfd): 'event_type': 'eType' } - with capfd.disabled(): - with pytest.raises(ValueError, - match="Event ID not specified"): - fetch_alert_details(client=client, args=args) + with capfd.disabled(), pytest.raises(ValueError, + match="Event ID not specified"): + fetch_alert_details(client=client, args=args) def test_validate_input(capfd): @@ -455,9 +451,8 @@ def test_validate_input(capfd): 'from': '-1', 'limit': '1', } - with capfd.disabled(): - with pytest.raises(ValueError, match=f"Parameter having negative value, from: {args.get('from')}"): - validate_input(args=args) + with capfd.disabled(), pytest.raises(ValueError, match=f"Parameter having negative value, from: {args.get('from')}"): + validate_input(args=args) def test_limit_validate_input(capfd): @@ -483,10 +478,11 @@ def test_sdate_validate_input(capfd): 'from': '0', 'limit': '1' } - with capfd.disabled(): - with pytest.raises(ValueError, - match=f"Start date must be a date before or equal to {datetime.today().strftime('%Y/%m/%d')}"): - validate_input(args=args) + with capfd.disabled(), pytest.raises( + ValueError, + match=f"Start date must be a date before or equal to {datetime.today().strftime('%Y/%m/%d')}", + ): + validate_input(args=args) def test_edate_validate_input(capfd): @@ -498,10 +494,11 @@ def test_edate_validate_input(capfd): 'from': '0', 'limit': '1' } - with capfd.disabled(): - with pytest.raises(ValueError, - match=f"End date must be a date before or equal to {datetime.today().strftime('%Y/%m/%d')}"): - validate_input(args=args) + with capfd.disabled(), pytest.raises( + ValueError, + match=f"End date must be a date before or equal to {datetime.today().strftime('%Y/%m/%d')}", + ): + validate_input(args=args) def test_date_validate_input(capfd): @@ -514,10 +511,11 @@ def test_date_validate_input(capfd): 'limit': '1' } - with capfd.disabled(): - with pytest.raises(ValueError, - match=f"Start date {args.get('start_date')} cannot be after end date {args.get('end_date')}"): - validate_input(args=args) + with capfd.disabled(), pytest.raises( + ValueError, + match=f"Start date {args.get('start_date')} cannot be after end date {args.get('end_date')}", + ): + validate_input(args=args) def test_datecheck_validate_input(capfd): @@ -530,7 +528,8 @@ def test_datecheck_validate_input(capfd): 'limit': '1' } - with capfd.disabled(): - with pytest.raises(ValueError, - match=f"Start date {args.get('start_date')} cannot be after end date {args.get('end_date')}"): - validate_input(args=args, is_iocs=True) + with capfd.disabled(), pytest.raises( + ValueError, + match=f"Start date {args.get('start_date')} cannot be after end date {args.get('end_date')}", + ): + validate_input(args=args, is_iocs=True) diff --git a/Packs/CybleEvents/ReleaseNotes/1_0_16.md b/Packs/CybleEvents/ReleaseNotes/1_0_16.md new file mode 100644 index 000000000000..aad6e8c14700 --- /dev/null +++ b/Packs/CybleEvents/ReleaseNotes/1_0_16.md @@ -0,0 +1,9 @@ + +#### Integrations + +##### Cyble Events +- Updated the Docker image to: *demisto/python3:3.12.8.1983910*. + + + + diff --git a/Packs/CybleEvents/pack_metadata.json b/Packs/CybleEvents/pack_metadata.json index 511bf7eeec4e..3c6572ff898b 100644 --- a/Packs/CybleEvents/pack_metadata.json +++ b/Packs/CybleEvents/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Cyble Events (Deprecated)", "description": "Deprecated. Use Cyble Events V2 instead.", "support": "partner", - "currentVersion": "1.0.15", + "currentVersion": "1.0.16", "author": "Cyble Infosec", "hidden": true, "url": "https://cyble.com/", diff --git a/Packs/DeveloperTools/TestPlaybooks/script-TestCreateIncidentsFile.yml b/Packs/DeveloperTools/TestPlaybooks/script-TestCreateIncidentsFile.yml index 1513b26d3780..986d1e0cf2de 100644 --- a/Packs/DeveloperTools/TestPlaybooks/script-TestCreateIncidentsFile.yml +++ b/Packs/DeveloperTools/TestPlaybooks/script-TestCreateIncidentsFile.yml @@ -3411,7 +3411,7 @@ args: scripttarget: 0 subtype: python3 runonce: false -dockerimage: demisto/python3:3.11.9.101916 +dockerimage: demisto/python3:3.12.8.1983910 runas: DBotWeakRole comment: '' fromversion: 5.0.0 diff --git a/Packs/Digital_Defense_FrontlineVM/Integrations/Digital_Defense_FrontlineVM/Digital_Defense_FrontlineVM.yml b/Packs/Digital_Defense_FrontlineVM/Integrations/Digital_Defense_FrontlineVM/Digital_Defense_FrontlineVM.yml index 2df0b0cc488d..779ab82330b6 100644 --- a/Packs/Digital_Defense_FrontlineVM/Integrations/Digital_Defense_FrontlineVM/Digital_Defense_FrontlineVM.yml +++ b/Packs/Digital_Defense_FrontlineVM/Integrations/Digital_Defense_FrontlineVM/Digital_Defense_FrontlineVM.yml @@ -164,7 +164,7 @@ script: - contextPath: FrontlineVM.Scan.IP description: The IP address of the scan (can be a single IP address or a range of IP addresses). description: Performs a scan on the specified asset. - dockerimage: demisto/python3:3.11.10.116949 + dockerimage: demisto/python3:3.12.8.1983910 isfetch: true subtype: python3 fromversion: 5.0.0 diff --git a/Packs/Digital_Defense_FrontlineVM/ReleaseNotes/1_1_11.md b/Packs/Digital_Defense_FrontlineVM/ReleaseNotes/1_1_11.md index d04a97367942..8dfb9443db5f 100644 --- a/Packs/Digital_Defense_FrontlineVM/ReleaseNotes/1_1_11.md +++ b/Packs/Digital_Defense_FrontlineVM/ReleaseNotes/1_1_11.md @@ -1,5 +1,7 @@ + #### Integrations ##### Digital Defense FrontlineVM -- Code functionality improvements. -- Updated the Docker image to: *demisto/python3:3.11.10.116949*. \ No newline at end of file + +Updated the Docker image to: *demisto/python3:3.12.8.1983910*. + diff --git a/Packs/ExpanseV2/Integrations/ExpanseV2/ExpanseV2.yml b/Packs/ExpanseV2/Integrations/ExpanseV2/ExpanseV2.yml index f66923226491..1c9ba3edf3d1 100644 --- a/Packs/ExpanseV2/Integrations/ExpanseV2/ExpanseV2.yml +++ b/Packs/ExpanseV2/Integrations/ExpanseV2/ExpanseV2.yml @@ -5462,7 +5462,7 @@ script: - contextPath: Expanse.IPDomains.DomainList description: An array of domain objects. This is truncated at 50. type: Unknown - dockerimage: demisto/python3:3.10.14.92207 + dockerimage: demisto/python3:3.12.8.1983910 isfetch: true runonce: false script: '-' diff --git a/Packs/ExpanseV2/ReleaseNotes/1_10_61.md b/Packs/ExpanseV2/ReleaseNotes/1_10_61.md new file mode 100644 index 000000000000..bde753b8c706 --- /dev/null +++ b/Packs/ExpanseV2/ReleaseNotes/1_10_61.md @@ -0,0 +1,9 @@ + +#### Integrations + +##### Cortex Xpanse Legacy (Deprecated) +- Updated the Docker image to: *demisto/python3:3.12.8.1983910*. + + + + diff --git a/Packs/ExpanseV2/pack_metadata.json b/Packs/ExpanseV2/pack_metadata.json index a7eb17c84604..db2df176f26b 100644 --- a/Packs/ExpanseV2/pack_metadata.json +++ b/Packs/ExpanseV2/pack_metadata.json @@ -3,7 +3,7 @@ "description": "Deprecated. Use Cortex Xpanse instead.", "hidden": true, "support": "xsoar", - "currentVersion": "1.10.60", + "currentVersion": "1.10.61", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/FTP/Integrations/FTP/FTP.py b/Packs/FTP/Integrations/FTP/FTP.py index 87838ffc8e4a..71d98e15b396 100644 --- a/Packs/FTP/Integrations/FTP/FTP.py +++ b/Packs/FTP/Integrations/FTP/FTP.py @@ -6,6 +6,7 @@ """ MAIN """ + def main(): HOST = demisto.params().get('host') PORT = demisto.params().get('port') if demisto.params().get('port') else '21' @@ -15,7 +16,7 @@ def main(): if demisto.command() == "test-module": try: with FTP() as ftp: # noqa: S321 - ftp.connect(host=HOST,port=int(PORT)) + ftp.connect(host=HOST, port=int(PORT)) ftp.login(user=USER, passwd=PASSWD) ftp.voidcmd('NOOP') @@ -71,10 +72,10 @@ def main(): with open(f'/tmp/{file_name}', 'wb') as file: ftp.retrbinary(f'RETR {file_path}/{file_name}', file.write) - with open(f"/tmp/{file_name}", "r") as f: + with open(f"/tmp/{file_name}") as f: data = f.read() return_results( - fileResult(filename = file_name, data = data) + fileResult(filename=file_name, data=data) ) except Exception as excp: diff --git a/Packs/FTP/Integrations/FTP/FTP.yml b/Packs/FTP/Integrations/FTP/FTP.yml index 67d0c02d2b0e..9b77a5a97cec 100644 --- a/Packs/FTP/Integrations/FTP/FTP.yml +++ b/Packs/FTP/Integrations/FTP/FTP.yml @@ -52,7 +52,7 @@ script: description: The file name to download from the FTP server. description: Download file from FTP server. name: ftp-get - dockerimage: demisto/python3:3.10.14.96411 + dockerimage: demisto/python3:3.12.8.1983910 runonce: false script: '' subtype: python3 diff --git a/Packs/FTP/ReleaseNotes/1_0_1.md b/Packs/FTP/ReleaseNotes/1_0_1.md new file mode 100644 index 000000000000..b82928a23a7a --- /dev/null +++ b/Packs/FTP/ReleaseNotes/1_0_1.md @@ -0,0 +1,9 @@ + +#### Integrations + +##### FTP +- Updated the Docker image to: *demisto/python3:3.12.8.1983910*. + + + + diff --git a/Packs/FTP/pack_metadata.json b/Packs/FTP/pack_metadata.json index 072217ac900d..da004e7806c8 100644 --- a/Packs/FTP/pack_metadata.json +++ b/Packs/FTP/pack_metadata.json @@ -2,12 +2,14 @@ "name": "FTP", "description": "FTP integration to download or upload file to remote ftp server. Please be noted that FTP transfer is insecure. Please use it with care. ", "support": "community", - "currentVersion": "1.0.0", + "currentVersion": "1.0.1", "author": "Jie Liau", "url": "", "email": "", "created": "2024-06-01T06:43:37Z", - "categories": ["Utilities"], + "categories": [ + "Utilities" + ], "tags": [], "useCases": [], "keywords": [], diff --git a/Packs/Flashpoint/Integrations/Flashpoint/Flashpoint.yml b/Packs/Flashpoint/Integrations/Flashpoint/Flashpoint.yml index f6c2e9da41af..c81850d73715 100644 --- a/Packs/Flashpoint/Integrations/Flashpoint/Flashpoint.yml +++ b/Packs/Flashpoint/Integrations/Flashpoint/Flashpoint.yml @@ -1036,7 +1036,7 @@ script: - contextPath: Flashpoint.CompromisedCredential.sort description: Sort value of the IoC. type: Unknown - dockerimage: demisto/python3:3.10.13.84405 + dockerimage: demisto/python3:3.12.8.1983910 isfetch: true runonce: false subtype: python3 diff --git a/Packs/Flashpoint/ReleaseNotes/2_0_3.md b/Packs/Flashpoint/ReleaseNotes/2_0_3.md new file mode 100644 index 000000000000..26bc250f129c --- /dev/null +++ b/Packs/Flashpoint/ReleaseNotes/2_0_3.md @@ -0,0 +1,9 @@ + +#### Integrations + +##### Flashpoint (Deprecated) +- Updated the Docker image to: *demisto/python3:3.12.8.1983910*. + + + + diff --git a/Packs/Flashpoint/pack_metadata.json b/Packs/Flashpoint/pack_metadata.json index d3cc9558a9e1..476e2042618e 100644 --- a/Packs/Flashpoint/pack_metadata.json +++ b/Packs/Flashpoint/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Flashpoint", "description": "Use the Flashpoint integration to reduce business risk.", "support": "partner", - "currentVersion": "2.0.2", + "currentVersion": "2.0.3", "author": "Flashpoint", "url": "https://flashpoint.my.site.com/helpcenter/s/", "email": "support@flashpoint-intel.com", diff --git a/Packs/FlashpointFeed/Integrations/FlashpointFeed/FlashpointFeed.yml b/Packs/FlashpointFeed/Integrations/FlashpointFeed/FlashpointFeed.yml index 9940a101791a..989e1f7469c8 100644 --- a/Packs/FlashpointFeed/Integrations/FlashpointFeed/FlashpointFeed.yml +++ b/Packs/FlashpointFeed/Integrations/FlashpointFeed/FlashpointFeed.yml @@ -136,7 +136,7 @@ script: name: types description: Retrieves indicators from the Flashpoint API. It displays the content of the fetch-indicators command. name: flashpoint-get-indicators - dockerimage: demisto/python3:3.10.14.91134 + dockerimage: demisto/python3:3.12.8.1983910 feed: true runonce: false script: '-' diff --git a/Packs/FlashpointFeed/ReleaseNotes/2_0_3.md b/Packs/FlashpointFeed/ReleaseNotes/2_0_3.md new file mode 100644 index 000000000000..8a17310f10a8 --- /dev/null +++ b/Packs/FlashpointFeed/ReleaseNotes/2_0_3.md @@ -0,0 +1,9 @@ + +#### Integrations + +##### Flashpoint Feed (Deprecated) +- Updated the Docker image to: *demisto/python3:3.12.8.1983910*. + + + + diff --git a/Packs/FlashpointFeed/pack_metadata.json b/Packs/FlashpointFeed/pack_metadata.json index 10cbe523bb5c..c0248a0f1f42 100644 --- a/Packs/FlashpointFeed/pack_metadata.json +++ b/Packs/FlashpointFeed/pack_metadata.json @@ -2,7 +2,7 @@ "name": "FlashpointFeed", "description": "Ingest indicator feeds from Flashpoint.", "support": "partner", - "currentVersion": "2.0.2", + "currentVersion": "2.0.3", "author": "Flashpoint", "url": "https://flashpoint.my.site.com/helpcenter/s/", "email": "support@flashpoint-intel.com", diff --git a/Packs/Gmail/Integrations/Gmail/Gmail_test.py b/Packs/Gmail/Integrations/Gmail/Gmail_test.py index 3a4a99d965e1..f06fb407c800 100644 --- a/Packs/Gmail/Integrations/Gmail/Gmail_test.py +++ b/Packs/Gmail/Integrations/Gmail/Gmail_test.py @@ -1,9 +1,10 @@ import uuid from freezegun import freeze_time import demistomock as demisto -import pytest from test_data import input_data import datetime +import pytest +from datetime import UTC MOCK_MAIL_NO_LABELS = { 'internalDate': '1572251535000', @@ -17,7 +18,7 @@ { 'name': 'Received', 'value': 'from 1041831412594 named unknown by gmailapi.google.com with ' - u'HTTPREST; Mon, 28 Oct 2019 04:32:15 -0400' + 'HTTPREST; Mon, 28 Oct 2019 04:32:15 -0400' }, { 'name': 'Content-Type', 'value': 'mixed; boundary="===============4922146810840031257=="' @@ -93,7 +94,7 @@ { 'Name': 'Received', 'Value': 'from 1041831412594 named ' - u'unknown by gmailapi.google.com with HTTPREST; Mon, 28 Oct 2019 04:32:15 -0400' + 'unknown by gmailapi.google.com with HTTPREST; Mon, 28 Oct 2019 04:32:15 -0400' }, { 'Name': 'Content-Type', 'Value': 'mixed; boundary="===============4922146810840031257=="' @@ -618,7 +619,7 @@ def test_no_date_mail(): from email.utils import format_datetime from Gmail import get_email_context - expected_date = datetime.datetime(2020, 12, 21, 20, 11, 57, tzinfo=datetime.UTC) + expected_date = datetime.datetime(2020, 12, 21, 20, 11, 57, tzinfo=UTC) context_gmail, _, _, occurred, is_valid = get_email_context(input_data.email_without_date, "some_mail") # check that the x-received date was usd assert occurred.timestamp() == expected_date.timestamp() @@ -740,15 +741,15 @@ def mocked_get_message(): EMAIL_NO_INTERNALDATE = input_data.email_without_date -EXPECTED_OCCURRED_NO_INTERNALDATE = datetime.datetime(2020, 12, 21, 20, 11, 57, tzinfo=datetime.UTC) +EXPECTED_OCCURRED_NO_INTERNALDATE = datetime.datetime(2020, 12, 21, 20, 11, 57, tzinfo=UTC) EMAIL_INTERNALDATE_EARLY = input_data.email_with_early_internalDate -EXPECTED_OCCURRED_INTERNALDATE_EARLY = datetime.datetime(2020, 12, 21, 20, 11, 40, tzinfo=datetime.UTC) +EXPECTED_OCCURRED_INTERNALDATE_EARLY = datetime.datetime(2020, 12, 21, 20, 11, 40, tzinfo=UTC) EMAIL_HEADER_EARLY = input_data.email_with_internalDate_header_early -EXPECTED_OCCURRED_HEADER_EARLY = datetime.datetime(2020, 12, 21, 20, 11, 57, tzinfo=datetime.UTC) +EXPECTED_OCCURRED_HEADER_EARLY = datetime.datetime(2020, 12, 21, 20, 11, 57, tzinfo=UTC) EMAIL_NO_HEADER = input_data.email_no_header -EXPECTED_OCCURRED_NO_HEADER = datetime.datetime(2020, 12, 21, 20, 11, 58, tzinfo=datetime.UTC) +EXPECTED_OCCURRED_NO_HEADER = datetime.datetime(2020, 12, 21, 20, 11, 58, tzinfo=UTC) EMAIL_NO_DATE = input_data.email_no_date -EXPECTED_OCCURRED_NO_DATE = datetime.datetime(2020, 12, 22, 14, 13, 20, tzinfo=datetime.UTC) +EXPECTED_OCCURRED_NO_DATE = datetime.datetime(2020, 12, 22, 14, 13, 20, tzinfo=UTC) @pytest.mark.parametrize("email_data, expected_occurred, expected_occurred_is_valid", @@ -838,7 +839,7 @@ def test_parse_date_isoformat_server(): """ from Gmail import parse_date_isoformat_server date = parse_date_isoformat_server('2017-10-24T14:13:20Z') - assert date == datetime.datetime(2017, 10, 24, 14, 13, 20, tzinfo=datetime.UTC) + assert date == datetime.datetime(2017, 10, 24, 14, 13, 20, tzinfo=UTC) assert str(date) == '2017-10-24 14:13:20+00:00' diff --git a/Packs/HelloWorld/Integrations/FeedHelloWorld/FeedHelloWorld.py b/Packs/HelloWorld/Integrations/FeedHelloWorld/FeedHelloWorld.py index 66f87fd930a6..34ee861164aa 100644 --- a/Packs/HelloWorld/Integrations/FeedHelloWorld/FeedHelloWorld.py +++ b/Packs/HelloWorld/Integrations/FeedHelloWorld/FeedHelloWorld.py @@ -153,7 +153,6 @@ """ -from typing import Dict, List, Optional import urllib3 from urllib.parse import urlparse @@ -173,7 +172,7 @@ class Client(BaseClient): For this HelloWorld Feed implementation, no special attributes defined """ - def build_iterator(self) -> List: + def build_iterator(self) -> list: """Retrieves all entries from the feed. Returns: A list of objects, containing the indicators. @@ -245,8 +244,8 @@ def test_module(client: Client) -> str: return 'ok' -def fetch_indicators(client: Client, tlp_color: Optional[str] = None, feed_tags: List = [], limit: int = -1, - create_relationships: bool = False) -> List[Dict]: +def fetch_indicators(client: Client, tlp_color: str | None = None, feed_tags: list = [], limit: int = -1, + create_relationships: bool = False) -> list[dict]: """Retrieves indicators from the feed Args: client (Client): Client object with request @@ -320,8 +319,8 @@ def fetch_indicators(client: Client, tlp_color: Optional[str] = None, feed_tags: def get_indicators_command(client: Client, - params: Dict[str, str], - args: Dict[str, str] + params: dict[str, str], + args: dict[str, str] ) -> CommandResults: """Wrapper for retrieving indicators from the feed to the war-room. Args: @@ -346,7 +345,7 @@ def get_indicators_command(client: Client, ) -def fetch_indicators_command(client: Client, params: Dict[str, str]) -> List[Dict]: +def fetch_indicators_command(client: Client, params: dict[str, str]) -> list[dict]: """Wrapper for fetching indicators from the feed to the Indicators tab. Args: client: Client object with request diff --git a/Packs/HelloWorld/Integrations/FeedHelloWorld/FeedHelloWorld.yml b/Packs/HelloWorld/Integrations/FeedHelloWorld/FeedHelloWorld.yml index 252eb7033c24..70468a42ffe6 100644 --- a/Packs/HelloWorld/Integrations/FeedHelloWorld/FeedHelloWorld.yml +++ b/Packs/HelloWorld/Integrations/FeedHelloWorld/FeedHelloWorld.yml @@ -100,7 +100,7 @@ script: name: limit description: Gets indicators from the feed. name: helloworld-get-indicators - dockerimage: demisto/python3:3.10.14.100715 + dockerimage: demisto/python3:3.12.8.1983910 feed: true runonce: false script: '-' diff --git a/Packs/HelloWorld/Integrations/FeedHelloWorld/FeedHelloWorld_test.py b/Packs/HelloWorld/Integrations/FeedHelloWorld/FeedHelloWorld_test.py index 9b2cc76027d6..3deaacc99365 100644 --- a/Packs/HelloWorld/Integrations/FeedHelloWorld/FeedHelloWorld_test.py +++ b/Packs/HelloWorld/Integrations/FeedHelloWorld/FeedHelloWorld_test.py @@ -56,14 +56,13 @@ from FeedHelloWorld import Client, get_indicators_command, fetch_indicators_command from CommonServerPython import tableToMarkdown, string_to_table_header import json -import io URL = "https://openphish.com/feed.txt" def util_load_json(path): - with io.open(path, mode='r', encoding='utf-8') as f: + with open(path, encoding='utf-8') as f: return json.loads(f.read()) @@ -78,7 +77,7 @@ def test_build_iterator(requests_mock): - Returns a list of the indicators parsed from the API's response """ - with open('test_data/FeedHelloWorld_mock.txt', 'r') as file: + with open('test_data/FeedHelloWorld_mock.txt') as file: response = file.read() requests_mock.get(URL, text=response) expected_url = 'https://url1.com/path' @@ -91,7 +90,7 @@ def test_build_iterator(requests_mock): url_indicators = {indicator['value'] for indicator in indicators if indicator['type'] == 'URL'} url_relation_domains = [indicator['relations'] for indicator in indicators if indicator['type'] == 'URL'] assert expected_url in url_indicators - assert 'url1.com' == url_relation_domains[0][0].get('value') + assert url_relation_domains[0][0].get('value') == 'url1.com' def test_fetch_indicators(mocker): diff --git a/Packs/HelloWorld/ReleaseNotes/3_0_15.md b/Packs/HelloWorld/ReleaseNotes/3_0_15.md new file mode 100644 index 000000000000..7f98253ac632 --- /dev/null +++ b/Packs/HelloWorld/ReleaseNotes/3_0_15.md @@ -0,0 +1,9 @@ + +#### Integrations + +##### HelloWorld Feed +- Updated the Docker image to: *demisto/python3:3.12.8.1983910*. + + + + diff --git a/Packs/HelloWorld/pack_metadata.json b/Packs/HelloWorld/pack_metadata.json index 7bbaf272171c..8fb49ae87717 100644 --- a/Packs/HelloWorld/pack_metadata.json +++ b/Packs/HelloWorld/pack_metadata.json @@ -2,7 +2,7 @@ "name": "HelloWorld", "description": "This is the Hello World integration for getting started.", "support": "community", - "currentVersion": "3.0.14", + "currentVersion": "3.0.15", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/Hudsonrock/Integrations/Hudsonrock/Hudsonrock.py b/Packs/Hudsonrock/Integrations/Hudsonrock/Hudsonrock.py index 5aa373b3c496..077959721728 100644 --- a/Packs/Hudsonrock/Integrations/Hudsonrock/Hudsonrock.py +++ b/Packs/Hudsonrock/Integrations/Hudsonrock/Hudsonrock.py @@ -13,6 +13,7 @@ def query(self, suffix: str) -> Dict[str, Any]: url_suffix=suffix ) + def test_module(client: Client, query: str) -> str: result = client.query(query) if result: @@ -20,6 +21,7 @@ def test_module(client: Client, query: str) -> str: else: return 'Test failed: ' + str(result) + def create_indicator_output(results: Dict[str, Any], indicator: str, indicatortype: str, reliability: str) -> CommandResults: if indicatortype == 'ip': indicator_type = DBotScoreType.IP @@ -52,7 +54,6 @@ def create_indicator_output(results: Dict[str, Any], indicator: str, indicatorty ) - def create_output(results: Dict[str, Any], endpoint: str, keyfield: str = '') -> CommandResults: human_readable = tableToMarkdown('Hudsonrock results', results) return CommandResults( @@ -63,7 +64,6 @@ def create_output(results: Dict[str, Any], endpoint: str, keyfield: str = '') -> ) - def main(): base_url = demisto.params()['url'] full_url = f'{base_url}api/json/v2/osint-tools/' diff --git a/Packs/Hudsonrock/Integrations/Hudsonrock/Hudsonrock.yml b/Packs/Hudsonrock/Integrations/Hudsonrock/Hudsonrock.yml index 24ab7bcf7241..ec03ab828db4 100644 --- a/Packs/Hudsonrock/Integrations/Hudsonrock/Hudsonrock.yml +++ b/Packs/Hudsonrock/Integrations/Hudsonrock/Hudsonrock.yml @@ -103,7 +103,7 @@ script: description: Username reputation. type: string description: Send username reputation query. - dockerimage: demisto/python3:3.10.14.101217 + dockerimage: demisto/python3:3.12.8.1983910 runonce: false subtype: python3 fromversion: 6.10.0 diff --git a/Packs/Hudsonrock/ReleaseNotes/1_0_1.md b/Packs/Hudsonrock/ReleaseNotes/1_0_1.md new file mode 100644 index 000000000000..010ed387595e --- /dev/null +++ b/Packs/Hudsonrock/ReleaseNotes/1_0_1.md @@ -0,0 +1,9 @@ + +#### Integrations + +##### Hudsonrock +- Updated the Docker image to: *demisto/python3:3.12.8.1983910*. + + + + diff --git a/Packs/Hudsonrock/pack_metadata.json b/Packs/Hudsonrock/pack_metadata.json index 460a0bf95f27..dff7c74113d4 100644 --- a/Packs/Hudsonrock/pack_metadata.json +++ b/Packs/Hudsonrock/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Hudsonrock", "description": "Indicator enrichment from Hudsonrock free APIs", "support": "community", - "currentVersion": "1.0.0", + "currentVersion": "1.0.1", "author": "Harri Ruuttila", "url": "", "email": "", diff --git a/Packs/Impartner/Integrations/Impartner/Impartner.py b/Packs/Impartner/Integrations/Impartner/Impartner.py index c857e048eeef..33159ca33296 100644 --- a/Packs/Impartner/Integrations/Impartner/Impartner.py +++ b/Packs/Impartner/Integrations/Impartner/Impartner.py @@ -3,7 +3,7 @@ from CommonServerUserPython import * # noqa import urllib3 -from typing import Dict, Any +from typing import Any # Disable insecure warnings urllib3.disable_warnings() @@ -32,7 +32,7 @@ def get_accounts_list(self, params): return result def get_accounts_id(self, id, params): - result = self._http_request(method="GET", url_suffix=f"/account/{id}", params=params, headers=self._headers) + result = self._http_request(method="GET", url_suffix=f"/account/{id}", params=params, headers=self._headers) return result @@ -63,7 +63,7 @@ def test_module(client: Client) -> str: # pragma: no cover return message -def impartner_get_account_list_command(client: Client, args: Dict[str, Any]) -> CommandResults: +def impartner_get_account_list_command(client: Client, args: dict[str, Any]) -> CommandResults: query = args.get('query', '') fields = args.get('fields', 'name, id, recordLink, tech_BD_Assigned_for_XSOAR__cf') @@ -84,7 +84,7 @@ def impartner_get_account_list_command(client: Client, args: Dict[str, Any]) -> outputs=parsed_result) -def impartner_get_account_id_command(client: Client, args: Dict[str, Any]) -> CommandResults: +def impartner_get_account_id_command(client: Client, args: dict[str, Any]) -> CommandResults: id = args.get('id') fields = args.get('fields') @@ -115,7 +115,7 @@ def impartner_get_account_id_command(client: Client, args: Dict[str, Any]) -> Co 'account_Integration_Status__cf': parsed_result.get('account_Integration_Status__cf'), 'accountTimeline': parsed_result.get('if_there_is_a_timeline_to_complete_the_integration_please_enter' '_the_date__cf') - } + } else: context_result = {'name': parsed_result.get('name'), 'id': parsed_result.get('id'), 'link': parsed_result.get('recordLink'), diff --git a/Packs/Impartner/Integrations/Impartner/Impartner.yml b/Packs/Impartner/Integrations/Impartner/Impartner.yml index 42906b55e9f4..f426024382f0 100644 --- a/Packs/Impartner/Integrations/Impartner/Impartner.yml +++ b/Packs/Impartner/Integrations/Impartner/Impartner.yml @@ -143,7 +143,7 @@ script: script: '-' type: python subtype: python3 - dockerimage: demisto/python3:3.11.9.105369 + dockerimage: demisto/python3:3.12.8.1983910 fromversion: 6.0.0 tests: - No tests (auto formatted) diff --git a/Packs/Impartner/Integrations/Impartner/Impartner_test.py b/Packs/Impartner/Integrations/Impartner/Impartner_test.py index af96ebeb17f1..c0afcb805450 100644 --- a/Packs/Impartner/Integrations/Impartner/Impartner_test.py +++ b/Packs/Impartner/Integrations/Impartner/Impartner_test.py @@ -1,9 +1,9 @@ import json -import io import pytest + def util_load_json(path): - with io.open(path, mode='r', encoding='utf-8') as f: + with open(path, encoding='utf-8') as f: return json.loads(f.read()) @@ -34,22 +34,22 @@ def test_list_command(mocker): @pytest.mark.parametrize( "args, res", [ - ({'id': '1111', 'all_fields': 'TRUE'},{'id': 11111111, 'isActive': True, 'tech_BD_Assigned_for_XSOAR__cf': 'Edi', - 'mailingCity': 'Palo Alto', 'mailingCountry': 'United States', - 'mailingPostalCode': '11111', 'mailingState': 'California', - 'mailingStreet': '236 test Ave', 'name': 'test_account', - 'recordLink': 'https://prod.impartner.live/load/ACT/11111111', - 'website': 'https://www.test-account.ai/', 'mainProductToIntegrate': 'test', - 'mutualCustomer': 'test', 'tpA_Product_s__cf': 'test', - 'integration_Status__cf': 'Integration Approved', - 'target_customers__cf': ['Large Enterprise', 'SMB', 'SME'], - 'company_Main_Market_Segment__cf': ['Automation Orchestration & SOC tools', - 'Data Security Governance & Classification'], - 'panW_Integration_Product__cf': ['test'], - 'account_Integration_Status__cf': ['Integrations in Process'], - 'accountTimeline': '2022-06-30T00:00:00'}), - ({'id': '1111', 'all_fields': 'FALSE'},{'tech_BD_Assigned_for_XSOAR__cf': 'Edi', 'id': 11111111, - 'link': 'https://prod.impartner.live/load/ACT/11111111', 'name': 'test_account'}) + ({'id': '1111', 'all_fields': 'TRUE'}, {'id': 11111111, 'isActive': True, 'tech_BD_Assigned_for_XSOAR__cf': 'Edi', + 'mailingCity': 'Palo Alto', 'mailingCountry': 'United States', + 'mailingPostalCode': '11111', 'mailingState': 'California', + 'mailingStreet': '236 test Ave', 'name': 'test_account', + 'recordLink': 'https://prod.impartner.live/load/ACT/11111111', + 'website': 'https://www.test-account.ai/', 'mainProductToIntegrate': 'test', + 'mutualCustomer': 'test', 'tpA_Product_s__cf': 'test', + 'integration_Status__cf': 'Integration Approved', + 'target_customers__cf': ['Large Enterprise', 'SMB', 'SME'], + 'company_Main_Market_Segment__cf': ['Automation Orchestration & SOC tools', + 'Data Security Governance & Classification'], + 'panW_Integration_Product__cf': ['test'], + 'account_Integration_Status__cf': ['Integrations in Process'], + 'accountTimeline': '2022-06-30T00:00:00'}), + ({'id': '1111', 'all_fields': 'FALSE'}, {'tech_BD_Assigned_for_XSOAR__cf': 'Edi', 'id': 11111111, + 'link': 'https://prod.impartner.live/load/ACT/11111111', 'name': 'test_account'}) ] ) def test_id_command(mocker, args, res): @@ -72,4 +72,4 @@ def test_id_command(mocker, args, res): mocker.patch('Impartner.Client.get_accounts_id', return_value=api_response) response = impartner_get_account_id_command(client, args) - assert response.outputs == res \ No newline at end of file + assert response.outputs == res diff --git a/Packs/Impartner/ReleaseNotes/1_0_3.md b/Packs/Impartner/ReleaseNotes/1_0_3.md new file mode 100644 index 000000000000..8b9798634234 --- /dev/null +++ b/Packs/Impartner/ReleaseNotes/1_0_3.md @@ -0,0 +1,9 @@ + +#### Integrations + +##### Impartner +- Updated the Docker image to: *demisto/python3:3.12.8.1983910*. + + + + diff --git a/Packs/Impartner/pack_metadata.json b/Packs/Impartner/pack_metadata.json index 8bee131765c5..9b5eb5062782 100644 --- a/Packs/Impartner/pack_metadata.json +++ b/Packs/Impartner/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Impartner", "description": "Pack for integrating Impartner - a company that specializes in providing Partner Relationship Management (PRM) solutions ", "support": "community", - "currentVersion": "1.0.2", + "currentVersion": "1.0.3", "author": "Edi Katsenelson", "url": "", "email": "", diff --git a/Packs/NTT_Cyber_Threat_Sensor/Integrations/NTT_Cyber_Threat_Sensor/NTT_Cyber_Threat_Sensor.py b/Packs/NTT_Cyber_Threat_Sensor/Integrations/NTT_Cyber_Threat_Sensor/NTT_Cyber_Threat_Sensor.py index 72da3f60622e..c2d55414700e 100644 --- a/Packs/NTT_Cyber_Threat_Sensor/Integrations/NTT_Cyber_Threat_Sensor/NTT_Cyber_Threat_Sensor.py +++ b/Packs/NTT_Cyber_Threat_Sensor/Integrations/NTT_Cyber_Threat_Sensor/NTT_Cyber_Threat_Sensor.py @@ -2,9 +2,7 @@ from CommonServerPython import * # noqa: F401 import json import base64 -from datetime import datetime -from datetime import timezone -from datetime import timedelta +from datetime import datetime, timedelta, UTC import requests import dateutil.parser import urllib3 @@ -29,9 +27,9 @@ HEADERS = { 'Content-Type': 'application/json', 'Accept': 'application/json', - 'x-api-key': '{}'.format(APIKEY), - 'x-soar-token': '{}'.format(SOARTOKEN), - 'tenant-id': '{}'.format(TENANT_ID) + 'x-api-key': f'{APIKEY}', + 'x-soar-token': f'{SOARTOKEN}', + 'tenant-id': f'{TENANT_ID}' } """HELPER FUNCTIONS @@ -68,7 +66,7 @@ def http_request(method, url_suffix, json_dict=None, params=None, headers=None, if res.status_code == 401: raise DemistoException('UnauthorizedError: please validate your credentials.') if res.status_code not in {200}: - raise DemistoException('Error in API call [{}] - {}'.format(res.status_code, res.reason)) + raise DemistoException(f'Error in API call [{res.status_code}] - {res.reason}') return res.json() @@ -77,7 +75,7 @@ def download(url): """ r = requests.request('GET', url) if r.status_code != requests.codes.ok: - return_error('Error in API call to download %s - %s' % (url, r.text)) + return_error(f'Error in API call to download {url} - {r.text}') return r @@ -104,7 +102,7 @@ def item_to_incident(item): def fetch_incidents(): """Fetch incidents from the API """ - data = dict() + data = {} last_run = demisto.getLastRun() if last_run and 'timestamp' in last_run: @@ -112,12 +110,12 @@ def fetch_incidents(): if 'offset' in last_run: data['offset'] = last_run['offset'] else: - last_run = dict() + last_run = {} last_run['timestamp'] = (datetime.now() - timedelta(days=int(DAYS_BACK))).isoformat() data['after'] = last_run['timestamp'] data['limit'] = int(ITEMS_TO_FETCH) - artifacts_meta = list() + artifacts_meta = [] results_meta = http_request('POST', '/artifacts/alerts', json_dict=data) if 'alerts' in results_meta: for result_meta in results_meta['alerts']: @@ -128,7 +126,7 @@ def fetch_incidents(): last_run.pop('offset', None) last_run['timestamp'] = datetime.now().isoformat() - incidents = list() + incidents = [] for artifact_meta in artifacts_meta: demisto.debug('\nRequesting data for event: {}\n\n'.format(artifact_meta['event_id'])) result_artifact = http_request('GET', '/artifacts/alerts/%s' % artifact_meta['event_id']) @@ -142,12 +140,12 @@ def poll_blobs(): """Check if one or more blobs from provided event_id is ready for download """ event_id = demisto.args().get('event_id') - cntext = dict() + cntext = {} cntext['ID'] = event_id if demisto.args().get('timestamp'): timestamp = dateutil.parser.parse(demisto.args().get('timestamp')) now = dateutil.parser.parse(datetime.utcnow().isoformat()) - diff = now.replace(tzinfo=timezone.utc) - timestamp.replace(tzinfo=timezone.utc) + diff = now.replace(tzinfo=UTC) - timestamp.replace(tzinfo=UTC) # We need to wait three minutes from the time of the event since pcap # are sent little later to make sure we record most of the triggered traffic @@ -194,7 +192,7 @@ def fetch_blobs(): """Download one or more blobs from provided event_id """ event_id = demisto.args().get('event_id') - blob_list = list() + blob_list = [] result_blobs = http_request('GET', '/artifacts/blobs/%s' % event_id) if 'blobs' in result_blobs and len(result_blobs['blobs']) > 0: for blob in result_blobs['blobs']: @@ -226,8 +224,8 @@ def fetch_blobs(): def test_module(): """Test module to verify settings """ - errors = list() - data = dict() + errors = [] + data = {} if TENANT_ID == '0000000-0000-0000-000000000' or TENANT_ID == '': errors.append('Incorrect tenant id') @@ -273,13 +271,13 @@ def main(): """Main function """ cmd = demisto.command() - demisto.debug('Command being called is {}'.format(cmd)) + demisto.debug(f'Command being called is {cmd}') try: if cmd in COMMANDS: COMMANDS[cmd]() else: - demisto.debug('Command {} not implemented'.format(cmd)) + demisto.debug(f'Command {cmd} not implemented') # Log exceptions except Exception as e: @@ -290,7 +288,7 @@ def main(): demisto.debug(str(e)) raise else: - return_error('An error occurred: {}'.format(str(e))) + return_error(f'An error occurred: {str(e)}') # python2 uses __builtin__ python3 uses builtins diff --git a/Packs/NTT_Cyber_Threat_Sensor/Integrations/NTT_Cyber_Threat_Sensor/NTT_Cyber_Threat_Sensor.yml b/Packs/NTT_Cyber_Threat_Sensor/Integrations/NTT_Cyber_Threat_Sensor/NTT_Cyber_Threat_Sensor.yml index 4ca93bba0b76..98beea86201d 100644 --- a/Packs/NTT_Cyber_Threat_Sensor/Integrations/NTT_Cyber_Threat_Sensor/NTT_Cyber_Threat_Sensor.yml +++ b/Packs/NTT_Cyber_Threat_Sensor/Integrations/NTT_Cyber_Threat_Sensor/NTT_Cyber_Threat_Sensor.yml @@ -115,7 +115,7 @@ script: type: boolean description: Collecting blobs, most commonly pcap from an incident execution: true - dockerimage: demisto/python3:3.10.14.100715 + dockerimage: demisto/python3:3.12.8.1983910 isfetch: true subtype: python3 fromversion: 5.0.0 diff --git a/Packs/NTT_Cyber_Threat_Sensor/ReleaseNotes/1_0_8.md b/Packs/NTT_Cyber_Threat_Sensor/ReleaseNotes/1_0_8.md new file mode 100644 index 000000000000..0bb33e202554 --- /dev/null +++ b/Packs/NTT_Cyber_Threat_Sensor/ReleaseNotes/1_0_8.md @@ -0,0 +1,9 @@ + +#### Integrations + +##### NTT Cyber Threat Sensor +- Updated the Docker image to: *demisto/python3:3.12.8.1983910*. + + + + diff --git a/Packs/NTT_Cyber_Threat_Sensor/pack_metadata.json b/Packs/NTT_Cyber_Threat_Sensor/pack_metadata.json index a3a14968725e..29dd8527f3d6 100644 --- a/Packs/NTT_Cyber_Threat_Sensor/pack_metadata.json +++ b/Packs/NTT_Cyber_Threat_Sensor/pack_metadata.json @@ -2,7 +2,7 @@ "name": "NTT Cyber Threat Sensor", "description": "NTT Cyber Threat Sensor integration", "support": "community", - "currentVersion": "1.0.7", + "currentVersion": "1.0.8", "author": "NTT Ltd.", "url": "https://www.global.ntt", "email": "servicedesk@global.ntt", diff --git a/Packs/NistNVD/Integrations/NistNVD/NistNVD.py b/Packs/NistNVD/Integrations/NistNVD/NistNVD.py index 82d41957f7ae..58662932cf88 100644 --- a/Packs/NistNVD/Integrations/NistNVD/NistNVD.py +++ b/Packs/NistNVD/Integrations/NistNVD/NistNVD.py @@ -68,7 +68,7 @@ def get_value_from_hierarchy(mapping, key_chain): 'CVSS Availability Impact': ['cvssData.availabilityImpact', 'availabilityImpact'] } - if (not ('vulns') in req): + if ('vulns' not in req): for i in req['vulnerabilities']: pretty_dict = {} pretty_dict['CVE ID'] = i['cve']['id'] @@ -87,25 +87,28 @@ def get_value_from_hierarchy(mapping, key_chain): if ('metrics' in list(i['cve'].keys())): cvssmetricslist = [] - for cvssmetrickey, cvssmetric in i['cve']['metrics'].items(): + for _cvssmetrickey, cvssmetric in i['cve']['metrics'].items(): cvssmetricsdict = {} cvssmetric = cvssmetric[0] for key, locations in key_locations.items(): - cvssmetricsdict[key] = next((get_value_from_hierarchy(cvssmetric, loc) \ - for loc in locations if get_value_from_hierarchy(cvssmetric, loc) is not None) - , None) + cvssmetricsdict[key] = next( + ( + get_value_from_hierarchy(cvssmetric, loc) + for loc in locations + if get_value_from_hierarchy(cvssmetric, loc) is not None + ), + None, + ) cvssmetricslist.append(cvssmetricsdict) pretty_dict['metrics'] = cvssmetricslist pretty_list.append(pretty_dict) - elif ('vulns') in req: - if (not len(req['vulns'])): - demisto.results("Vendor name may be wrong or no CPE added") + elif ('vulns') in req and (not len(req['vulns'])): + demisto.results("Vendor name may be wrong or no CPE added") - if (('result') in req): - if (not len(req['result']['CVE_Items'])): - demisto.results("There were no vulnerability in the criteria you were looking for.") + if (('result') in req) and (not len(req['result']['CVE_Items'])): + demisto.results("There were no vulnerability in the criteria you were looking for.") return pretty_list @@ -118,7 +121,7 @@ def generalSearch(): end_date = datetime.today().strftime('%Y-%m-%dT%H:%M:%S.000') startIndex = demisto.args().get('startIndex') resultsPerPage = demisto.args().get('resultsPerPage') - additional_parameters = {"lastModStartDate": f"{start_date}+00:00", "lastModEndDate": f"{end_date}+00:00", \ + additional_parameters = {"lastModStartDate": f"{start_date}+00:00", "lastModEndDate": f"{end_date}+00:00", "startIndex": f"{startIndex}", "resultsPerPage": f"{resultsPerPage}"} generalSearchRequest = connection(base_url, additional_parameters) @@ -149,7 +152,7 @@ def keywordSearch(): end_date = datetime.today().strftime('%Y-%m-%dT%H:%M:%S.000') startIndex = demisto.args().get('startIndex') resultsPerPage = demisto.args().get('resultsPerPage') - additional_parameters = {"lastModStartDate": f"{start_date}+00:00", "lastModEndDate": f"{end_date}+00:00", \ + additional_parameters = {"lastModStartDate": f"{start_date}+00:00", "lastModEndDate": f"{end_date}+00:00", "keywordSearch": keyword, "startIndex": f"{startIndex}", "resultsPerPage": f"{resultsPerPage}"} if isExactMatch: additional_parameters["keywordExactMatch"] = None @@ -188,7 +191,7 @@ def cvssSearch(): startIndex = demisto.args().get('startIndex') resultsPerPage = demisto.args().get('resultsPerPage') - additional_parameters = {"lastModStartDate": f"{start_date}+00:00", "lastModEndDate": f"{end_date}+00:00", \ + additional_parameters = {"lastModStartDate": f"{start_date}+00:00", "lastModEndDate": f"{end_date}+00:00", f"{searchParameters}": f"{value}", "startIndex": f"{startIndex}", "resultsPerPage": f"{resultsPerPage}"} generalSearchRequest = connection(base_url, additional_parameters) @@ -220,7 +223,7 @@ def cweSearch(): startIndex = demisto.args().get('startIndex') resultsPerPage = demisto.args().get('resultsPerPage') - additional_parameters = {"lastModStartDate": f"{start_date}+00:00", "lastModEndDate": f"{end_date}+00:00", \ + additional_parameters = {"lastModStartDate": f"{start_date}+00:00", "lastModEndDate": f"{end_date}+00:00", "cweId": f"{cweId}", "startIndex": f"{startIndex}", "resultsPerPage": f"{resultsPerPage}"} generalSearchRequest = connection(base_url, additional_parameters) generalVulnerabilityList = extractVulnDetails(generalSearchRequest) @@ -251,7 +254,7 @@ def cpeSearch(): startIndex = demisto.args().get('startIndex') resultsPerPage = demisto.args().get('resultsPerPage') - additional_parameters = {"lastModStartDate": f"{start_date}+00:00", "lastModEndDate": f"{end_date}+00:00", \ + additional_parameters = {"lastModStartDate": f"{start_date}+00:00", "lastModEndDate": f"{end_date}+00:00", "cpeName": f"{cpeName}", "startIndex": f"{str(startIndex)}", "resultsPerPage": f"{str(resultsPerPage)}"} generalSearchRequest = connection(base_url, additional_parameters) @@ -307,7 +310,7 @@ def main() -> None: demisto.debug(f'Command being called is {demisto.command()}') ''' EXECUTION ''' - demisto.info('command is %s' % (demisto.command(), )) + demisto.info(f'command is {demisto.command()}') try: if demisto.command() == 'test-module': demisto.results(test_module()) diff --git a/Packs/NistNVD/Integrations/NistNVD/NistNVD.yml b/Packs/NistNVD/Integrations/NistNVD/NistNVD.yml index b606d85ec421..d0fba1d7aca5 100644 --- a/Packs/NistNVD/Integrations/NistNVD/NistNVD.yml +++ b/Packs/NistNVD/Integrations/NistNVD/NistNVD.yml @@ -131,7 +131,7 @@ script: required: true description: Search specific CVE. name: nvd-search-cve - dockerimage: demisto/python3:3.11.9.107902 + dockerimage: demisto/python3:3.12.8.1983910 runonce: false script: '' subtype: python3 diff --git a/Packs/NistNVD/ReleaseNotes/2_0_1.md b/Packs/NistNVD/ReleaseNotes/2_0_1.md new file mode 100644 index 000000000000..5901f9206f67 --- /dev/null +++ b/Packs/NistNVD/ReleaseNotes/2_0_1.md @@ -0,0 +1,9 @@ + +#### Integrations + +##### Nist NVD +- Updated the Docker image to: *demisto/python3:3.12.8.1983910*. + + + + diff --git a/Packs/NistNVD/pack_metadata.json b/Packs/NistNVD/pack_metadata.json index 348b1e5ad40b..c0582557862f 100644 --- a/Packs/NistNVD/pack_metadata.json +++ b/Packs/NistNVD/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Nist NVD", "description": "This integration can be used for daily routine vulnerability checks.(and used with several playbook)\nThe National Vulnerability Database (NVD), https://nvd.nist.gov, allows government agencies, software\nvendors, and researchers to search and view information about vulnerabilities and vulnerable products. In\nthe Fall of 2019, NVD began offering web services to allow computer applications to better access the\nNVD data", "support": "community", - "currentVersion": "2.0.0", + "currentVersion": "2.0.1", "author": "Murat Ozfidan", "url": "", "email": "", diff --git a/Packs/Phishing/ReleaseNotes/3_6_34.md b/Packs/Phishing/ReleaseNotes/3_6_34.md new file mode 100644 index 000000000000..a210a73a7417 --- /dev/null +++ b/Packs/Phishing/ReleaseNotes/3_6_34.md @@ -0,0 +1,7 @@ +#### Scripts + +##### FindDuplicateEmailIncidents + +Updated the Docker image to: *demisto/sklearn:1.0.0.1858294*. + + diff --git a/Packs/Phishing/pack_metadata.json b/Packs/Phishing/pack_metadata.json index e9c9199ba69b..6423e5e4314f 100644 --- a/Packs/Phishing/pack_metadata.json +++ b/Packs/Phishing/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Phishing", "description": "Phishing emails still hooking your end users? This Content Pack can drastically reduce the time your security team spends on phishing alerts.", "support": "xsoar", - "currentVersion": "3.6.33", + "currentVersion": "3.6.34", "serverMinVersion": "6.0.0", "videos": [ "https://www.youtube.com/watch?v=SY-3L348PoY" diff --git a/Packs/RSANetWitness_v11_1/Integrations/RSANetWitnessv115/RSANetWitnessv115.py b/Packs/RSANetWitness_v11_1/Integrations/RSANetWitnessv115/RSANetWitnessv115.py index c46065311a2d..c473f7ba6747 100644 --- a/Packs/RSANetWitness_v11_1/Integrations/RSANetWitnessv115/RSANetWitnessv115.py +++ b/Packs/RSANetWitness_v11_1/Integrations/RSANetWitnessv115/RSANetWitnessv115.py @@ -1,7 +1,7 @@ import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 from requests import HTTPError -from datetime import datetime, timedelta, timezone +from datetime import datetime, timedelta, UTC ERROR_TITLES = { @@ -1381,13 +1381,13 @@ def clean_old_inc_context(max_time_mirror_inc: int): int_cont = demisto.getIntegrationContext() inc_data = int_cont.get("IncidentsDataCount", {}) current_time = datetime.now() - current_time = current_time.replace(tzinfo=timezone.utc) + current_time = current_time.replace(tzinfo=UTC) total_know = 0 res = {} for inc_id, inc in inc_data.items(): inc_created = arg_to_datetime(inc["Created"]) if inc_created: - inc_created = inc_created.replace(tzinfo=timezone.utc) + inc_created = inc_created.replace(tzinfo=UTC) diff = current_time - inc_created if diff.days <= max_time_mirror_inc: # maximum RSA aggregation time 24 days res[inc_id] = inc diff --git a/Packs/RSANetWitness_v11_1/Integrations/RSANetWitnessv115/RSANetWitnessv115.yml b/Packs/RSANetWitness_v11_1/Integrations/RSANetWitnessv115/RSANetWitnessv115.yml index 0d09a23b8798..8e2d68abad4c 100644 --- a/Packs/RSANetWitness_v11_1/Integrations/RSANetWitnessv115/RSANetWitnessv115.yml +++ b/Packs/RSANetWitness_v11_1/Integrations/RSANetWitnessv115/RSANetWitnessv115.yml @@ -2050,7 +2050,7 @@ script: - arguments: [] description: Updates the remote incident with local incident changes. This method is only used for debugging purposes and will not update the current incident. name: update-remote-system - dockerimage: demisto/python3:3.10.13.84405 + dockerimage: demisto/python3:3.12.8.1983910 isfetch: true ismappable: true isremotesyncin: true diff --git a/Packs/RSANetWitness_v11_1/ReleaseNotes/3_2_6.md b/Packs/RSANetWitness_v11_1/ReleaseNotes/3_2_6.md new file mode 100644 index 000000000000..ea3f6d162da8 --- /dev/null +++ b/Packs/RSANetWitness_v11_1/ReleaseNotes/3_2_6.md @@ -0,0 +1,9 @@ + +#### Integrations + +##### RSANetWitness v11.5 +- Updated the Docker image to: *demisto/python3:3.12.8.1983910*. + + + + diff --git a/Packs/RSANetWitness_v11_1/pack_metadata.json b/Packs/RSANetWitness_v11_1/pack_metadata.json index 83dbe0e3cdf8..eb6caaf55770 100644 --- a/Packs/RSANetWitness_v11_1/pack_metadata.json +++ b/Packs/RSANetWitness_v11_1/pack_metadata.json @@ -2,7 +2,7 @@ "name": "RSA NetWitness", "description": "RSA NetWitness Platform provides systems Logs, Network, and endpoint visibility for real-time collection, detection, and automated response with the Demisto Enterprise platform. Providing full session analysis, customers can extract critical data and effectively operate security operations automated playbook.", "support": "partner", - "currentVersion": "3.2.5", + "currentVersion": "3.2.6", "author": "Netwitness", "url": "https://www.netwitness.com/services/technical-support/", "email": "nw.paloalto.support@netwitness.com", diff --git a/Packs/SSLLabs/Integrations/SSLLabs/SSLLabs.py b/Packs/SSLLabs/Integrations/SSLLabs/SSLLabs.py index 9758d2086f7f..bfb27aee81e6 100644 --- a/Packs/SSLLabs/Integrations/SSLLabs/SSLLabs.py +++ b/Packs/SSLLabs/Integrations/SSLLabs/SSLLabs.py @@ -204,6 +204,7 @@ def register_email_command(client: Client, first_name: str, last_name: str, emai readable_output='Could not register email' ) + def info_command(client: Client) -> CommandResults: """ This API request should be used to check the availability of @@ -242,6 +243,7 @@ def info_command(client: Client) -> CommandResults: readable_output='Could not retrieve client info' ) + def analyze_command(client: Client, host: str, publish: Optional[str], start_new: Optional[str], from_cache: Optional[str], max_age: Optional[str], all_endpoints: Optional[str], ignore_mismatch: Optional[str]) -> CommandResults: @@ -303,6 +305,7 @@ def test_module(client): res = client.info() if res: return 'ok' + return None ''' ENTRY POINT ''' diff --git a/Packs/SSLLabs/Integrations/SSLLabs/SSLLabs.yml b/Packs/SSLLabs/Integrations/SSLLabs/SSLLabs.yml index 814330b818bb..2a31c802ea97 100644 --- a/Packs/SSLLabs/Integrations/SSLLabs/SSLLabs.yml +++ b/Packs/SSLLabs/Integrations/SSLLabs/SSLLabs.yml @@ -138,7 +138,7 @@ script: - contextPath: SslLabs.Analyze.certs description: a list of Cert object, representing the chain certificates in the order in which they were retrieved from the server. polling: true - dockerimage: demisto/python3:3.11.9.107902 + dockerimage: demisto/python3:3.12.8.1983910 runonce: false script: '' subtype: python3 diff --git a/Packs/SSLLabs/ReleaseNotes/1_0_1.md b/Packs/SSLLabs/ReleaseNotes/1_0_1.md new file mode 100644 index 000000000000..82d3557f55fd --- /dev/null +++ b/Packs/SSLLabs/ReleaseNotes/1_0_1.md @@ -0,0 +1,9 @@ + +#### Integrations + +##### SSL Labs +- Updated the Docker image to: *demisto/python3:3.12.8.1983910*. + + + + diff --git a/Packs/SSLLabs/pack_metadata.json b/Packs/SSLLabs/pack_metadata.json index 7314f4e838cf..631b363d6d02 100644 --- a/Packs/SSLLabs/pack_metadata.json +++ b/Packs/SSLLabs/pack_metadata.json @@ -2,7 +2,7 @@ "name": "SSL Labs", "description": "This pack integrates with Qualys SSL Labs. A free online service performs a deep analysis of the configuration of any SSL web server on the public Internet", "support": "community", - "currentVersion": "1.0.0", + "currentVersion": "1.0.1", "author": "Rich Fontaine", "url": "", "email": "", diff --git a/Packs/Smokescreen_IllusionBLACK/Integrations/Smokescreen_IllusionBLACK/Smokescreen_IllusionBLACK.py b/Packs/Smokescreen_IllusionBLACK/Integrations/Smokescreen_IllusionBLACK/Smokescreen_IllusionBLACK.py index 260e1ca7ae84..101d12608204 100644 --- a/Packs/Smokescreen_IllusionBLACK/Integrations/Smokescreen_IllusionBLACK/Smokescreen_IllusionBLACK.py +++ b/Packs/Smokescreen_IllusionBLACK/Integrations/Smokescreen_IllusionBLACK/Smokescreen_IllusionBLACK.py @@ -1,7 +1,7 @@ import demistomock as demisto from CommonServerPython import * -from datetime import timezone +from datetime import datetime, UTC from typing import Any import json @@ -308,14 +308,14 @@ def fetch_incidents(first_fetch, client): client: IllusionBLACK client Returns: Demisto Incidents """ - now = datetime.now(tz=timezone.utc) + now = datetime.now(tz=UTC) demisto.info(f"IllusionBLACK: Fetching incidents at {now}") demisto_last_run = demisto.getLastRun() if "last_run" in demisto_last_run: last_run = datetime.fromisoformat(demisto_last_run["last_run"]) else: last_run, _ = parse_date_range(first_fetch) - last_run = last_run.replace(tzinfo=timezone.utc) + last_run = last_run.replace(tzinfo=UTC) if now - last_run < timedelta(minutes=5): return [] from_time = last_run.replace(microsecond=0).isoformat() diff --git a/Packs/Smokescreen_IllusionBLACK/Integrations/Smokescreen_IllusionBLACK/Smokescreen_IllusionBLACK.yml b/Packs/Smokescreen_IllusionBLACK/Integrations/Smokescreen_IllusionBLACK/Smokescreen_IllusionBLACK.yml index 927c791bbeb5..e7cea1e5a3bd 100644 --- a/Packs/Smokescreen_IllusionBLACK/Integrations/Smokescreen_IllusionBLACK/Smokescreen_IllusionBLACK.yml +++ b/Packs/Smokescreen_IllusionBLACK/Integrations/Smokescreen_IllusionBLACK/Smokescreen_IllusionBLACK.yml @@ -138,7 +138,7 @@ script: - contextPath: IllusionBlack.Event.type description: IllusionBLACK Event Attack Type. type: Unknown - dockerimage: demisto/python3:3.10.14.95956 + dockerimage: demisto/python3:3.12.8.1983910 isfetch: true runonce: false script: '-' diff --git a/Packs/Smokescreen_IllusionBLACK/ReleaseNotes/1_0_16.md b/Packs/Smokescreen_IllusionBLACK/ReleaseNotes/1_0_16.md new file mode 100644 index 000000000000..6b3928b884c5 --- /dev/null +++ b/Packs/Smokescreen_IllusionBLACK/ReleaseNotes/1_0_16.md @@ -0,0 +1,9 @@ + +#### Integrations + +##### Smokescreen IllusionBLACK +- Updated the Docker image to: *demisto/python3:3.12.8.1983910*. + + + + diff --git a/Packs/Smokescreen_IllusionBLACK/pack_metadata.json b/Packs/Smokescreen_IllusionBLACK/pack_metadata.json index 3b192a5f206a..2df02a6a611d 100644 --- a/Packs/Smokescreen_IllusionBLACK/pack_metadata.json +++ b/Packs/Smokescreen_IllusionBLACK/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Smokescreen IllusionBLACK", "description": "Smokescreen IllusionBLACK is a deception-based threat defense platform designed to accurately and efficiently detect targeted threats including reconnaissance, lateral movement, malware-less attacks, social engineering, Man-in-the-Middle attacks, and ransomware in real-time.", "support": "partner", - "currentVersion": "1.0.15", + "currentVersion": "1.0.16", "author": "Smokescreen Technologies", "url": "", "email": "customersupport@smokescreen.io", diff --git a/Packs/StellarCyber/Integrations/StellarCyber/StellarCyber.py b/Packs/StellarCyber/Integrations/StellarCyber/StellarCyber.py index e4201519801d..e22206d0f367 100644 --- a/Packs/StellarCyber/Integrations/StellarCyber/StellarCyber.py +++ b/Packs/StellarCyber/Integrations/StellarCyber/StellarCyber.py @@ -8,7 +8,7 @@ import json import urllib3 import base64 -from datetime import datetime, timedelta, timezone +from datetime import datetime, timedelta, UTC # Disable insecure warnings @@ -32,7 +32,7 @@ def __str__(self): @property def expired(self) -> bool: - return self._expiration < int(datetime.now(timezone.utc).timestamp()) + return self._expiration < int(datetime.now(UTC).timestamp()) class Client(BaseClient): diff --git a/Packs/StellarCyber/Integrations/StellarCyber/StellarCyber.yml b/Packs/StellarCyber/Integrations/StellarCyber/StellarCyber.yml index b35512577d23..8077520370a9 100644 --- a/Packs/StellarCyber/Integrations/StellarCyber/StellarCyber.yml +++ b/Packs/StellarCyber/Integrations/StellarCyber/StellarCyber.yml @@ -277,7 +277,7 @@ script: script: "-" type: python subtype: python3 - dockerimage: demisto/python3:3.10.14.92207 + dockerimage: demisto/python3:3.12.8.1983910 feed: false isfetch: true ismappable: false diff --git a/Packs/StellarCyber/ReleaseNotes/1_0_1.md b/Packs/StellarCyber/ReleaseNotes/1_0_1.md new file mode 100644 index 000000000000..d01c1c1a34d4 --- /dev/null +++ b/Packs/StellarCyber/ReleaseNotes/1_0_1.md @@ -0,0 +1,9 @@ + +#### Integrations + +##### Stellar Cyber +- Updated the Docker image to: *demisto/python3:3.12.8.1983910*. + + + + diff --git a/Packs/StellarCyber/pack_metadata.json b/Packs/StellarCyber/pack_metadata.json index 98a405ddfc05..177f95ed4f22 100644 --- a/Packs/StellarCyber/pack_metadata.json +++ b/Packs/StellarCyber/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Stellar Cyber", "description": "Integration to retrieve and update cases from the Stellar Cyber platform.", "support": "partner", - "currentVersion": "1.0.0", + "currentVersion": "1.0.1", "author": "Stellar Cyber", "url": "https://success.stellarcyber.ai/", "email": "support@stellarcyber.ai", diff --git a/Packs/SumoLogic_Cloud_SIEM/Integrations/SumoLogicCloudSIEM/SumoLogicCloudSIEM.yml b/Packs/SumoLogic_Cloud_SIEM/Integrations/SumoLogicCloudSIEM/SumoLogicCloudSIEM.yml index cf6ac11c9d75..c63e567efc8c 100644 --- a/Packs/SumoLogic_Cloud_SIEM/Integrations/SumoLogicCloudSIEM/SumoLogicCloudSIEM.yml +++ b/Packs/SumoLogic_Cloud_SIEM/Integrations/SumoLogicCloudSIEM/SumoLogicCloudSIEM.yml @@ -859,7 +859,7 @@ script: description: Server response (True or False). type: Boolean description: Add a Threat Intel Indicator to an Threat Intel Source. - dockerimage: demisto/python3:3.10.14.91134 + dockerimage: demisto/python3:3.12.8.1983910 isfetch: true isremotesyncin: true isremotesyncout: true diff --git a/Packs/SumoLogic_Cloud_SIEM/Integrations/SumoLogicCloudSIEM/SumoLogicCloudSIEM_test.py b/Packs/SumoLogic_Cloud_SIEM/Integrations/SumoLogicCloudSIEM/SumoLogicCloudSIEM_test.py index da8ca1cbb8f0..4840495a5389 100644 --- a/Packs/SumoLogic_Cloud_SIEM/Integrations/SumoLogicCloudSIEM/SumoLogicCloudSIEM_test.py +++ b/Packs/SumoLogic_Cloud_SIEM/Integrations/SumoLogicCloudSIEM/SumoLogicCloudSIEM_test.py @@ -9,8 +9,7 @@ import json -from datetime import datetime -from datetime import timezone +from datetime import datetime, UTC MOCK_URL = 'https://test.com/api' RECORD_SUMMARY_FIELDS_DEFAULT = ( @@ -521,7 +520,7 @@ def test_fetch_incidents(requests_mock): assert incidents[1].get('name') == 'Defense Evasion with Persistence - INSIGHT-232' assert incidents[1].get('occurred') == '2021-05-18T14:46:47.000Z' latest_created_time = datetime.strptime(incidents[1].get('occurred'), '%Y-%m-%dT%H:%M:%S.%fZ') - assert next_run.get('last_fetch') == int(latest_created_time.replace(tzinfo=timezone.utc).timestamp()) + assert next_run.get('last_fetch') == int(latest_created_time.replace(tzinfo=UTC).timestamp()) def test_fetch_incidents_with_signals(requests_mock): @@ -587,7 +586,7 @@ def test_fetch_incidents_with_signals(requests_mock): assert incidents[13].get('name') == 'Defense Evasion with Persistence - INSIGHT-232' assert incidents[13].get('occurred') == '2021-05-18T14:46:47.000Z' latest_created_time = datetime.strptime(incidents[13].get('occurred'), '%Y-%m-%dT%H:%M:%S.%fZ') - assert next_run.get('last_fetch') == int(latest_created_time.replace(tzinfo=timezone.utc).timestamp()) + assert next_run.get('last_fetch') == int(latest_created_time.replace(tzinfo=UTC).timestamp()) DEMISTO_ARGS = {'api_endpoint': MOCK_URL, diff --git a/Packs/SumoLogic_Cloud_SIEM/ReleaseNotes/1_1_28.md b/Packs/SumoLogic_Cloud_SIEM/ReleaseNotes/1_1_28.md new file mode 100644 index 000000000000..1cefdb39911f --- /dev/null +++ b/Packs/SumoLogic_Cloud_SIEM/ReleaseNotes/1_1_28.md @@ -0,0 +1,9 @@ + +#### Integrations + +##### Sumo Logic Cloud SIEM +- Updated the Docker image to: *demisto/python3:3.12.8.1983910*. + + + + diff --git a/Packs/SumoLogic_Cloud_SIEM/pack_metadata.json b/Packs/SumoLogic_Cloud_SIEM/pack_metadata.json index d3a2ea9014a3..14e81a869246 100644 --- a/Packs/SumoLogic_Cloud_SIEM/pack_metadata.json +++ b/Packs/SumoLogic_Cloud_SIEM/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Sumo Logic Cloud SIEM", "description": "Sumo Logic Cloud SIEM provides threat detection and incident response for modern IT environments. This content pack will allow you to apply automation to perform actual SOC analyst workflows. Using this content pack you will be able to fetch Incidents via Insights, update status of an Insight, add items to match list, add Threat Intel Indicators to Threat Intel Sources, and so on.", "support": "partner", - "currentVersion": "1.1.27", + "currentVersion": "1.1.28", "author": "Sumo Logic", "url": "https://www.sumologic.com/solutions/cloud-siem-enterprise/", "email": "support@sumologic.com", diff --git a/Packs/Traceable/Integrations/Traceable/Traceable.py b/Packs/Traceable/Integrations/Traceable/Traceable.py index a561294722e4..5ed0f8134c5a 100644 --- a/Packs/Traceable/Integrations/Traceable/Traceable.py +++ b/Packs/Traceable/Integrations/Traceable/Traceable.py @@ -7,7 +7,7 @@ import urllib3 from urllib import parse from string import Template -from datetime import datetime, timezone, timedelta +from datetime import datetime, timedelta, UTC from concurrent.futures import ThreadPoolExecutor import requests from requests.adapters import HTTPAdapter, Retry @@ -1063,8 +1063,8 @@ def fetch_incidents(client: Client, last_run, first_fetch_time): # Update last run and add incident if the incident is newer than last fetch if incident_created_time.replace( - tzinfo=timezone.utc - ) > latest_created_time.replace(tzinfo=timezone.utc): + tzinfo=UTC + ) > latest_created_time.replace(tzinfo=UTC): latest_created_time = incident_created_time next_run = {"last_fetch": latest_created_time.strftime(DATE_FORMAT)} diff --git a/Packs/Traceable/Integrations/Traceable/Traceable.yml b/Packs/Traceable/Integrations/Traceable/Traceable.yml index 22b15b900704..663c2bb6b3c4 100644 --- a/Packs/Traceable/Integrations/Traceable/Traceable.yml +++ b/Packs/Traceable/Integrations/Traceable/Traceable.yml @@ -177,7 +177,7 @@ script: script: "-" type: python subtype: python3 - dockerimage: demisto/python3:3.10.13.86272 + dockerimage: demisto/python3:3.12.8.1983910 commands: - name: list_incident_cache description: List the entries present in the Traceable instance cache. diff --git a/Packs/Traceable/ReleaseNotes/1_1_5.md b/Packs/Traceable/ReleaseNotes/1_1_5.md new file mode 100644 index 000000000000..666aeef47c31 --- /dev/null +++ b/Packs/Traceable/ReleaseNotes/1_1_5.md @@ -0,0 +1,10 @@ + +#### Integrations + +##### Traceable +- Updated the Docker image to: *demisto/python3:3.12.8.1983910*. + + + + + diff --git a/Packs/Traceable/pack_metadata.json b/Packs/Traceable/pack_metadata.json index 0062e9d1971d..0031cf1945d5 100644 --- a/Packs/Traceable/pack_metadata.json +++ b/Packs/Traceable/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Traceable", "description": "Traceable AI API Security Platform Integration", "support": "partner", - "currentVersion": "1.1.4", + "currentVersion": "1.1.5", "author": "Traceable Inc", "url": "mailto:support@traceable.ai", "email": "", diff --git a/Packs/VirusTotal/Integrations/VirusTotalV3/VirusTotalV3.yml b/Packs/VirusTotal/Integrations/VirusTotalV3/VirusTotalV3.yml index a181f78f49ea..7365bfd91aea 100644 --- a/Packs/VirusTotal/Integrations/VirusTotalV3/VirusTotalV3.yml +++ b/Packs/VirusTotal/Integrations/VirusTotalV3/VirusTotalV3.yml @@ -1692,7 +1692,7 @@ script: description: The analysis ID. type: String - dockerimage: demisto/python3:3.11.9.101916 + dockerimage: demisto/python3:3.12.8.1983910 tests: - VirusTotalV3-test - VirusTotal (API v3) Detonate Test diff --git a/Packs/VirusTotal/ReleaseNotes/2_6_27.md b/Packs/VirusTotal/ReleaseNotes/2_6_27.md new file mode 100644 index 000000000000..8aaa7743141a --- /dev/null +++ b/Packs/VirusTotal/ReleaseNotes/2_6_27.md @@ -0,0 +1,9 @@ + +#### Integrations + +##### VirusTotal (API v3) +- Updated the Docker image to: *demisto/python3:3.12.8.1983910*. + + + + diff --git a/Packs/VirusTotal/pack_metadata.json b/Packs/VirusTotal/pack_metadata.json index cee92a9d6ed1..a1ff4a4a11db 100644 --- a/Packs/VirusTotal/pack_metadata.json +++ b/Packs/VirusTotal/pack_metadata.json @@ -2,7 +2,7 @@ "name": "VirusTotal", "description": "Analyze suspicious hashes, URLs, domains and IP addresses", "support": "partner", - "currentVersion": "2.6.26", + "currentVersion": "2.6.27", "author": "VirusTotal", "url": "https://www.virustotal.com", "email": "contact@virustotal.com",