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
Fail Closed on a Run-Time gh Command or Subcommand Word Beside --admin in the Write Guard #3069
Found by the lane closing #3006, which fails closed on a run-time word among the words of a gh pr merge. That change reads only an argv already holding pr and merge. Develop's guard shares this. It was confirmed with a classify probe on constructed commands.
A Run-Time Word Where gh's Command or Subcommand Goes Hides a Merge
A run-time word where pr or merge goes, or where gh itself goes, keeps the guard from reading the command as a merge at all, so a literal --admin beside it passes:
gh pr $S 5 --admin
gh $P merge 5 --admin
G=gh; $G pr merge 5 --admin
Possible Direction
Read a gh argv carrying --admin with a run-time word before its first positional after pr, or in pr's place, as a merge that may run, and fail closed on it. The git side already does this for a run-time word where the subcommand goes and for a run-time command word, in _rewritten_git_words.
A local review on the lane closing #3006 found the same class without a literal --admin. These are each allowed, since the run-time word check reads only an argv already naming pr and merge:
gh $X merge 5 $A
gh pr $M 5 $A
"$GH" pr merge 5 $A
A fix here could cover a run-time word where gh, pr, or merge goes whether or not --admin is written out.
Activity
ptr727 commentedon Oct 15, 2026
A local review on the lane closing #3006 found the same class without a literal
--admin. These are each allowed, since the run-time word check reads only an argv already namingprandmerge:gh $X merge 5 $Agh pr $M 5 $A"$GH" pr merge 5 $AA fix here could cover a run-time word where gh,
pr, ormergegoes whether or not--adminis written out.Read Abbreviated, Clustered, and Negated Options in the Write Guard (#…
Read a gh Write's Subcommand and Target the Way gh Parses Them (#3135)