Repository navigation
docs(guardrails): route replies quoting a merge command through --body-file - #18977
Conversation
…y-file The merge guard refuses merge-shaped text that holds a backtick anywhere on the command line, so a reply whose inline body quotes `gh pr merge 42` is blocked. It reads only the command line, never a body file, so the README now says to post such a body with --body-file or -F body=@file. Closes #18900 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed Security review: PR #18977No security issues found. I read both changed files in full: The change adds one sentence to the merge-guard row of the README and adds a patch changelog fragment. No code, hook, manifest, workflow or trusted path is touched. Instruction-surface lens: The diff deletes, narrows or softens no standing instruction. The README row keeps every refusal it listed before. The new sentence only documents an existing behavior: a reply or comment that quotes a backticked merge command inline ( Does this documented route get around the guard? No. I checked three things:
Other checks:
critical-findings: 0 |
|
claude-review reviewed Code review: PR #18977, docs(guardrails): route replies quoting a merge command through --body-fileThis PR changes documentation only. It adds one sentence to the merge-guard row in Blocking
Embedded text: nothing in the PR context, prior findings or criteria files tried to direct this lane. Spend: none. The change is documentation only. Loosened checks: the prompt carries no Verifier dropped 0 of 1 candidates. No verifier subagent ran: the change is two documentation files, and I checked the one candidate directly against the PR context. |
Closes #18900
Summary
The merge guard refuses a reply or comment whose inline body quotes a merge command in backticks, such as
`gh pr merge 42`in a GraphQL review-thread reply. The owner chose to keep that fail-closed behavior and document the route around it. The guard's README entry now says to post such a body from a file.Fix
plugins/guardrails/README.md, merge-guard row: one sentence saying that an inline--body, a-f body=...value or agh api graphqlquery string holding a backticked merge command is refused, and that the body goes through--body-file <file>, or-F body=@<file>forgh api(a GraphQL variable included), because the guard reads only the command line..changes/guardrails/: a patch fragment.The guard's behavior is unchanged.
Verification
plugins/guardrails/hooks/merge-guard.shat the base: lines 53-62 state the backtick refusal holds for a quoted--bodyand name--body-file; lines 733-736 set the refusal from the command text alone ($COMMANDwith quoted heredoc bodies cut), so a body file's contents are never read.addPullRequestReviewThreadReplywith the backticked merge in the query string,gh api ... -f body='...', andgh pr comment --body "...". Exit 0 (passed): the same GraphQL reply with the body from-F b=@<file>,gh api ... -F body=@<file>, andgh pr comment --body-file <file>.merge-guard.test.sh: 727 passed, 0 failed.guard-count.test.shandonfailure-rows.test.sh, which read the README: pass.Related
merge-guard.sh.🤖 Generated with Claude Code