Skip to content

Skip Quoted Heredoc Data When Reading a Run-Time Git Subcommand in the Write Guard #3380

Closed

Description

@ptr727

Context

Found while working the export, xargs, env, and launcher allow-gap lane, when an edit script fed to cat through a quoted heredoc was denied. Develop's guard shares it, and it was confirmed with a classify probe on a constructed command.

A Quoted Heredoc's Data Is Read for a Run-Time Git Subcommand

A heredoc whose delimiter is quoted is data, yet a backtick span in it holding an assignment and then git is read as a git command with a run-time subcommand word:

cat > /example/notes.md <<'EOF'
as in `NAME=value git ...`
EOF

This is denied with "a run-time word, ...`, where the subcommand of git goes". The same text without the NAME=value word is allowed, so the assignment is what puts git in command position for the reader.

Possible Direction

Skip quoted-delimiter heredoc data in the reader that names a run-time subcommand word, as the other heredoc-aware readers do.

This is an over-denial, so the allow-gap lane that found it did not narrow it, per that lane's rule.

Activity

  1. added
    bug
    pre-existing
    script
    on Oct 23, 2026
  2. ptr727 commented on Oct 24, 2026

    @ptr727
    OwnerAuthor

    Closed as resolved by the write guard rewrite (#3407, on main through promotion #3417). The command shape this issue records is one of the source-tagged cases in the rewritten guard's self-test corpus, so the shape is read the way the issue asks, and the corpus case is what keeps it so. Reopen with the command if a session still hits it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpre-existingscript

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions