enable the evaluations of empty variables by enabling dpath to traverse empty values
@@ -14,6 +14,8 @@ from checkov.terraform.context_parsers.registry import parser_registry
from checkov.terraform.evaluation.base_variable_evaluation import BaseVariableEvaluation
from checkov.terraform.evaluation.evaluation_methods.const_variable_evaluation import ConstVariableEvaluation
from checkov.terraform.parser import Parser
+# Allow the evaluation of empty variables
+dpath.options.ALLOW_EMPTY_STRING_KEYS = True
TRUE_STRING = "true"
ONE_STRING = "1"
@@ -88,7 +90,8 @@ class Runner(BaseRunner):
self.run_block(definition[block_type], definitions_context, full_file_path, report, scanned_file,
block_type, runner_filter)
- def run_block(self, entities, definition_context, full_file_path, report, scanned_file, block_type,runner_filter=None):
+ def run_block(self, entities, definition_context, full_file_path, report, scanned_file, block_type,
+ runner_filter=None):
registry = self.block_type_registries[block_type]
if registry:
for entity in entities:
