Repository navigation
Remove the comment-triggered Claude agent workflow - #267
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The workflow ran an AI agent whose instructions were the body of an issue or comment. Only trusted accounts could trigger it, but once a trusted account mentioned the bot on someone else's issue or pull request, the agent read that outsider's text while holding a token that can write to the repository. It has not run in months. Removing it closes that path; git history keeps it. The guard test now checks that no workflow runs the agent on events whose body an outsider writes, with in-test controls showing the check can fail. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
.github/workflows/claude.ymlran an AI agent whose instructions were the body of an issue or comment. Itsif:let only OWNER/MEMBER/COLLABORATOR accounts trigger it. But once a trusted account wrote@claudeon someone else's issue or pull request, the agent read that outsider's text while holdingid-token: write, which is exchanged for an app token that can write to the repository. A crafted issue body could therefore steer a write-capable agent. The workflow has not run in months (its recent runs were all skipped), so it is removed rather than narrowed. A narrowed bot would still hold write tools. Git history keeps the file.What changed
.github/workflows/claude.yml.tests/integration/test_claude_workflow_author_guard.pynow pins the new state instead of the old per-trigger guard:.github/workflows/(count reported in the failure message).anthropics/claude-code-actionstep may declareissue_comment,issues,pull_request_review,pull_request_review_comment,discussionordiscussion_comment.claude.ymlmust stay absent.claude-code-review.yml(pull_request only) is detected as an agent workflow and passes.Evidence
claude.ymlstill present: 2 driving tests failed ("checked 6 workflow file(s); 1 run the Claude agent on triggers whose body an outsider writes: claude.yml: issue_comment, issues, pull_request_review, pull_request_review_comment"), and the 4 control/pin tests passed. Then the file was deleted.pytest tests/ -x: 5862 passed, 4 skipped, 37 xfailed, 20 xpassed.ruff checkandruff format --checkare clean on the changed file.Not in this PR
claude-code-review.yml(pull-request review bot) is unchanged; reviewing its scope is separate follow-up work.pypienvironment and tag protection forv*(whichrelease.ymlpublishes on), are owner decisions and are not changed here.🤖 Generated with Claude Code