From 64223ac42ad3d8784088524ed9290cbc3e1d94f2 Mon Sep 17 00:00:00 2001 From: jmbodelon Date: Wed, 12 Jun 2024 16:50:17 +0200 Subject: [PATCH] [client] Prevent IndexError when reading Case-Incident in OpenCTIConnectorHelper --- pycti/connector/opencti_connector_helper.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pycti/connector/opencti_connector_helper.py b/pycti/connector/opencti_connector_helper.py index 104101c3..f8c8c704 100644 --- a/pycti/connector/opencti_connector_helper.py +++ b/pycti/connector/opencti_connector_helper.py @@ -315,7 +315,9 @@ def _data_handler(self, json_data) -> None: e for e in stix_objects if e["id"] == opencti_entity["standard_id"] - ][0] + ] + if stix_entity: + stix_entity = stix_entity[0] event_data["stix_objects"] = stix_objects event_data["stix_entity"] = stix_entity # Handle organization propagation