fix: use lowercase github owner for helm#74
fix: use lowercase github owner for helm#74rollandf merged 1 commit intok8snetworkplumbingwg:mainfrom
Conversation
Summary of ChangesHello, 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 addresses a potential issue with case sensitivity when interacting with Helm charts by ensuring that the Highlights
Changelog
Activity
Using Gemini Code AssistThe 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
Customization To customize 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 Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. 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. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Pull Request Test Coverage Report for Build 22661858861Details
💛 - Coveralls |
There was a problem hiding this comment.
Code Review
This pull request correctly ensures that the "GITHUB_REPO_OWNER" variable is converted to lowercase for Helm chart operations, which is a necessary fix for compatibility with container registries like ghcr.io. However, the scripts introduce security vulnerabilities due to improper handling of environment variables. Specifically, "GITHUB_REPO_OWNER" is used in "yq" expressions without escaping in "chart-update.sh", allowing for expression injection, and is used in multiple shell commands without double quotes in both scripts, allowing for argument injection. While the implementation is functional, I've also provided suggestions for more efficient bash constructs. It is recommended to use "yq"'s "env()" function for variable injection and to ensure all shell variables are properly quoted to mitigate these security risks.
Signed-off-by: Fred Rolland <frolland@nvidia.com>
|
/gemini review |
|
|
||
| # github repo owner: e.g k8snetworkplumbingwg | ||
| GITHUB_REPO_OWNER=${GITHUB_REPO_OWNER:-} | ||
| GITHUB_REPO_OWNER=$(tr '[:upper:]' '[:lower:]' <<< "${GITHUB_REPO_OWNER:-}") |
There was a problem hiding this comment.
This logic for initializing and lowercasing GITHUB_REPO_OWNER is duplicated in hack/release/chart-update.sh. Both scripts also share similar logic for handling GITHUB_TOKEN and VERSION environment variables and their validation. To improve maintainability and adhere to the DRY (Don't Repeat Yourself) principle, consider extracting this common setup into a shared script (e.g., hack/release/common.sh) and sourcing it in both chart-push.sh and chart-update.sh.
No description provided.