Skip to content

Write Guard Skips Command Substitutions Inside an Unquoted-Delimiter Heredoc in a Substitution #2999

Closed

Description

@ptr727

Defect

The guard skips a heredoc body inside a command substitution whether or not its delimiter is quoted. With an unquoted delimiter bash still runs a $(...) or backtick inside the body. With constructed text, a double-quoted substitution holding cat fed an unquoted-delimiter heredoc whose body contains a $(...) running a hooks-bypass commit is allowed. The same text at top level is denied.

Possible Direction

Read the command substitutions inside an unquoted-delimiter heredoc body as commands, in the substitution reading and at top level alike. Found in review of the README update for #2990.

Activity

  1. added
    script
    on Oct 14, 2026
  2. ptr727 commented on Oct 15, 2026

    @ptr727
    OwnerAuthor

    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.

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

    script

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions