Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CVK_GCP_22 check fail with string gke version #6944

Open
roxannelandry opened this issue Jan 9, 2025 · 0 comments
Open

CVK_GCP_22 check fail with string gke version #6944

roxannelandry opened this issue Jan 9, 2025 · 0 comments
Labels
checks Check additions or changes

Comments

@roxannelandry
Copy link

Describe the issue
This check fail when the gke version is a string (1.29.4-gke.1043004).

Examples
Error: -09 14:42:01,690 [MainThread ] [ERROR] Failed to run check CKV_GCP_22 on /modules/shared/base/gke.tf:google_container_node_pool.default-01
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/checkov/common/checks/base_check.py", line 68, in run
check_result["result"] = self.scan_entity_conf(entity_configuration, entity_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/checkov/terraform/checks/resource/base_resource_check.py", line 43, in scan_entity_conf
return self.scan_resource_conf(conf)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/checkov/terraform/checks/resource/gcp/GKEUseCosImage.py", line 24, in scan_resource_conf
version = float(splitter[0] + "." + splitter[1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: could not convert string to float: 'var.gke_node_version'

@roxannelandry roxannelandry added the checks Check additions or changes label Jan 9, 2025
@roxannelandry roxannelandry changed the title CVK_GCP_22 CVK_GCP_22 check fail with string gke version Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
checks Check additions or changes
Projects
None yet
Development

No branches or pull requests

1 participant