From d4b31cb000f794d4a63d96c8a27158d72b64fa4c Mon Sep 17 00:00:00 2001 From: ChanochShayner <57212002+ChanochShayner@users.noreply.github.com> Date: Wed, 19 Oct 2022 13:52:43 +0300 Subject: [PATCH] fix(cloudformation): Fix ALBListenerTLS12 check (#3697) CFN Check fix --- checkov/cloudformation/checks/resource/aws/ALBListenerTLS12.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/checkov/cloudformation/checks/resource/aws/ALBListenerTLS12.py b/checkov/cloudformation/checks/resource/aws/ALBListenerTLS12.py index 3f6a72bc1b6..2beb54488aa 100644 --- a/checkov/cloudformation/checks/resource/aws/ALBListenerTLS12.py +++ b/checkov/cloudformation/checks/resource/aws/ALBListenerTLS12.py @@ -38,7 +38,7 @@ def scan_resource_conf(self, conf: dict[str, Any]) -> CheckResult: protocol = conf['Properties']['Protocol'] if protocol in ('HTTPS', 'TLS'): if 'SslPolicy' in conf['Properties'].keys(): - if conf['Properties']['SslPolicy'].startswith(supported_policy_prefixes[protocol]): + if isinstance(conf['Properties']['SslPolicy'], str) and conf['Properties']['SslPolicy'].startswith(supported_policy_prefixes[protocol]): return CheckResult.PASSED return CheckResult.FAILED elif conf['Properties']['Protocol'] in ('TCP', 'UDP', 'TCP_UDP'):