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 Substitutions Inside a Quoted Parameter Expansion or an Unquoted Heredoc Body in the Write Guard #2989
Found by the local review of the fix for #2976 and #2977. Each shape is allowed by develop's guard and by that fix, found by a classify probe on constructed commands. None is a regression.
Substitutions the Write Guard Still Does Not Read
A substitution inside a parameter expansion inside double quotes.echo "${X:-$(git push origin develop)}" and the backtick spelling of the same are allowed, since the double-quote scan skips a ${...} whole. The unquoted echo ${X:-$(git push origin develop)} is denied.
A substitution in a heredoc body whose delimiter is unquoted. Bash expands $(...) and backticks in a <<EOF body, while the guard skips every heredoc body that no shell reads. So a commit message written through git commit -F - <<EOF holding a Markdown-style backtick span such as `git push origin develop` runs that push, and the guard allows it. The same holds for x="$(cat <<EOF ... $(git push origin develop) ... EOF)". The quoted <<'EOF' form, the common one, is not affected.
Possible Direction
Fail closed as the rest of this class does. Scan a ${...} body inside double quotes for the substitutions it holds, and read the body of a heredoc whose delimiter is unquoted for its substitutions, as a double-quoted span is read, while leaving a quoted delimiter's body as data.
A third shape in the same class, from the second local review pass: a command substitution inside arithmetic inside double quotes. echo "$(( $(git push origin develop) ))" is allowed on develop and on the #2976/#2977 fix, since the double-quote scan skips a $((...)) whole. The unquoted echo $(( $(git push origin develop) )) is denied.
Activity
ptr727 commentedon Oct 14, 2026
A third shape in the same class, from the second local review pass: a command substitution inside arithmetic inside double quotes.
echo "$(( $(git push origin develop) ))"is allowed on develop and on the #2976/#2977 fix, since the double-quote scan skips a$((...))whole. The unquotedecho $(( $(git push origin develop) ))is denied.Fail Closed on Split Directory Values and Hidden Git Command Words in…
ptr727 commentedon Oct 15, 2026
Claimed for an engineering-track lane (handoff #3040 resume). Branch:
feature/guard-hidden-commands-3010. Predicted file set:host-setup/agent-safety/claude/gh-write-guard.py,host-setup/agent-safety/claude/test_install.py,host-setup/agent-safety/README.md,host-setup/agent-safety/claude/README.md.Read Commands Hidden in Config, Environment, Aliases, and Other Shell…