Skip to content

Refactor Github Action per b/485167538#19294

Closed
google-admin wants to merge 1 commit into
release/v0.29.0-preview.0-pr-18840from
lsc-1771370195.545553
Closed

Refactor Github Action per b/485167538#19294
google-admin wants to merge 1 commit into
release/v0.29.0-preview.0-pr-18840from
lsc-1771370195.545553

Conversation

@google-admin

Copy link
Copy Markdown
Contributor

This is a http://go/LSC run by http://go/ghss to automatically refactor your Github Actions per http://b/485167538.

This is a PR to help you upgrade to the latest standards in Github Actions.

Please merge this PR to accept the changes. NOTE: if you do not accept this PR, it may be force merged by the GHSS team. See http://b/485167538 for more details.

@gemini-cli

gemini-cli Bot commented Feb 17, 2026

Copy link
Copy Markdown
Contributor

Hi @google-admin, thank you so much for your contribution to Gemini CLI! We really appreciate the time and effort you've put into this.

We're making some updates to our contribution process to improve how we track and review changes. Please take a moment to review our recent discussion post: Improving Our Contribution Process & Introducing New Guidelines.

Key Update: Starting January 26, 2026, the Gemini CLI project will require all pull requests to be associated with an existing issue. Any pull requests not linked to an issue by that date will be automatically closed.

Thank you for your understanding and for being a part of our community!

@gemini-cli

gemini-cli Bot commented Feb 17, 2026

Copy link
Copy Markdown
Contributor

Hi there! Thank you for your contribution to Gemini CLI.

To improve our contribution process and better track changes, we now require all pull requests to be associated with an existing issue, as announced in our recent discussion and as detailed in our CONTRIBUTING.md.

This pull request is being closed because it is not currently linked to an issue. Once you have updated the description of this PR to link an issue (e.g., by adding Fixes #123 or Related to #123), it will be automatically reopened.

How to link an issue:
Add a keyword followed by the issue number (e.g., Fixes #123) in the description of your pull request. For more details on supported keywords and how linking works, please refer to the GitHub Documentation on linking pull requests to issues.

Thank you for your understanding and for being a part of our community!

@gemini-cli gemini-cli Bot closed this Feb 17, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @google-admin, 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 systematically refactors several GitHub Actions to align with current best practices for input handling. The primary goal is to enhance the robustness and reliability of these actions by ensuring that all workflow inputs are correctly and consistently accessed within their respective run steps, thereby improving overall workflow stability.

Highlights

  • Refactored GitHub Action Input Handling: Inputs to GitHub Action run steps are now explicitly passed as environment variables, enhancing consistency and robustness.
  • Improved Shell Script Compatibility: This change prevents potential issues with shell interpretation of direct input references within run blocks.
Changelog
  • .github/actions/create-pull-request/action.yml
    • Updated input variable access within the run block to use environment variables.
  • .github/actions/npm-auth-token/action.yml
    • Updated input variable access within the run block to use environment variables.
  • .github/actions/publish-release/action.yml
    • Updated input variable access within run blocks across multiple steps to use environment variables.
  • .github/actions/push-docker/action.yml
    • Updated input variable access within the run block to use environment variables.
  • .github/actions/push-sandbox/action.yml
    • Updated input variable access within run blocks to use environment variables.
  • .github/actions/setup-npmrc/action.yml
    • Updated input variable access within the run block to use environment variables.
  • .github/actions/tag-npm-release/action.yml
    • Updated input variable access within run blocks across multiple steps to use environment variables.
  • .github/actions/verify-release/action.yml
    • Updated input variable access within run blocks across multiple steps to use environment variables.
Ignored Files
  • Ignored by pattern: .github/workflows/** (8)
    • .github/workflows/chained_e2e.yml
    • .github/workflows/ci.yml
    • .github/workflows/deflake.yml
    • .github/workflows/eval.yml
    • .github/workflows/evals-nightly.yml
    • .github/workflows/release-patch-3-release.yml
    • .github/workflows/release-promote.yml
    • .github/workflows/trigger_e2e.yml
Activity
  • Automated creation of this pull request by GHSS to refactor GitHub Actions per b/485167538.
  • The PR description indicates a potential force merge if not accepted, highlighting its automated and mandatory nature.
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 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 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

  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.

@google-cla

google-cla Bot commented Feb 17, 2026

Copy link
Copy Markdown

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.

@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 is an automated refactoring to improve the security of GitHub Actions by using environment variables instead of direct context interpolation in scripts. The changes are generally correct and follow this security best practice. However, I've found a few instances where the newly introduced environment variables are used without quotes in shell commands. This could still lead to potential script injection or unexpected behavior if the variable values contain special characters. I've added suggestions to quote these variables for improved robustness and security.

--workspace="${INPUTS_CORE_PACKAGE_NAME}" \
--no-tag
npm dist-tag rm ${{ inputs.core-package-name }} false --silent
npm dist-tag rm ${INPUTS_CORE_PACKAGE_NAME} false --silent

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.

high

For robustness and to prevent potential shell injection issues, it's best practice to quote environment variables when they are used as arguments in shell commands. The variable ${INPUTS_CORE_PACKAGE_NAME} should be enclosed in double quotes.

        npm dist-tag rm "${INPUTS_CORE_PACKAGE_NAME}" false --silent

--workspace="${INPUTS_CLI_PACKAGE_NAME}" \
--no-tag
npm dist-tag rm ${{ inputs.cli-package-name }} false --silent
npm dist-tag rm ${INPUTS_CLI_PACKAGE_NAME} false --silent

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.

high

For robustness and to prevent potential shell injection issues, it's best practice to quote environment variables when they are used as arguments in shell commands. The variable ${INPUTS_CLI_PACKAGE_NAME} should be enclosed in double quotes.

        npm dist-tag rm "${INPUTS_CLI_PACKAGE_NAME}" false --silent

--workspace="${INPUTS_A2A_PACKAGE_NAME}" \
--no-tag
npm dist-tag rm ${{ inputs.a2a-package-name }} false --silent
npm dist-tag rm ${INPUTS_A2A_PACKAGE_NAME} false --silent

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.

high

For robustness and to prevent potential shell injection issues, it's best practice to quote environment variables when they are used as arguments in shell commands. The variable ${INPUTS_A2A_PACKAGE_NAME} should be enclosed in double quotes.

        npm dist-tag rm "${INPUTS_A2A_PACKAGE_NAME}" false --silent

run: |-
npm run build:sandbox -- \
--image google/gemini-cli-sandbox:${{ steps.image_tag.outputs.FINAL_TAG }} \
--image google/gemini-cli-sandbox:${STEPS_IMAGE_TAG_OUTPUTS_FINAL_TAG} \

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.

high

To prevent issues with special characters or spaces in the tag, it's safer to quote the image tag argument.

          --image "google/gemini-cli-sandbox:${STEPS_IMAGE_TAG_OUTPUTS_FINAL_TAG}" \

working-directory: '${{ inputs.working-directory }}'
run: |
npm dist-tag add ${{ inputs.core-package-name }}@${{ inputs.version }} ${{ inputs.channel }}
npm dist-tag add ${INPUTS_CORE_PACKAGE_NAME}@${INPUTS_VERSION} ${INPUTS_CHANNEL}

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.

high

For robustness and to prevent potential shell injection issues, it's best practice to quote environment variables when they are used as arguments in shell commands. The package, version, and channel arguments should be enclosed in double quotes.

        npm dist-tag add "${INPUTS_CORE_PACKAGE_NAME}@${INPUTS_VERSION}" "${INPUTS_CHANNEL}"

working-directory: '${{ inputs.working-directory }}'
run: |
npm dist-tag add ${{ inputs.cli-package-name }}@${{ inputs.version }} ${{ inputs.channel }}
npm dist-tag add ${INPUTS_CLI_PACKAGE_NAME}@${INPUTS_VERSION} ${INPUTS_CHANNEL}

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.

high

For robustness and to prevent potential shell injection issues, it's best practice to quote environment variables when they are used as arguments in shell commands. The package, version, and channel arguments should be enclosed in double quotes.

        npm dist-tag add "${INPUTS_CLI_PACKAGE_NAME}@${INPUTS_VERSION}" "${INPUTS_CHANNEL}"

working-directory: '${{ inputs.working-directory }}'
run: |
npm dist-tag add ${{ inputs.a2a-package-name }}@${{ inputs.version }} ${{ inputs.channel }}
npm dist-tag add ${INPUTS_A2A_PACKAGE_NAME}@${INPUTS_VERSION} ${INPUTS_CHANNEL}

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.

high

For robustness and to prevent potential shell injection issues, it's best practice to quote environment variables when they are used as arguments in shell commands. The package, version, and channel arguments should be enclosed in double quotes.

        npm dist-tag add "${INPUTS_A2A_PACKAGE_NAME}@${INPUTS_VERSION}" "${INPUTS_CHANNEL}"

@google-admin google-admin deleted the lsc-1771370195.545553 branch February 18, 2026 22:49
@sripasg sripasg added the size/m A medium sized PR label Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m A medium sized PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants