Skip to content

Conversation

@CallumHYoung
Copy link
Contributor

@CallumHYoung CallumHYoung commented Oct 13, 2025

This adds the workflows from google-github-actions/run-gemini-cli to invoke GeminiCLI as a GHA

Additionally, in gemini-review we now install the security extension, and include a security review as an additional step in the workflow

I've also included the .env file in our .gitignore so I (and someone else) doesn't accidentally leak their Gemini API key from using Gemini CLI on the repo

Tested

use_vertex_ai: '${{ vars.GOOGLE_GENAI_USE_VERTEXAI }}'
extensions: |
[
"https://github.com/CallumHYoung/security.git"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be https://github.com/gemini-cli-extensions/security

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch - done

@@ -0,0 +1,175 @@
name: '🔎 Gemini Review'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah good idea. Done

]
}
}
prompt: '/gemini-invoke' No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need to dogfood this in our repo?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No need to even have this. I kept it becuase it's generic use of cli in the PR. We don't need this

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it is good to have a minimalistic version of this installed in our repo? Maybe even without the pr-review? We could then refer to this when we try to launch that in gemini-cli?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Agreed - I don't think we need to dogfood this in our repo. The goal here is to make it simple for others to dogfood the workflow. So please update the readme here or in a separate PR 🙏

I'd say let's keep the pr-review for a unified PR review experience per discussion with run-gemini-cli GHA team.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good feedback. I'll update this with a much simpler workflow so it's really easy to copy the example and deploy it to their repositories.

@QuanZhang-William
Copy link
Collaborator

nit: please also update PR title to feat:xxxx

jobs:
review:
runs-on: 'ubuntu-latest'
timeout-minutes: 7
Copy link
Contributor

Choose a reason for hiding this comment

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

For larger changes, time for security review might be longer than 7 mins. Is there a constraint that requires us to keep this at 7 mins?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No constraint. Happy to increase this too, this seems to be running pretty regularly under 7 in local testing. I'll double it for the time being as the timeout doesn't matter too much here

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good.

QQ for my understanding: if the security scan goes on for more than 15 mins - does the timeout mean that the process/GHA will be killed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The docs say that GitHub will kill the task if it reaches the timeout - I don't think it kills the entire GHA, just the job with the assigned timeout

@@ -111,9 +111,9 @@ You will now begin executing the plan. The following are your precise instructio
- Retrieve the GitHub repository name from the environment variable "${REPOSITORY}".
- Retrieve the GitHub pull request number from the environment variable "${PULL_REQUEST_NUMBER}".
- Retrieve the additional user instructions and context from the environment variable "${ADDITIONAL_CONTEXT}".
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to note here: This can be a surface for prompt injection attack, but since only maintainers are allowed to run this, this is not a problem at the moment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. This is copied from run-gemini-cli who should be notified of this too.

Another way for this extension to be useful being added other repo's like run-gemini-cli 😄

@CallumHYoung CallumHYoung changed the title Add run-gemini-cli GHA workflows to repo PR's feat(GHA workflows): Add run-gemini-cli GHA workflows to repo PR's Oct 13, 2025
@CallumHYoung
Copy link
Contributor Author

Just FYI - this PR will only work after #85 is submitted!

@QuanZhang-William QuanZhang-William merged commit facc88b into gemini-cli-extensions:main Oct 14, 2025
2 checks passed
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.

3 participants