Exclude fork PRs from Gemini dispatch (consistency with hardened template)#218
Open
scalvela wants to merge 1 commit into
Open
Exclude fork PRs from Gemini dispatch (consistency with hardened template)#218scalvela wants to merge 1 commit into
scalvela wants to merge 1 commit into
Conversation
…late) gemini-dispatch.yml's dispatch `if` allowed `github.event_name == 'pull_request'` without the `&& github.event.pull_request.head.repo.fork == false` guard used by the equivalent workflows in GoogleCloudPlatform/vertex-ai-creative-studio and gemini-cloud-assist-mcp (and the run-gemini-cli reference template). Because this trigger is `pull_request` (not `pull_request_target`), fork PRs run without secrets or a write token, so there is no secret-exposure issue today. This is a hardening/consistency change: it avoids spinning up the review agent on untrusted fork PRs and guards against a future switch to a `pull_request_target` trigger. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add the
&& github.event.pull_request.head.repo.fork == falseguard to thepull_requestbranch of the
dispatchjob'sifcondition in.github/workflows/gemini-dispatch.yml.Why
The equivalent Gemini dispatch workflows in
GoogleCloudPlatform/vertex-ai-creative-studioand
GoogleCloudPlatform/gemini-cloud-assist-mcp(and thegoogle-github-actions/run-gemini-clireference) gate the
pull_requestpath onhead.repo.fork == false. This workflow omitted it,so it auto-dispatches the Gemini review agent on fork PRs.
Note on impact (not a security fix)
This trigger is
pull_request(notpull_request_target), so fork PRs already run withoutsecrets or a write token — there is no secret-exposure issue here today. This is a
hardening / consistency change, not a security fix. It:
pull_request_targettrigger (which would pass secrets).Change