Strip write capability from the untrusted-triggered claude.yml run - #99
Open
Jartans-Familiar wants to merge 1 commit into
Open
Jartans-Familiar wants to merge 1 commit into
Jartans-Familiar wants to merge 1 commit into
Conversation
author_association gates this trigger, but the field cannot tell a human org member from a machine account in the same org — every agent workforce account is MEMBER, so every agent run passed a gate meant to exclude outsiders (JAR-681, Row A). Tightening the association list doesn't close this: it removes legitimate humans while any machine holding COLLABORATOR still passes. Mint the App token with read-only permission-contents/issues/pull-requests instead of write, drop the matching job-level write scopes, and remove --dangerously-skip-permissions. scaffold is our published template — every downstream fork inherits this workflow, so this fix should be pulled into forks too. JAR-687 Co-authored-by: multica-agent <github@multica.ai>
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
author_associationgates this trigger, but the field cannot tell a human org member from a machine account in the same org — every agent workforce account isMEMBER, so every agent run (not just outside attackers) passed a gate meant to exclude untrusted principals. Row A of JAR-681. Per the accepted bar (JAR-687): tightening theauthor_associationlist is explicitly rejected as a fix — it removes legitimate humans while any machine holdingCOLLABORATORstill passes. The capability has to go, not the guard.permission-contents/issues/pull-requestsinstead of write.permissions:block to read-only.--dangerously-skip-permissions.if:gate that claimed the association check "blocks the pwn-request path" via a write-scoped token — the token is no longer write-scoped, and the checkout was already pinned togithub.ref_name(never fork-PR code), so that framing was already inaccurate before this fix.scaffoldis our published template — every downstream fork inherits this workflow and this defect. Forks should pull this fix (or the equivalent) into their ownclaude.yml.Reproduction test
tests/test_claude_workflow_security.pyreads the shipped.github/workflows/claude.ymland asserts no write scope is minted and permission checks aren't skipped. Verified fail-before / pass-after against base revisiona502e218f9ed3800c74f255247a8fd1eb1708691:contents: writeand--dangerously-skip-permissionspresent.Test plan
ruff check .ruff format --check .pytest -m "not integration"(18 passed, including the new regression test)JAR-687