You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Decide Whether the Write Guard Fails Closed on an Unread Target With No Origin #3288
gateA rule with no mechanical check, or a check that misses a shapepre-existingReview finding classed pre-existing per local-strict-review Disposing of Findings
The write guard checks an unread target (a gh api endpoint named by repository id or with a .. segment, an executed eval write) only inside the branch that runs when the origin resolves. A hook invocation from a directory outside any repository resolves no origin, skips that branch, and admits the write.
Evidence
Constructed input run through classify with origin=None, from a scratch directory:
gh api -X POST repositories/12345 is allowed, and is allowed by the main branch's guard too.
gh pr comment 5 -b x and gh api -X POST repos/stranger/repo/issues are allowed on both.
The code comment above the if origin: block states that with no project context there is nothing to compare an explicit target against, so rules 1 and 2 still apply. The unread-target check was placed beside that comparison, so it inherits the skip.
Question
Whether a write with no resolvable origin should fail closed for an unread target. A decision on the no-origin posture of the whole guard is the maintainer's.
Found while reviewing the develop to main promotion pull request that carries the unread-target check.
Answered by the maintainer: with no resolvable origin, fail closed on an unread target (an executed eval write, a repositories/<id> endpoint, a .. API path segment). Literal targets keep the current no-origin behavior. The guard cannot check an owner in either case, these shapes are rare outside a checkout, and the change stays narrow.
gateA rule with no mechanical check, or a check that misses a shapepre-existingReview finding classed pre-existing per local-strict-review Disposing of Findings
Activity
ptr727 commentedon Oct 20, 2026
Answered by the maintainer: with no resolvable origin, fail closed on an unread target (an executed
evalwrite, arepositories/<id>endpoint, a..API path segment). Literal targets keep the current no-origin behavior. The guard cannot check an owner in either case, these shapes are rare outside a checkout, and the change stays narrow.Fail Closed on an Unread Write Target With No Origin (#3297)
Promote the No-Origin Guard, Docker Test Reader, and Handoff Prompt F…