Skip to content

Fix argument and resource type injection in gke_utils.py#228

Open
copybara-service[bot] wants to merge 1 commit intomainfrom
test_911651432
Open

Fix argument and resource type injection in gke_utils.py#228
copybara-service[bot] wants to merge 1 commit intomainfrom
test_911651432

Conversation

@copybara-service
Copy link
Copy Markdown

@copybara-service copybara-service Bot commented May 7, 2026

Fix argument and resource type injection in gke_utils.py

  • Added strict validation for Kubernetes resource names to prevent injection of flags or alternate resource types.
  • Updated kubectl commands to use the '--' delimiter to separate flags from positional arguments.
  • Prefixed pod names with 'pod/' in kubectl commands to be explicit.
  • Updated unit tests in gke_utils_test.py to cover new validation and command formats.
  • Fixed broken test in isc_pathways_test.py due to command format change.
  • Fixed broken test in gke_utils_test.py regarding fetch_cluster_credentials.

@google-cla
Copy link
Copy Markdown

google-cla Bot commented May 7, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@copybara-service copybara-service Bot force-pushed the test_911651432 branch 2 times, most recently from 83c24c7 to 023e764 Compare May 7, 2026 01:09
- Added strict validation for Kubernetes resource names to prevent injection of flags or alternate resource types.
- Updated kubectl commands to use the '--' delimiter to separate flags from positional arguments.
- Prefixed pod names with 'pod/' in kubectl commands to be explicit.
- Updated unit tests in gke_utils_test.py to cover new validation and command formats.
- Fixed broken test in isc_pathways_test.py due to command format change.
- Fixed broken test in gke_utils_test.py regarding fetch_cluster_credentials.

PiperOrigin-RevId: 911651432
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants