Skip to content

Write Guard Denies Heredoc Data Inside an Unquoted Backtick Substitution #3000

Closed

Description

@ptr727

Defect

A heredoc fed to cat with a quoted delimiter, inside an unquoted backtick substitution, is data to bash. The bypass-flag, include, and branch-rule checks still read its body and deny it, for example a body that only prints a push with the no-verify flag. The same body inside a double-quoted backtick substitution is allowed, and the rewritten-word and directory checks already treat the unquoted case as data.

Possible Direction

Make the unquoted backtick reading skip heredoc data in the same checks. Found in review of the README update for #2990.

Activity

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

    @ptr727
    OwnerAuthor

    Closed as out of the write guard's scope under the maintainer's decision (ptr727, 2026-10-23) on #3391, item 1. The guard bounds a good-faith agent's mistake rather than an adversary, so a parse gap reached only by a command shape no agent plausibly types in a coding session is closed rather than fixed, and the guard's own growth is a cost each later review pays again. The scope statement lands in the guard's docstring and README under #3391. Reopen only with a command a session actually produced.

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