ensure variables section is key-value pairs
@@ -21,6 +21,7 @@ class LambdaEnvironmentCredentials(BaseResourceCheck):
environment = properties['Environment']
if 'Variables' in environment.keys():
variables = environment['Variables']
+ if isinstance(variables, dict):
for var_name, value in variables.items():
if string_has_secrets(str(value), AWS, GENERAL):
self.evaluated_keys = [f'Properties/Environment/Variables/{var_name}']
