Skip to content

The Guard's eval Reading Ends Its Arguments at a Parenthesis #2362

Closed as not planned

Description

@ptr727

Problem

The guard's eval reading (#2080) ends an eval's arguments at any unquoted ( or ) token. Among an eval's words that is usually a command substitution or a process substitution, which is one of the arguments rather than the end of the command, so the loop after it is never read.

Reproduce (constructed)

Allowed by the guard, and loops under timeout 3 bash -c until the timeout kills it:

eval $(true) 'until false; do sleep 1; done'

Done looks like

An eval's arguments end only at ;, &, |, or a newline, alone or fused to another operator, never at a parenthesis. The command above is denied, and a self-test row pins it.

Found by the third local strict review of the #2080 branch and split out per decision #2208. Develop allows this command too, since it reads no eval argument at all.

Activity

  1. added
    bug
    agents
    on Oct 4, 2026
  2. ptr727 commented on Oct 8, 2026

    @ptr727
    OwnerAuthor

    Declined per #2517, approved by the maintainer, under GOVERNANCE.md "Trust Boundaries and Hardening Effort": The guard backstops an agent's own mistakes, and this is a command shape built to defeat it rather than one an agent session writes, so a miss does not realistically occur. See #2517 for the per-issue reason.

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

    agentsbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions