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
fix(guardrails): close remaining block-unresolved-pr-merge target-resolution gaps #8657
agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.status: readyTriaged, unblocked, and fully specified; eligible to pick up.
GitHub Security & Cost's pass on #8628 (low) listed these gaps as pre-existing or medium, for a follow-up. Each needs the agent itself to write the command; none is reachable from a public attacker.
Items 1-4 are held by the owner (2026-10-22).
1. Pre-filter on raw text:gh pr mer"ge" 5, VERB=merge; gh pr $VERB, and gh api -X "$M" .../merge skip the hook's merge detection.
2. Host-qualified repo:-R github.com/o/r gets a 404, which takes the fail-open path. Strip the host, and refuse a 404 on a literal target.
3. Repo context changes:GH_REPO=x/y or cd other && makes the hook check the session repo's PR; a closed one exits 0.
4. Unencoded branch: a branch name goes into the pulls head= query unencoded.
Proposed work class: work-class: scoped
Basis: automated intake triage; the lanes App applied this class.
Size: Medium
Complexity: Medium
Uncertainty: Knowable
Flags: none
Understood: four remaining gaps in the block-unresolved-pr-merge hook need fixes, each with a test that fails before the fix. The gaps are raw-text pre-filter bypasses, host-qualified -R repos failing open on 404, repo-context changes (GH_REPO or cd), and an unencoded branch name in the head= query. Item 5 is already done. They are hardening of an existing hook, and each needs the agent to write the command itself. No decision recorded or missing info blocks this. Likely duplicates: none found among open issues (related: #8598, #8628).
Correction: #8628 does not join backslash-newlines (an earlier commit did, and the AI review showed it opens bypasses through comments, quoted heredocs and escaped backslashes). As of 8d8c063, a pr merge or REST merge route continued with a backslash-newline is refused instead, which also closes the in-word continuation case. Item 1's quote and variable obfuscations (mer"ge", VERB=merge; gh pr $VERB, -X "$M") remain open.
Lowercased, "Gated PR Merge" matches the pr[[:space:]]+merge shape, and the single-quoted grep pattern holds a backtick, so the whole command is refused as a merge. The same refusal hit this comment when it was posted through gh issue comment --body-file - with a heredoc, so any heredoc PR or issue text that mentions the guard's name and uses a backtick is refused too.
Fix idea: anchor the shape match to a command segment whose argv[0] is gh (after an optional prefix such as env/command), or to a REST or GraphQL merge route, instead of matching anywhere in the text. Trade-off: anchoring re-opens obfuscated spellings (g""h pr merge), already item 1 here, so the fix should keep refusing a backtick plus pr merge when argv[0] can't be resolved. Stay-quiet tests for this command and for a heredoc gh issue comment body must fail before the fix, per the hook-precision convention. Severity: low to medium. Rephrasing costs a turn, and heredoc bodies are a common agent pattern.
The false positive recorded here on 2026-10-20 (prose naming the guard next to a backtick) is fixed by #8844, merged 2026-10-21 as df334a9. The guard now treats pr ... merge as merge-shaped only when the word before pr is gh or can't be resolved, and the KNOWN GAPS header was brought up to date. Items 1-5 above stay open (hardening, held under #7719).
Owner decision (2026-10-22): keep items 1-4 held; item 5 is done in #8844 (df334a95b4), whose KNOWN GAPS list names "a gh alias" (plugins/guardrails/hooks/block-unresolved-pr-merge.sh:83). The body's task list now shows this.
Released for re-triage under the owner's 2026-10-24 rule: an issue stops for a person only for an intent or vision question, a security call, a host or attended run, or spend outside prepaid credit. The hold label came off and intake triage runs again now; it re-applies a hold, with a numbered question, when one of those applies.
To hold this issue again, add needs-human (or status: needs-decision) and say why in a comment.
agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.status: readyTriaged, unblocked, and fully specified; eligible to pick up.
Activity
github-actions commentedon Oct 20, 2026
Proposed work class: work-class: scoped
Basis: automated intake triage; the lanes App applied this class.
Size: Medium
Complexity: Medium
Uncertainty: Knowable
Flags: none
Understood: four remaining gaps in the block-unresolved-pr-merge hook need fixes, each with a test that fails before the fix. The gaps are raw-text pre-filter bypasses, host-qualified -R repos failing open on 404, repo-context changes (GH_REPO or cd), and an unencoded branch name in the head= query. Item 5 is already done. They are hardening of an existing hook, and each needs the agent to write the command itself. No decision recorded or missing info blocks this. Likely duplicates: none found among open issues (related: #8598, #8628).
Automated triage, applied by the lanes App.
fix(guardrails): key the backtick refusal on merge-shaped text
kyle-sexton commentedon Oct 20, 2026
Correction: #8628 does not join backslash-newlines (an earlier commit did, and the AI review showed it opens bypasses through comments, quoted heredocs and escaped backslashes). As of 8d8c063, a
pr mergeor REST merge route continued with a backslash-newline is refused instead, which also closes the in-word continuation case. Item 1's quote and variable obfuscations (mer"ge",VERB=merge; gh pr $VERB,-X "$M") remain open.kyle-sexton commentedon Oct 20, 2026
False positive from #8628's backtick refusal (reported by GitHub Security & Cost): a read-only command with no merge was refused.
Lowercased, "Gated PR Merge" matches the
pr[[:space:]]+mergeshape, and the single-quoted grep pattern holds a backtick, so the whole command is refused as a merge. The same refusal hit this comment when it was posted throughgh issue comment --body-file -with a heredoc, so any heredoc PR or issue text that mentions the guard's name and uses a backtick is refused too.Fix idea: anchor the shape match to a command segment whose argv[0] is
gh(after an optional prefix such asenv/command), or to a REST or GraphQL merge route, instead of matching anywhere in the text. Trade-off: anchoring re-opens obfuscated spellings (g""h pr merge), already item 1 here, so the fix should keep refusing a backtick pluspr mergewhen argv[0] can't be resolved. Stay-quiet tests for this command and for a heredocgh issue commentbody must fail before the fix, per the hook-precision convention. Severity: low to medium. Rephrasing costs a turn, and heredoc bodies are a common agent pattern.kyle-sexton commentedon Oct 21, 2026
The false positive recorded here on 2026-10-20 (prose naming the guard next to a backtick) is fixed by #8844, merged 2026-10-21 as df334a9. The guard now treats
pr ... mergeas merge-shaped only when the word beforeprisghor can't be resolved, and the KNOWN GAPS header was brought up to date. Items 1-5 above stay open (hardening, held under #7719).kyle-sexton commentedon Oct 22, 2026
This was generated by AI during attend-queue.
Owner decision (2026-10-22): keep items 1-4 held; item 5 is done in #8844 (
df334a95b4), whose KNOWN GAPS list names "a gh alias" (plugins/guardrails/hooks/block-unresolved-pr-merge.sh:83). The body's task list now shows this.kyle-sexton commentedon Oct 24, 2026
Released for re-triage under the owner's 2026-10-24 rule: an issue stops for a person only for an intent or vision question, a security call, a host or attended run, or spend outside prepaid credit. The hold label came off and intake triage runs again now; it re-applies a hold, with a numbered question, when one of those applies.
To hold this issue again, add
needs-human(orstatus: needs-decision) and say why in a comment.