Gate the Claude workflow on write access, not contribution history - #6260
Merged
Conversation
ChrisJBurns
force-pushed
the
harden-claude-workflow-gate
branch
from
August 10, 2026 17:27
d26fba2 to
b0897e8
Compare
rdimitrov
approved these changes
Aug 10, 2026
ChrisJBurns
force-pushed
the
harden-claude-workflow-gate
branch
from
August 10, 2026 17:28
b0897e8 to
7771c1d
Compare
10 tasks
The trigger denied NONE, FIRST_TIMER and FIRST_TIME_CONTRIBUTOR, which still admitted CONTRIBUTOR and MANNEQUIN. CONTRIBUTOR is earned permanently by getting a single pull request merged, so any outside account that has landed one change could invoke the job afterwards. That job holds contents: write and ANTHROPIC_API_KEY, and allows Bash(git *), so the bar should be write access to the repository rather than a history of contributing to it. Replaces the deny-list with the OWNER/MEMBER/COLLABORATOR allow-list already used by the /retest gate. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ChrisJBurns
force-pushed
the
harden-claude-workflow-gate
branch
from
August 10, 2026 17:31
7771c1d to
ff745e6
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6260 +/- ##
==========================================
+ Coverage 72.71% 72.72% +0.01%
==========================================
Files 742 742
Lines 77299 77299
==========================================
+ Hits 56209 56218 +9
+ Misses 17126 17119 -7
+ Partials 3964 3962 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Summary
CONTRIBUTOR. It deniedNONE,FIRST_TIMERandFIRST_TIME_CONTRIBUTOR— butCONTRIBUTORis earned permanently by getting a single pull request merged, and it admittedMANNEQUINas well. Any outside account that has landed one change could invoke the job from then on.contents: writeandANTHROPIC_API_KEY, and allowsBash(git *), driven by the text of an issue or comment. The right bar is write access to the repository, not a history of contributing to it.OWNER/MEMBER/COLLABORATORallow-list already used by the/retestgate inretest.yaml, so there is now one idiom for "trusted enough to trigger privileged automation" rather than two.OWNER,MEMBER,COLLABORATOR,CONTRIBUTOR,MANNEQUINOWNER,MEMBER,COLLABORATORAn allow-list is also the more durable shape: GitHub can add association values, and a deny-list silently admits anything new.
Part of #6253
Type of change
Test plan
Unit tests (
task test)E2E tests (
task test-e2e)Linting (
task lint-fix)Manual testing (describe below)
Enumerated every value of
CommentAuthorAssociationagainst both the old and new conditions to confirm exactly which lose access:CONTRIBUTORandMANNEQUIN, and nothing else.All four event branches (
issue_comment,pull_request_review_comment,pull_request_review,issues) keep their existing@claudebody check and their existing association source — only the association test changed.actionlintis clean on the file and the workflow parses.Does this introduce a user-facing change?
Yes, for maintainers:
@claudeno longer responds to people without write access to the repository. Anyone who isOWNER,MEMBERorCOLLABORATORis unaffected. If an outside contributor should keep access, the fix is to add them as a repository collaborator rather than to widen this condition.Special notes for reviewers
@claudeas a non-collaborator — that is the one behavioural risk here, and it fails closed (the job simply does not run) rather than erroring.contents: writespecifically so Claude can push commits to pull requests, so the credential is in use. Left alone.Generated with Claude Code