Skip to content

Conversation

@cx-ricardo-jesus
Copy link
Contributor

@cx-ricardo-jesus cx-ricardo-jesus commented Nov 25, 2025

Reason for Proposed Changes

  • Currently, no query covers the case when the Kubernetes Web UI (Dashboard) is not disabled for Terraform/GCP.

Proposed Changes

  • The query only has one simple policy, which only checks if the field addons_config.kubernetes_dashboard.disabled is defined to false.
  • If this kubernetes_dashboard is not defined, the default behaviour is to disable de dashboard, which should not be flagged.
  • Important note is that this field was removed in version 3.0.0 of Terraform/GCP google_container_cluster resource, which was released approximately 6 years ago.
  • Taking into account that this field is just flagged if it's defined to false, and its absence does not return any result, it will not return any positive result on the most recent versions of this resource.
  • Regarding the query itself, it will flag the cases when a resource of type google_container_cluster does not have the block addons_config defined or when the addon kubernetes_dashboard is not defined inside the addons_config block. Both these cases are only flagged when the GKE version is under 1.10 using the value present on the min_master_version field. For versions above or equal to 1.10, it will not return any result since in these versions, the kubernetes_dashboard is disabled by default.
  • No matter the version, the query will also return a positive result if the field addons_config.kubernetes_dashboard.disabled is set to false.

I submit this contribution under the Apache-2.0 license.

@cx-ricardo-jesus cx-ricardo-jesus requested a review from a team as a code owner November 25, 2025 15:22
@github-actions github-actions bot added feature New feature query New query feature terraform Terraform query gcp PR related with GCP Cloud kubernetes Kubernetes query labels Nov 25, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 25, 2025

kics-logo

KICS version: v2.1.18

Category Results
CRITICAL CRITICAL 0
HIGH HIGH 0
MEDIUM MEDIUM 0
LOW LOW 0
INFO INFO 0
TRACE TRACE 0
TOTAL TOTAL 0
Metric Values
Files scanned placeholder 1
Files parsed placeholder 1
Files failed to scan placeholder 0
Total executed queries placeholder 47
Queries failed to execute placeholder 0
Execution time placeholder 0

@cx-ricardo-jesus cx-ricardo-jesus marked this pull request as draft January 13, 2026 17:09
@cx-ricardo-jesus cx-ricardo-jesus marked this pull request as ready for review January 13, 2026 17:11
Copy link
Collaborator

@cx-miguel-dasilva cx-miguel-dasilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @cx-ricardo-jesus,
Nice detail on query logic and version specifics. Great Work!
Please take a look at my comments.

Copy link
Collaborator

@cx-miguel-dasilva cx-miguel-dasilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great Work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature gcp PR related with GCP Cloud kubernetes Kubernetes query query New query feature terraform Terraform query

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants