Repository navigation
Skip the review on bot and fork pull requests, and refuse forks on request - #7
Merged
Merged
Conversation
GitHub gives no secrets to a run that Dependabot or a fork pull request started, and the review action rejects a bot actor, so the review would have ended as a red job on every such pull request. Bot pull requests are reviewed by hand by decision, so a gate job now checks for the token and a human actor first, and skips with a notice when either is missing. The notice keeps the skip visible: a missing token on a pull request that is neither bot nor fork means the secret is not set or not passed. The token input is no longer marked required, because a required secret that arrives empty is exactly the case being handled. Tested locally by running the gate's script for no token, a bot actor, and a person with a token. Signed-off-by: Claude Leet <Claude@L337.org>
A maintainer's /claude-review on a fork pull request ran with the token over text written by someone with no access to the repository, who could write it to steer the verdict. Claude holds no write token and has no network tools, so the exposure is a misleading verdict rather than a leaked secret, but fork pull requests are now refused outright by decision. A refused comment request gets a reply so it does not look ignored. The lookup runs first and on its own, so a failure stops the job instead of reading as not a fork. Tested locally with a stand-in gh across five cases: fork by comment (refused, reply), fork by event (refused), no token, bot actor, and a person on a same-repository branch (runs). Signed-off-by: Claude Leet <Claude@L337.org>
GavinLucas
approved these changes
Oct 1, 2026
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.
GitHub gives no secrets to runs started by Dependabot or by a fork pull request, and the review action rejects bot actors, so the review job would fail red on every such pull request. Bot pull requests are reviewed by hand, by decision. Fork pull requests are not reviewed at all, by decision, including when a maintainer asks by comment: that run carries the token over text written by someone with no access.
gatejob (2-minute timeout), ahead of the review:CLAUDE_CODE_OAUTH_TOKENinput is no longerrequired, since an empty secret is one of the cases handled.Intended as v1.1.1.
Tested: actionlint clean. The gate script run locally, with a stand-in
gh, across five cases: fork by comment (refused, reply posted), fork by event (refused, no reply), no token (skipped),dependabot[bot](skipped), a person on a same-repository branch (runs).gh pr view --json isCrossRepositoryconfirmed against a real pull request.Not tested yet: a real Dependabot or fork pull request in Actions.