prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  CKV_AWS_265 false positive
  **Describe the issue**
  CKV_AWS_265 fails checks on KeySpaces not using a Customer Managed KMS key even though it is configured to do so
  
  This is because the code is looking for ["CUSTOMER_MANAGED_KEY"](https://github.com/bridgecrewio/checkov/blob/main/checkov/terraform/checks/resource/aws/KeyspacesTableUsesCMK.py#L17)
  
  When the specification is listed as actually ["CUSTOMER_MANAGED_KMS_KEY"](https://docs.aws.amazon.com/keyspaces/latest/APIReference/API_EncryptionSpecification.html)
  
  **Examples**
  ```
  resource "aws_keyspaces_table" "keyspace_table" {
    keyspace_name = "foo"
    table_name    = "bar"
    encryption_specification {
     ## This should not fail the check CKV_AWS_265 but it does
      kms_key_identifier = var.kms_key_arn
      type               = "CUSTOMER_MANAGED_KMS_KEY"
    }
  }
  ```
  
  **Version (please complete the following information):**
   - 3.0.32
  
  **Additional context**
  
  ```
  ~/Downloads> checkov -f ./keyspaces.tf --support
  2023-11-10 09:21:38,953 [MainThread  ] [WARNI]  --bc-api-key argument is required when using --support
  [ terraform framework ]: 100%|████████████████████|[1/1], Current File Scanned=keyspaces.tf
  [ secrets framework ]: 100%|████████████████████|[1/1], Current File Scanned=./keyspaces.tf
  
         _               _
     ___| |__   ___  ___| | _______   __
    / __| '_ \ / _ \/ __| |/ / _ \ \ / /
   | (__| | | |  __/ (__|   < (_) \ V /
    \___|_| |_|\___|\___|_|\_\___/ \_/
  
  By Prisma Cloud | version: 3.0.32
  
  terraform scan results:
  
  Passed checks: 0, Failed checks: 1, Skipped checks: 0
  
  Check: CKV_AWS_265: "Ensure Keyspaces Table uses CMK"
  	FAILED for resource: aws_keyspaces_table.keyspace_table
  	File: /keyspaces.tf:1-9
  	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/ensure-aws-keyspace-table-uses-customer-managed-keys-cmks
  
  		1 | resource "aws_keyspaces_table" "keyspace_table" {
  		2 |   keyspace_name = "foo"
  		3 |   table_name    = "bar"
  		4 |   encryption_specification {
  		5 |    ## This should not fail the check CKV_AWS_265 but it does
  		6 |     kms_key_identifier = var.kms_key_arn
  		7 |     type               = "CUSTOMER_MANAGED_KMS_KEY"
  		8 |   }
  		9 | }
  ```
  
  
  
  </issue>
  <code>
  [start of checkov/terraform/checks/resource/aws/KeyspacesTableUsesCMK.py]
  1 from checkov.common.models.enums import CheckCategories, CheckResult
  2 from checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck
  3 
  4 
  5 class KeyspacesTableUsesCMK(BaseResourceCheck):
  6     def __init__(self):
  7         name = "Ensure Keyspaces Table uses CMK"
  8         id = "CKV_AWS_265"
  9         supported_resources = ['aws_keyspaces_table']
  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) -> CheckResult:
  14         if conf.get("encryption_specification") and isinstance(conf.get("encryption_specification"), list):
  15             encrypt = conf.get("encryption_specification")[0]
  16             if encrypt.get("kms_key_identifier") and isinstance(encrypt.get("kms_key_identifier"), list):
  17                 if encrypt.get("type") == ["CUSTOMER_MANAGED_KEY"]:
  18                     return CheckResult.PASSED
  19                 self.evaluated_keys = ["encryption_specification/[0]/type"]
  20             self.evaluated_keys = ["encryption_specification/[0]/kms_key_identifier"]
  21         self.evaluated_keys = ["encryption_specification"]
  22         return CheckResult.FAILED
  23 
  24 
  25 check = KeyspacesTableUsesCMK()
  26
  [end of checkov/terraform/checks/resource/aws/KeyspacesTableUsesCMK.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/aws/KeyspacesTableUsesCMK.py b/checkov/terraform/checks/resource/aws/KeyspacesTableUsesCMK.py
  --- a/checkov/terraform/checks/resource/aws/KeyspacesTableUsesCMK.py
  +++ b/checkov/terraform/checks/resource/aws/KeyspacesTableUsesCMK.py
  @@ -3,6 +3,10 @@
   
   
   class KeyspacesTableUsesCMK(BaseResourceCheck):
  +    """
  +    Valid values for encryption_specification type:
  +    AWS_OWNED_KMS_KEY (default), CUSTOMER_MANAGED_KMS_KEY (requires kms_key_identifier:ARN)
  +    """
       def __init__(self):
           name = "Ensure Keyspaces Table uses CMK"
           id = "CKV_AWS_265"
  @@ -14,7 +18,7 @@
           if conf.get("encryption_specification") and isinstance(conf.get("encryption_specification"), list):
               encrypt = conf.get("encryption_specification")[0]
               if encrypt.get("kms_key_identifier") and isinstance(encrypt.get("kms_key_identifier"), list):
  -                if encrypt.get("type") == ["CUSTOMER_MANAGED_KEY"]:
  +                if encrypt.get("type") == ["CUSTOMER_MANAGED_KMS_KEY"]:
                       return CheckResult.PASSED
                   self.evaluated_keys = ["encryption_specification/[0]/type"]
               self.evaluated_keys = ["encryption_specification/[0]/kms_key_identifier"]
  
verification_info: {"golden_diff": "diff --git a/checkov/terraform/checks/resource/aws/KeyspacesTableUsesCMK.py b/checkov/terraform/checks/resource/aws/KeyspacesTableUsesCMK.py\n--- a/checkov/terraform/checks/resource/aws/KeyspacesTableUsesCMK.py\n+++ b/checkov/terraform/checks/resource/aws/KeyspacesTableUsesCMK.py\n@@ -3,6 +3,10 @@\n \n \n class KeyspacesTableUsesCMK(BaseResourceCheck):\n+    \"\"\"\n+    Valid values for encryption_specification type:\n+    AWS_OWNED_KMS_KEY (default), CUSTOMER_MANAGED_KMS_KEY (requires kms_key_identifier:ARN)\n+    \"\"\"\n     def __init__(self):\n         name = \"Ensure Keyspaces Table uses CMK\"\n         id = \"CKV_AWS_265\"\n@@ -14,7 +18,7 @@\n         if conf.get(\"encryption_specification\") and isinstance(conf.get(\"encryption_specification\"), list):\n             encrypt = conf.get(\"encryption_specification\")[0]\n             if encrypt.get(\"kms_key_identifier\") and isinstance(encrypt.get(\"kms_key_identifier\"), list):\n-                if encrypt.get(\"type\") == [\"CUSTOMER_MANAGED_KEY\"]:\n+                if encrypt.get(\"type\") == [\"CUSTOMER_MANAGED_KMS_KEY\"]:\n                     return CheckResult.PASSED\n                 self.evaluated_keys = [\"encryption_specification/[0]/type\"]\n             self.evaluated_keys = [\"encryption_specification/[0]/kms_key_identifier\"]\n", "issue": "CKV_AWS_265 false positive\n**Describe the issue**\r\nCKV_AWS_265 fails checks on KeySpaces not using a Customer Managed KMS key even though it is configured to do so\r\n\r\nThis is because the code is looking for [\"CUSTOMER_MANAGED_KEY\"](https://github.com/bridgecrewio/checkov/blob/main/checkov/terraform/checks/resource/aws/KeyspacesTableUsesCMK.py#L17)\r\n\r\nWhen the specification is listed as actually [\"CUSTOMER_MANAGED_KMS_KEY\"](https://docs.aws.amazon.com/keyspaces/latest/APIReference/API_EncryptionSpecification.html)\r\n\r\n**Examples**\r\n```\r\nresource \"aws_keyspaces_table\" \"keyspace_table\" {\r\n  keyspace_name = \"foo\"\r\n  table_name    = \"bar\"\r\n  encryption_specification {\r\n   ## This should not fail the check CKV_AWS_265 but it does\r\n    kms_key_identifier = var.kms_key_arn\r\n    type               = \"CUSTOMER_MANAGED_KMS_KEY\"\r\n  }\r\n}\r\n```\r\n\r\n**Version (please complete the following information):**\r\n - 3.0.32\r\n\r\n**Additional context**\r\n\r\n```\r\n~/Downloads> checkov -f ./keyspaces.tf --support\r\n2023-11-10 09:21:38,953 [MainThread  ] [WARNI]  --bc-api-key argument is required when using --support\r\n[ terraform framework ]: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588|[1/1], Current File Scanned=keyspaces.tf\r\n[ secrets framework ]: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588|[1/1], Current File Scanned=./keyspaces.tf\r\n\r\n       _               _\r\n   ___| |__   ___  ___| | _______   __\r\n  / __| '_ \\ / _ \\/ __| |/ / _ \\ \\ / /\r\n | (__| | | |  __/ (__|   < (_) \\ V /\r\n  \\___|_| |_|\\___|\\___|_|\\_\\___/ \\_/\r\n\r\nBy Prisma Cloud | version: 3.0.32\r\n\r\nterraform scan results:\r\n\r\nPassed checks: 0, Failed checks: 1, Skipped checks: 0\r\n\r\nCheck: CKV_AWS_265: \"Ensure Keyspaces Table uses CMK\"\r\n\tFAILED for resource: aws_keyspaces_table.keyspace_table\r\n\tFile: /keyspaces.tf:1-9\r\n\tGuide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/ensure-aws-keyspace-table-uses-customer-managed-keys-cmks\r\n\r\n\t\t1 | resource \"aws_keyspaces_table\" \"keyspace_table\" {\r\n\t\t2 |   keyspace_name = \"foo\"\r\n\t\t3 |   table_name    = \"bar\"\r\n\t\t4 |   encryption_specification {\r\n\t\t5 |    ## This should not fail the check CKV_AWS_265 but it does\r\n\t\t6 |     kms_key_identifier = var.kms_key_arn\r\n\t\t7 |     type               = \"CUSTOMER_MANAGED_KMS_KEY\"\r\n\t\t8 |   }\r\n\t\t9 | }\r\n```\r\n\r\n\n", "before_files": [{"content": "from checkov.common.models.enums import CheckCategories, CheckResult\nfrom checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck\n\n\nclass KeyspacesTableUsesCMK(BaseResourceCheck):\n    def __init__(self):\n        name = \"Ensure Keyspaces Table uses CMK\"\n        id = \"CKV_AWS_265\"\n        supported_resources = ['aws_keyspaces_table']\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) -> CheckResult:\n        if conf.get(\"encryption_specification\") and isinstance(conf.get(\"encryption_specification\"), list):\n            encrypt = conf.get(\"encryption_specification\")[0]\n            if encrypt.get(\"kms_key_identifier\") and isinstance(encrypt.get(\"kms_key_identifier\"), list):\n                if encrypt.get(\"type\") == [\"CUSTOMER_MANAGED_KEY\"]:\n                    return CheckResult.PASSED\n                self.evaluated_keys = [\"encryption_specification/[0]/type\"]\n            self.evaluated_keys = [\"encryption_specification/[0]/kms_key_identifier\"]\n        self.evaluated_keys = [\"encryption_specification\"]\n        return CheckResult.FAILED\n\n\ncheck = KeyspacesTableUsesCMK()\n", "path": "checkov/terraform/checks/resource/aws/KeyspacesTableUsesCMK.py"}]}