We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Cloudformation NLB Listener Rules are incorrectly detected as ALB rules and fail the HTTPS expectation
**Describe the bug**
NLB listeners are evaluated as ALB listeners, and fail because they don't use HTTPS

**To Reproduce**
1. Create a Cloudformation template with NLB listeners (e.g. TCP)
2. Run default tests
3. Tests will fail with `"AWS::ElasticLoadBalancingV2::Listener.<listenername>\" failed in check \"Ensure ALB protocol is HTTPS\"

**Expected behavior**
NLB rules should pass. 

**Screenshots**


**Desktop (please complete the following information):**
 - OS: Ubuntu 20.04
 - Checkov Version: 1.0.423

**Additional context**
This resource:
```
    "ConsulDnsListener": {                                          
      "Type": "AWS::ElasticLoadBalancingV2::Listener",              
      "Properties": {                                               
        "DefaultActions": [                                         
          {                                                         
            "TargetGroupArn": {                                     
              "Ref": "ConsulDnsTargetGroup"                         
            },                                                      
            "Type": "forward"                                       
          }                                                         
        ],                                                          
        "LoadBalancerArn": {                                        
          "Ref": "LoadBalancerArn"                                  
        },                                                          
        "Port": 53,                                                 
        "Protocol": "TCP_UDP"                                       
      }                                                             
    },     
```
Produces this error:
```
{
  "type": "failure",
  "message": "Resource \"AWS::ElasticLoadBalancingV2::Listener.ConsulDnsListener\" failed in check \"Ensure ALB protocol is HTTPS\""
}```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `checkov/terraform/checks/resource/aws/ALBListenerHTTPS.py`
Content:
```
1 from checkov.common.models.enums import CheckResult, CheckCategories
2 from checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck
3 
4 class ALBListenerHTTPS(BaseResourceCheck):
5 
6     def __init__(self):
7         name = "Ensure ALB protocol is HTTPS"
8         id = "CKV_AWS_2"
9         supported_resources = ['aws_lb_listener']
10         categories = [CheckCategories.ENCRYPTION]
11         super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)
12 
13     def scan_resource_conf(self, conf):
14         """
15             validates kms rotation
16             https://www.terraform.io/docs/providers/aws/r/lb_listener.html
17         :param conf: aws_kms_key configuration
18         :return: <CheckResult>
19         """
20         key = 'protocol'
21         if key in conf.keys():
22             if (
23                 conf[key] == ["HTTPS"]
24                 or
25                 conf[key] == ["TLS"]
26             ):
27                 return CheckResult.PASSED
28             elif conf[key] == ["HTTP"]:
29                 if 'default_action' in conf.keys():
30                     default_action = conf['default_action'][0]
31                     action_type = default_action['type']
32                     if action_type == ['redirect']:
33                         if default_action['redirect'][0]['protocol'] == ['HTTPS']:
34                             return CheckResult.PASSED
35         return CheckResult.FAILED
36 
37 
38 check = ALBListenerHTTPS()
39
```

Path: `checkov/cloudformation/checks/resource/aws/ALBListenerHTTPS.py`
Content:
```
1 from checkov.common.models.enums import CheckResult, CheckCategories
2 from checkov.cloudformation.checks.resource.base_resource_check import BaseResourceCheck
3 
4 class ALBListenerHTTPS(BaseResourceCheck):
5 
6     def __init__(self):
7         name = "Ensure ALB protocol is HTTPS"
8         id = "CKV_AWS_2"
9         supported_resources = ['AWS::ElasticLoadBalancingV2::Listener']
10         categories = [CheckCategories.ENCRYPTION]
11         super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)
12 
13     def scan_resource_conf(self, conf):
14         """
15             validates ALB protocol is HTTPS
16             https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listener.html
17         :param conf: aws_alb_listener configuration
18         :return: <CheckResult>
19         """
20 
21         if 'Properties' in conf.keys():
22             if 'Protocol' in conf['Properties'].keys():
23                 if conf['Properties']['Protocol'] in ('HTTPS', 'TLS'):
24                     return CheckResult.PASSED
25                 else:
26                     if (
27                         'DefaultActions' in conf['Properties'].keys()
28                         and
29                         conf['Properties']['DefaultActions'][0]['Type'] == 'redirect'
30                         and
31                         conf['Properties']['DefaultActions'][0]['RedirectConfig']['Protocol'] == "HTTPS"
32                     ):
33                         return CheckResult.PASSED
34         return CheckResult.FAILED
35 
36 check = ALBListenerHTTPS()
37
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/checkov/cloudformation/checks/resource/aws/ALBListenerHTTPS.py b/checkov/cloudformation/checks/resource/aws/ALBListenerHTTPS.py
--- a/checkov/cloudformation/checks/resource/aws/ALBListenerHTTPS.py
+++ b/checkov/cloudformation/checks/resource/aws/ALBListenerHTTPS.py
@@ -20,7 +20,7 @@
 
         if 'Properties' in conf.keys():
             if 'Protocol' in conf['Properties'].keys():
-                if conf['Properties']['Protocol'] in ('HTTPS', 'TLS'):
+                if conf['Properties']['Protocol'] in ('HTTPS', 'TLS', 'TCP', 'UDP', 'TCP_UDP'):
                     return CheckResult.PASSED
                 else:
                     if (
diff --git a/checkov/terraform/checks/resource/aws/ALBListenerHTTPS.py b/checkov/terraform/checks/resource/aws/ALBListenerHTTPS.py
--- a/checkov/terraform/checks/resource/aws/ALBListenerHTTPS.py
+++ b/checkov/terraform/checks/resource/aws/ALBListenerHTTPS.py
@@ -19,11 +19,7 @@
         """
         key = 'protocol'
         if key in conf.keys():
-            if (
-                conf[key] == ["HTTPS"]
-                or
-                conf[key] == ["TLS"]
-            ):
+            if conf[key] in (["HTTPS"], ["TLS"], ["TCP"], ["UDP"], ["TCP_UDP"]):
                 return CheckResult.PASSED
             elif conf[key] == ["HTTP"]:
                 if 'default_action' in conf.keys():

{"golden_diff": "diff --git a/checkov/cloudformation/checks/resource/aws/ALBListenerHTTPS.py b/checkov/cloudformation/checks/resource/aws/ALBListenerHTTPS.py\n--- a/checkov/cloudformation/checks/resource/aws/ALBListenerHTTPS.py\n+++ b/checkov/cloudformation/checks/resource/aws/ALBListenerHTTPS.py\n@@ -20,7 +20,7 @@\n \n         if 'Properties' in conf.keys():\n             if 'Protocol' in conf['Properties'].keys():\n-                if conf['Properties']['Protocol'] in ('HTTPS', 'TLS'):\n+                if conf['Properties']['Protocol'] in ('HTTPS', 'TLS', 'TCP', 'UDP', 'TCP_UDP'):\n                     return CheckResult.PASSED\n                 else:\n                     if (\ndiff --git a/checkov/terraform/checks/resource/aws/ALBListenerHTTPS.py b/checkov/terraform/checks/resource/aws/ALBListenerHTTPS.py\n--- a/checkov/terraform/checks/resource/aws/ALBListenerHTTPS.py\n+++ b/checkov/terraform/checks/resource/aws/ALBListenerHTTPS.py\n@@ -19,11 +19,7 @@\n         \"\"\"\n         key = 'protocol'\n         if key in conf.keys():\n-            if (\n-                conf[key] == [\"HTTPS\"]\n-                or\n-                conf[key] == [\"TLS\"]\n-            ):\n+            if conf[key] in ([\"HTTPS\"], [\"TLS\"], [\"TCP\"], [\"UDP\"], [\"TCP_UDP\"]):\n                 return CheckResult.PASSED\n             elif conf[key] == [\"HTTP\"]:\n                 if 'default_action' in conf.keys():\n", "issue": "Cloudformation NLB Listener Rules are incorrectly detected as ALB rules and fail the HTTPS expectation\n**Describe the bug**\r\nNLB listeners are evaluated as ALB listeners, and fail because they don't use HTTPS\r\n\r\n**To Reproduce**\r\n1. Create a Cloudformation template with NLB listeners (e.g. TCP)\r\n2. Run default tests\r\n3. Tests will fail with `\"AWS::ElasticLoadBalancingV2::Listener.<listenername>\\\" failed in check \\\"Ensure ALB protocol is HTTPS\\\"\r\n\r\n**Expected behavior**\r\nNLB rules should pass. \r\n\r\n**Screenshots**\r\n\r\n\r\n**Desktop (please complete the following information):**\r\n - OS: Ubuntu 20.04\r\n - Checkov Version: 1.0.423\r\n\r\n**Additional context**\r\nThis resource:\r\n```\r\n    \"ConsulDnsListener\": {                                          \r\n      \"Type\": \"AWS::ElasticLoadBalancingV2::Listener\",              \r\n      \"Properties\": {                                               \r\n        \"DefaultActions\": [                                         \r\n          {                                                         \r\n            \"TargetGroupArn\": {                                     \r\n              \"Ref\": \"ConsulDnsTargetGroup\"                         \r\n            },                                                      \r\n            \"Type\": \"forward\"                                       \r\n          }                                                         \r\n        ],                                                          \r\n        \"LoadBalancerArn\": {                                        \r\n          \"Ref\": \"LoadBalancerArn\"                                  \r\n        },                                                          \r\n        \"Port\": 53,                                                 \r\n        \"Protocol\": \"TCP_UDP\"                                       \r\n      }                                                             \r\n    },     \r\n```\r\nProduces this error:\r\n```\r\n{\r\n  \"type\": \"failure\",\r\n  \"message\": \"Resource \\\"AWS::ElasticLoadBalancingV2::Listener.ConsulDnsListener\\\" failed in check \\\"Ensure ALB protocol is HTTPS\\\"\"\r\n}```\n", "before_files": [{"content": "from checkov.common.models.enums import CheckResult, CheckCategories\nfrom checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck\n\nclass ALBListenerHTTPS(BaseResourceCheck):\n\n    def __init__(self):\n        name = \"Ensure ALB protocol is HTTPS\"\n        id = \"CKV_AWS_2\"\n        supported_resources = ['aws_lb_listener']\n        categories = [CheckCategories.ENCRYPTION]\n        super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)\n\n    def scan_resource_conf(self, conf):\n        \"\"\"\n            validates kms rotation\n            https://www.terraform.io/docs/providers/aws/r/lb_listener.html\n        :param conf: aws_kms_key configuration\n        :return: <CheckResult>\n        \"\"\"\n        key = 'protocol'\n        if key in conf.keys():\n            if (\n                conf[key] == [\"HTTPS\"]\n                or\n                conf[key] == [\"TLS\"]\n            ):\n                return CheckResult.PASSED\n            elif conf[key] == [\"HTTP\"]:\n                if 'default_action' in conf.keys():\n                    default_action = conf['default_action'][0]\n                    action_type = default_action['type']\n                    if action_type == ['redirect']:\n                        if default_action['redirect'][0]['protocol'] == ['HTTPS']:\n                            return CheckResult.PASSED\n        return CheckResult.FAILED\n\n\ncheck = ALBListenerHTTPS()\n", "path": "checkov/terraform/checks/resource/aws/ALBListenerHTTPS.py"}, {"content": "from checkov.common.models.enums import CheckResult, CheckCategories\nfrom checkov.cloudformation.checks.resource.base_resource_check import BaseResourceCheck\n\nclass ALBListenerHTTPS(BaseResourceCheck):\n\n    def __init__(self):\n        name = \"Ensure ALB protocol is HTTPS\"\n        id = \"CKV_AWS_2\"\n        supported_resources = ['AWS::ElasticLoadBalancingV2::Listener']\n        categories = [CheckCategories.ENCRYPTION]\n        super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)\n\n    def scan_resource_conf(self, conf):\n        \"\"\"\n            validates ALB protocol is HTTPS\n            https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listener.html\n        :param conf: aws_alb_listener configuration\n        :return: <CheckResult>\n        \"\"\"\n\n        if 'Properties' in conf.keys():\n            if 'Protocol' in conf['Properties'].keys():\n                if conf['Properties']['Protocol'] in ('HTTPS', 'TLS'):\n                    return CheckResult.PASSED\n                else:\n                    if (\n                        'DefaultActions' in conf['Properties'].keys()\n                        and\n                        conf['Properties']['DefaultActions'][0]['Type'] == 'redirect'\n                        and\n                        conf['Properties']['DefaultActions'][0]['RedirectConfig']['Protocol'] == \"HTTPS\"\n                    ):\n                        return CheckResult.PASSED\n        return CheckResult.FAILED\n\ncheck = ALBListenerHTTPS()\n", "path": "checkov/cloudformation/checks/resource/aws/ALBListenerHTTPS.py"}], "after_files": [{"content": "from checkov.common.models.enums import CheckResult, CheckCategories\nfrom checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck\n\nclass ALBListenerHTTPS(BaseResourceCheck):\n\n    def __init__(self):\n        name = \"Ensure ALB protocol is HTTPS\"\n        id = \"CKV_AWS_2\"\n        supported_resources = ['aws_lb_listener']\n        categories = [CheckCategories.ENCRYPTION]\n        super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)\n\n    def scan_resource_conf(self, conf):\n        \"\"\"\n            validates kms rotation\n            https://www.terraform.io/docs/providers/aws/r/lb_listener.html\n        :param conf: aws_kms_key configuration\n        :return: <CheckResult>\n        \"\"\"\n        key = 'protocol'\n        if key in conf.keys():\n            if conf[key] in ([\"HTTPS\"], [\"TLS\"], [\"TCP\"], [\"UDP\"], [\"TCP_UDP\"]):\n                return CheckResult.PASSED\n            elif conf[key] == [\"HTTP\"]:\n                if 'default_action' in conf.keys():\n                    default_action = conf['default_action'][0]\n                    action_type = default_action['type']\n                    if action_type == ['redirect']:\n                        if default_action['redirect'][0]['protocol'] == ['HTTPS']:\n                            return CheckResult.PASSED\n        return CheckResult.FAILED\n\n\ncheck = ALBListenerHTTPS()\n", "path": "checkov/terraform/checks/resource/aws/ALBListenerHTTPS.py"}, {"content": "from checkov.common.models.enums import CheckResult, CheckCategories\nfrom checkov.cloudformation.checks.resource.base_resource_check import BaseResourceCheck\n\nclass ALBListenerHTTPS(BaseResourceCheck):\n\n    def __init__(self):\n        name = \"Ensure ALB protocol is HTTPS\"\n        id = \"CKV_AWS_2\"\n        supported_resources = ['AWS::ElasticLoadBalancingV2::Listener']\n        categories = [CheckCategories.ENCRYPTION]\n        super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)\n\n    def scan_resource_conf(self, conf):\n        \"\"\"\n            validates ALB protocol is HTTPS\n            https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listener.html\n        :param conf: aws_alb_listener configuration\n        :return: <CheckResult>\n        \"\"\"\n\n        if 'Properties' in conf.keys():\n            if 'Protocol' in conf['Properties'].keys():\n                if conf['Properties']['Protocol'] in ('HTTPS', 'TLS', 'TCP', 'UDP', 'TCP_UDP'):\n                    return CheckResult.PASSED\n                else:\n                    if (\n                        'DefaultActions' in conf['Properties'].keys()\n                        and\n                        conf['Properties']['DefaultActions'][0]['Type'] == 'redirect'\n                        and\n                        conf['Properties']['DefaultActions'][0]['RedirectConfig']['Protocol'] == \"HTTPS\"\n                    ):\n                        return CheckResult.PASSED\n        return CheckResult.FAILED\n\ncheck = ALBListenerHTTPS()\n", "path": "checkov/cloudformation/checks/resource/aws/ALBListenerHTTPS.py"}]}