From a1849d88eb84090d8f0bc6dbf07787e9e19e5865 Mon Sep 17 00:00:00 2001 From: pabloperezj Date: Sat, 21 Sep 2024 19:47:19 +0200 Subject: [PATCH] nit --- .../Integrations/IoCStream/IoCStream.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Packs/GoogleThreatIntelligence/Integrations/IoCStream/IoCStream.py b/Packs/GoogleThreatIntelligence/Integrations/IoCStream/IoCStream.py index 5034b9ca903..922a745c18a 100644 --- a/Packs/GoogleThreatIntelligence/Integrations/IoCStream/IoCStream.py +++ b/Packs/GoogleThreatIntelligence/Integrations/IoCStream/IoCStream.py @@ -149,7 +149,7 @@ def _get_indicator_type(item: dict): def _get_indicator_id(item: dict): """Gets indicator ID.""" if item['type'] == 'url': - return item.get('attributes', {}).get('url') + return item.get('attributes', {}).get('url') or item['id'] return item['id'] @@ -158,7 +158,7 @@ def _add_file_attributes(indicator_obj: dict, attributes: dict) -> dict: indicator_obj['fields'].update({ 'md5': attributes.get('md5'), 'sha1': attributes.get('sha1'), - 'sha256': attributes['sha256'], + 'sha256': attributes.get('sha256'), 'ssdeep': attributes.get('ssdeep'), 'fileextension': attributes.get('type_extension'), 'filetype': attributes.get('type_tag'),