Skip to content

Add GCluster warnings to inform users if their GKE version has vulnerabilities#5718

Open
kadupoornima wants to merge 7 commits into
GoogleCloudPlatform:developfrom
kadupoornima:gke-ver-f
Open

Add GCluster warnings to inform users if their GKE version has vulnerabilities#5718
kadupoornima wants to merge 7 commits into
GoogleCloudPlatform:developfrom
kadupoornima:gke-ver-f

Conversation

@kadupoornima

@kadupoornima kadupoornima commented May 27, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces a proactive security mechanism for the HPC Toolkit by implementing GKE version vulnerability checks. The changes enable the toolkit to identify and warn users about potential security risks in their infrastructure configuration prior to deployment. The implementation includes a robust version resolution system that interacts with the GKE API and a centralized security advisory database, ensuring that users are alerted to both patched and pending vulnerabilities.

Highlights

  • GKE Vulnerability Scanning: Implemented a new validation layer that checks GKE cluster versions against a database of known security vulnerabilities before deployment.
  • Security Advisories Database: Added a JSON-based security advisory store, embedded directly into the binary using //go:embed, to track CVEs, their status, and required minimum versions.
  • CLI Integration: Integrated the vulnerability check into the 'create' and 'deploy' commands, including a new --skip-gke-security-check flag to bypass the validation when necessary.
  • GKE Version Resolution: Added logic to resolve GKE versions from blueprints, including support for version prefixes by querying the GKE API.

@kadupoornima kadupoornima requested a review from a team as a code owner May 27, 2026 15:28
@kadupoornima kadupoornima added the release-key-new-features Added to release notes under the "Key New Features" heading. label May 27, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the security posture of the HPC Toolkit by implementing proactive GKE version vulnerability checks. By integrating a security advisory database and leveraging the GKE API to resolve cluster versions, the toolkit can now warn users about potential security risks in their infrastructure configuration before they proceed with deployment. This change includes new CLI flags for control and updates to core configuration handling to support dynamic version resolution.

Highlights

  • GKE Vulnerability Scanning: Introduced a new validation layer that checks GKE cluster versions against a database of known security vulnerabilities before deployment.
  • Security Advisories Database: Added a JSON-based security advisory store to track CVEs, their status (PATCHED/PENDING), and required minimum versions.
  • CLI Integration: Integrated the vulnerability check into the 'create' and 'deploy' commands, with an optional flag to bypass the check if necessary.
  • GKE Version Resolution: Implemented logic to resolve GKE versions from blueprints, including support for version prefixes by querying the GKE API.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces a dynamic GKE version security vulnerability check that runs during the creation and deployment of blueprints. It parses a local security advisories database to warn users if their GKE clusters are vulnerable to known CVEs. The review feedback highlights critical improvements: using Go's //go:embed directive to bundle the JSON database directly into the binary (preventing runtime path failures), fixing a mismatch in the bypass flag name, and refactoring the version resolver to avoid misleading errors on non-GKE blueprints.

Comment thread pkg/validators/gke_vulnerabilities_check.go Outdated
Comment thread pkg/validators/gke_vulnerabilities_check.go
Comment thread pkg/validators/gke_vulnerabilities_check.go Outdated
Comment thread pkg/config/config.go Outdated
@kadupoornima

Copy link
Copy Markdown
Contributor Author

/gemini summary

@kadupoornima kadupoornima enabled auto-merge (squash) May 27, 2026 15:51
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

This pull request introduces a proactive security mechanism for the HPC Toolkit by implementing GKE version vulnerability checks. The changes enable the toolkit to identify and warn users about potential security risks in their infrastructure configuration prior to deployment. The implementation includes a robust version resolution system that interacts with the GKE API and a centralized security advisory database, ensuring that users are alerted to both patched and pending vulnerabilities.

Highlights

  • GKE Vulnerability Scanning: Implemented a new validation layer that checks GKE cluster versions against a database of known security vulnerabilities before deployment.
  • Security Advisories Database: Added a JSON-based security advisory store, embedded directly into the binary using //go:embed, to track CVEs, their status, and required minimum versions.
  • CLI Integration: Integrated the vulnerability check into the 'create' and 'deploy' commands, including a new --skip-gke-security-check flag to bypass the validation when necessary.
  • GKE Version Resolution: Added logic to resolve GKE versions from blueprints, including support for version prefixes by querying the GKE API.
Activity
  • Gemini Code Assist performed an initial review and provided suggestions for embedding the security JSON file, updating the fetch logic, fixing a flag name mismatch, and refactoring the GKE version resolution function.
  • The author, kadupoornima, addressed all review comments and implemented the suggested changes.
  • The pull request is currently in a state where the requested improvements have been integrated.

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

Labels

release-key-new-features Added to release notes under the "Key New Features" heading.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant