prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Outdated check for `google_container_cluster` binary authorization
  **Describe the issue**
  `Check: CKV_GCP_66: "Ensure use of Binary Authorization"` is not checking [against the updated property](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_cluster#nested_binary_authorization) causing the check to fail.
  
  The current property states that the old method [`enable_binary_authorization`](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_cluster#enable_binary_authorization) is deprecated in favor the new [`binary_authorization`](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_cluster#nested_binary_authorization) block
  
  **Examples**
  
  Before:
  ```hcl
  enable_binary_authorization = true
  ```
  
  Now:
  ```hcl
    binary_authorization {
      evaluation_mode = "PROJECT_SINGLETON_POLICY_ENFORCE"
    }
  ```
  
  **Version (please complete the following information):**
   - Checkov Version 2.1.149
  
  
  
  </issue>
  <code>
  [start of checkov/terraform/checks/resource/gcp/GKEBinaryAuthorization.py]
  1 from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck
  2 from checkov.common.models.enums import CheckCategories
  3 
  4 
  5 class GKEBinaryAuthorization(BaseResourceValueCheck):
  6     def __init__(self) -> None:
  7         name = "Ensure use of Binary Authorization"
  8         id = "CKV_GCP_66"
  9         supported_resources = ("google_container_cluster",)
  10         categories = (CheckCategories.KUBERNETES,)
  11         super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)
  12 
  13     def get_inspected_key(self) -> str:
  14         return "enable_binary_authorization"
  15 
  16 
  17 check = GKEBinaryAuthorization()
  18
  [end of checkov/terraform/checks/resource/gcp/GKEBinaryAuthorization.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/checkov/terraform/checks/resource/gcp/GKEBinaryAuthorization.py b/checkov/terraform/checks/resource/gcp/GKEBinaryAuthorization.py
  --- a/checkov/terraform/checks/resource/gcp/GKEBinaryAuthorization.py
  +++ b/checkov/terraform/checks/resource/gcp/GKEBinaryAuthorization.py
  @@ -1,17 +1,29 @@
  -from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck
  -from checkov.common.models.enums import CheckCategories
  +from checkov.common.models.enums import CheckCategories, CheckResult
  +from checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck
   
   
  -class GKEBinaryAuthorization(BaseResourceValueCheck):
  -    def __init__(self) -> None:
  +class GKEBinaryAuthorization(BaseResourceCheck):
  +    def __init__(self):
           name = "Ensure use of Binary Authorization"
           id = "CKV_GCP_66"
  -        supported_resources = ("google_container_cluster",)
  -        categories = (CheckCategories.KUBERNETES,)
  +        supported_resources = ['google_container_cluster']
  +        categories = [CheckCategories.KUBERNETES]
           super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)
   
  -    def get_inspected_key(self) -> str:
  -        return "enable_binary_authorization"
  +    def scan_resource_conf(self, conf):
  +        if 'binary_authorization' in conf.keys():
  +            binary_authorization = conf["binary_authorization"][0]
  +            if isinstance(binary_authorization, dict) and 'evaluation_mode' in binary_authorization:
  +                # Google provider version >= v4.31.0
  +                if binary_authorization.get("evaluation_mode") == ["PROJECT_SINGLETON_POLICY_ENFORCE"]:
  +                    return CheckResult.PASSED
  +                # Google provider version v4.29.0 and v4.30.0
  +                elif binary_authorization.get("evaluation_mode") == [True]:
  +                    return CheckResult.PASSED
  +        # Google provider version <= v4.28.0
  +        if conf.get("enable_binary_authorization") == [True]:
  +            return CheckResult.PASSED
  +        return CheckResult.FAILED
   
   
   check = GKEBinaryAuthorization()
  
verification_info: {"golden_diff": "diff --git a/checkov/terraform/checks/resource/gcp/GKEBinaryAuthorization.py b/checkov/terraform/checks/resource/gcp/GKEBinaryAuthorization.py\n--- a/checkov/terraform/checks/resource/gcp/GKEBinaryAuthorization.py\n+++ b/checkov/terraform/checks/resource/gcp/GKEBinaryAuthorization.py\n@@ -1,17 +1,29 @@\n-from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck\n-from checkov.common.models.enums import CheckCategories\n+from checkov.common.models.enums import CheckCategories, CheckResult\n+from checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck\n \n \n-class GKEBinaryAuthorization(BaseResourceValueCheck):\n-    def __init__(self) -> None:\n+class GKEBinaryAuthorization(BaseResourceCheck):\n+    def __init__(self):\n         name = \"Ensure use of Binary Authorization\"\n         id = \"CKV_GCP_66\"\n-        supported_resources = (\"google_container_cluster\",)\n-        categories = (CheckCategories.KUBERNETES,)\n+        supported_resources = ['google_container_cluster']\n+        categories = [CheckCategories.KUBERNETES]\n         super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)\n \n-    def get_inspected_key(self) -> str:\n-        return \"enable_binary_authorization\"\n+    def scan_resource_conf(self, conf):\n+        if 'binary_authorization' in conf.keys():\n+            binary_authorization = conf[\"binary_authorization\"][0]\n+            if isinstance(binary_authorization, dict) and 'evaluation_mode' in binary_authorization:\n+                # Google provider version >= v4.31.0\n+                if binary_authorization.get(\"evaluation_mode\") == [\"PROJECT_SINGLETON_POLICY_ENFORCE\"]:\n+                    return CheckResult.PASSED\n+                # Google provider version v4.29.0 and v4.30.0\n+                elif binary_authorization.get(\"evaluation_mode\") == [True]:\n+                    return CheckResult.PASSED\n+        # Google provider version <= v4.28.0\n+        if conf.get(\"enable_binary_authorization\") == [True]:\n+            return CheckResult.PASSED\n+        return CheckResult.FAILED\n \n \n check = GKEBinaryAuthorization()\n", "issue": "Outdated check for `google_container_cluster` binary authorization\n**Describe the issue**\r\n`Check: CKV_GCP_66: \"Ensure use of Binary Authorization\"` is not checking [against the updated property](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_cluster#nested_binary_authorization) causing the check to fail.\r\n\r\nThe current property states that the old method [`enable_binary_authorization`](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_cluster#enable_binary_authorization) is deprecated in favor the new [`binary_authorization`](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_cluster#nested_binary_authorization) block\r\n\r\n**Examples**\r\n\r\nBefore:\r\n```hcl\r\nenable_binary_authorization = true\r\n```\r\n\r\nNow:\r\n```hcl\r\n  binary_authorization {\r\n    evaluation_mode = \"PROJECT_SINGLETON_POLICY_ENFORCE\"\r\n  }\r\n```\r\n\r\n**Version (please complete the following information):**\r\n - Checkov Version 2.1.149\r\n\r\n\n", "before_files": [{"content": "from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck\nfrom checkov.common.models.enums import CheckCategories\n\n\nclass GKEBinaryAuthorization(BaseResourceValueCheck):\n    def __init__(self) -> None:\n        name = \"Ensure use of Binary Authorization\"\n        id = \"CKV_GCP_66\"\n        supported_resources = (\"google_container_cluster\",)\n        categories = (CheckCategories.KUBERNETES,)\n        super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)\n\n    def get_inspected_key(self) -> str:\n        return \"enable_binary_authorization\"\n\n\ncheck = GKEBinaryAuthorization()\n", "path": "checkov/terraform/checks/resource/gcp/GKEBinaryAuthorization.py"}]}