From 4ea1bfc29a9bd908704a8266fe42dedcca0fd487 Mon Sep 17 00:00:00 2001 From: Omri Yoffe Date: Mon, 2 Dec 2024 16:22:53 +0200 Subject: [PATCH] error handling --- checkov/arm/runner.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/checkov/arm/runner.py b/checkov/arm/runner.py index 5dd9b505e6c..6404bc0c5cd 100644 --- a/checkov/arm/runner.py +++ b/checkov/arm/runner.py @@ -265,6 +265,10 @@ def add_graph_check_results(self, report: Report, runner_filter: RunnerFilter) - start_line = entity[START_LINE] - 1 end_line = entity[END_LINE] - 1 + if CustomAttributes.RESOURCE_TYPE not in entity or CustomAttributes.BLOCK_NAME not in entity: + logging.debug(f"Could not determine 'resource_id' of Entity {entity_file_path}") + continue + self.build_record( report=report, check=check,