Skip to content

feat(query): implemented query that ensures that gke version management is automated using release channels#7885

Merged
cx-rui-araujo merged 6 commits into
masterfrom
AST-121532
Jan 27, 2026
Merged

feat(query): implemented query that ensures that gke version management is automated using release channels#7885
cx-rui-araujo merged 6 commits into
masterfrom
AST-121532

Conversation

@cx-ricardo-jesus

Copy link
Copy Markdown
Contributor

Reason for Proposed Changes

  • Currently, no query ensures that GKE version management is automated using release channels.

Proposed Changes

  • Taking into account the information present on the CIS Google Kubernetes Engine (GKE) Benchmark v1.9.0, it is clear that the GKE should have the attribute channel set to REGULAR or STABLE, and by default, the release channels are not enabled, as shown in the screenshot's below:
image
  • Taking this into account, it is clear that an GKE Cluster(represented by the resource google_container_cluster) should be flagged if the release channels are not defined and if the release channel defined is not either REGULAR or STABLE.
  • More specifically, on the resource of type google_container_cluster the release channel is defined by the block release_channel which has a field called channel inside that should have the value of the relelase channel and can be defined with the values UNSPECIFIED, RAPID, REGULAR, STABLE and EXTENDED.
  • Regarding the query implementation itself, it was composed by only one policy, which uses a helper function called get_res, that checks if the field release_channel.channel is not defined to REGULAR or STABLE or it's not defined at all.

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 26, 2025 16:42
@github-actions github-actions Bot added feature New feature query New query feature kubernetes Kubernetes query labels Nov 26, 2025
@github-actions

github-actions Bot commented Nov 26, 2025

Copy link
Copy Markdown
Contributor

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-eduardo-semanas cx-eduardo-semanas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@cx-eduardo-semanas cx-eduardo-semanas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@cx-artur-ribeiro cx-artur-ribeiro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@cx-rui-araujo cx-rui-araujo merged commit 000abba into master Jan 27, 2026
29 of 30 checks passed
@cx-rui-araujo cx-rui-araujo deleted the AST-121532 branch January 27, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature kubernetes Kubernetes query query New query feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants