Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jerop
Copy link
Contributor

@jerop jerop commented Sep 17, 2025

Adds a validation step to the action to ensure that authentication inputs are configured correctly. This prevents common misconfigurations and improves security.

The validation is performed by a new script, scripts/validate-inputs.sh, which is called as the first step in the action.

Key changes:

  • A new validate-inputs.sh script is added to check authentication configuration.
  • The action.yml is updated to call this script.
  • Follows principle of least privilege by using boolean flags to indicate whether inputs are set.
  • The validation enforces that exactly one authentication method is used, providing clear error messages to the user if the configuration is invalid. This makes the action more robust, secure, and easier to debug.

Fixes #257 #258

@jerop jerop requested review from a team as code owners September 17, 2025 17:42
@gemini-cli
Copy link

gemini-cli bot commented Sep 17, 2025

🤖 Hi @jerop, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

Copy link

@gemini-cli gemini-cli bot left a comment

Choose a reason for hiding this comment

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

📋 Review Summary

The pull request introduces a validation script to check the authentication inputs, which is a great addition to improve the action's robustness and user experience. The script is well-structured and covers all the necessary validation cases.

🔍 General Feedback

  • I have provided a few minor suggestions to improve the script's style and adherence to shell scripting best practices.
  • Overall, this is a great contribution that will help users avoid common configuration errors.

@jerop jerop force-pushed the feat/auth-input-validation branch from 7600234 to 2a17056 Compare September 17, 2025 17:44
Adds a validation step to the action to ensure that authentication inputs are configured correctly. This prevents common misconfigurations and improves security.

The validation is performed by a new script, `scripts/validate-inputs.sh`, which is called as the first step in the action.

Key changes:
- A new `validate-inputs.sh` script is added to check authentication configuration.
- The `action.yml` is updated to call this script.
- Follows principle of least privilege by using boolean flags to indicate whether inputs are set.
- The validation enforces that exactly one authentication method is used, providing clear error messages to the user if the configuration is invalid. This makes the action more robust, secure, and easier to debug.
@jerop jerop force-pushed the feat/auth-input-validation branch from 2a17056 to 5544b34 Compare September 17, 2025 17:48
@jerop
Copy link
Contributor Author

jerop commented Sep 17, 2025

@gemini-cli /review

@gemini-cli
Copy link

gemini-cli bot commented Sep 17, 2025

🤖 Hi @jerop, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

Copy link

@gemini-cli gemini-cli bot left a comment

Choose a reason for hiding this comment

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

📋 Review Summary

This pull request introduces a robust validation step for authentication inputs, significantly improving the action's security and usability. By adding the scripts/validate-inputs.sh script, the action now provides clear, early feedback on misconfigurations, preventing common user errors.

🔍 General Feedback

  • The use of a dedicated script for validation is a clean approach that keeps the action.yml file tidy.
  • The error messages are clear and will help users to debug their workflows more easily.
  • The logic in the script correctly handles the different authentication methods and their requirements.

@jerop jerop enabled auto-merge (squash) September 17, 2025 18:09
@jerop jerop merged commit c27fb3e into main Sep 17, 2025
51 checks passed
@jerop jerop deleted the feat/auth-input-validation branch September 17, 2025 18:26
Copy link
Contributor

@leehagoodjames leehagoodjames left a comment

Choose a reason for hiding this comment

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

This looks good.

It is unclear if all of these are examples of failing fast, or if some of these checks will cause existing user's workflows - which are WAI but configured in a way that would fail this validation - to suddenly start failing.

google-github-actions-bot added a commit that referenced this pull request Oct 9, 2025
## What's Changed
* chore: script to generate examples by @leehagoodjames in
#244
* chore: update readme to state user must copy gemini-dispatch.yml by
@leehagoodjames in
#249
* Relax node requirement and bump actions-utils by @sethvargo in
#253
* feat: support /fix slash command and workflow by @leehagoodjames in
#190
* feat(docs): improve manual setup instructions for workflows by @jerop
in #263
* feat: improve action input descriptions by @jerop in
#264
* fix: enforce COMMENT event type for submit_pending_pull_request_review
by @jerop in
#271
* docs: add fork support documentation for PR review workflow by @jerop
in #268
* feat(action): add support for preview and nightly versions by @jerop
in #281
* feat(workflows): add gemini_cli_version to all workflows by @jerop in
#279
* feat: migrate to new Gemini CLI configuration format by @jerop in
#284
* feat: clean up temp fix for empty API key by @jerop in
#285
* Sort inputs alphabetically in action.yml by @jerop in
#286
* chore: organize workflow inputs alphabetically and add missing
parameters by @jerop in
#288
* feat: add auth input validation by @jerop in
#289
* fix(action): correct quoting in workflow expressions by @jerop in
#293
* fix(validation): improve validation error messages by @jerop in
#297
* fix(validate-inputs): surface errors in logs, annotation, and step
summary by @jerop in
#299
* feat(validate-inputs): downgrade validation failures to warnings by
@jerop in
#300
* fix(validate-inputs): use env-based bash shebang for portability by
@jerop in
#303
* feat: simplify input validation logic by @jerop in
#304
* fix(action): correct input validation script behavior by @jerop in
#309
* feat: add command substitution security warning by @jerop in
#306
* fix(triage): correct duplicate step numbering in workflow by @aladh in
#331
* feat: Optionally install extensions by @CallumHYoung in
#329
* docs(extensions): add documentation for extensions by @jerop in
#340
* chore(workflows): Apply formatting and fix example prompt by @jerop in
#339
* refactor(workflows): improve prompts to use env vars directly by
@jerop in
#342
* fix(review): Remove --source argument to match CLI 8.0 release by
@CallumHYoung in
#347

## New Contributors
* @aladh made their first contribution in
#331
* @CallumHYoung made their first contribution in
#329

**Full Changelog**:
v0.1.12...v0.1.13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

run-gemini-cli fails with Cloud Code Private API error when using Code Assist and WIF Validate input parameters for authentication

4 participants