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
Read the Config-Change Scan's Remaining Run-Time, Eval, and Xargs Forms in the Write Guard #3307
Found by the local review passes on #3306, which added _config_may_change to close #3046. Develop allows every case below, so none is a regression against develop. Each is a form the new scan does not yet read.
Forms the Config-Change Scan Before a Push Does Not Read
host-setup/agent-safety/claude/gh-write-guard.py marks a push's remote mirror key and its checkout's origin unresolved after a command that may rewrite them. These still read as rewriting nothing.
A run-time command word behind a launcher or a loop keyword._runs_run_time_word counts only the command _command_prefix names. So while "$CMD"; do :; done; git push --tags origin, flock /example/l "$CMD"; git push --tags origin, watch "$CMD"; ..., and coproc "$CMD"; ... are allowed. while and until are missing from _COMMAND_POSITION_WORDS, which _prefix_walk relies on.
An eval or source inside a wrapper body or a substitution._names_config_change does not read the payload. So bash -c 'eval "$CMD"'; git push --tags origin and echo "$(eval 'git config remote.origin.mirror true')"; git push --tags origin are allowed. _eval_payload_texts already returns what an executed eval runs.
A -c wrapper whose body xargs supplies._shell_reads_unread_script returns False whenever -c is present, so echo '...' | xargs -0 bash -c; git push --tags origin is allowed.
The Deny Message Names the Wrong Cause
When the scan marks the push's repository unresolved, the push to a protected-default branch is denied. The deny says "the repository this push runs in could not be determined" and suggests -C. For example, "$PY" scripts/validate.py && git push origin develop in a repository whose develop takes direct pushes. The real cause is an earlier command that may rewrite the remote config, and the remedy is to run the push as its own command.
Possible Direction
Read a run-time command word wherever _runs_as_command says it runs, while keeping an argument such as mkdir -p "$D" out of it. Read eval payloads in _names_config_change. Read a bodiless -c as unread input. Give the config-change case its own deny reason.
echo git | xargs -I{} {} config remote.origin.mirror true; git push --tags origin. The replace string sits where the command goes, a run-time command word the scan does not read.
Activity
Read Config and Alias Rewrites the Write Guard Missed (#3306)
ptr727 commentedon Oct 22, 2026
Two more config-change shapes from the local review of #3342, each allowed by develop and by that change:
echo remote.origin.mirror true | xargs git config; git push --tags origin. Wordsxargsappends turn a read-only-lookinggit configinto a write. Read Words xargs Appends to a gh Write in the Write Guard #3336 covers the gh-write analogue.echo git | xargs -I{} {} config remote.origin.mirror true; git push --tags origin. The replace string sits where the command goes, a run-time command word the scan does not read.Read Every Launcher and Exported Git Directory in the Write Guard (#3342
Promote the Write Guard Launcher Reads, Shield Filter, and Stand-Down…
Close Export, Xargs, Env, and Launcher Allow Gaps in the Write Guard (#…