Skip to content

The Guard's Wait-Loop Rule Never Reads an eval Argument #2080

Closed

Description

@ptr727

Problem

The wait-loop rule never reads the argument of eval. It reads a sh -c/bash -c payload as the script that shell runs, but eval runs its arguments as shell text just the same, and the guard passes them as plain operands.

Reproduce (constructed)

Both are allowed on develop, and both loop under timeout 3 bash until the timeout kills them:

eval "until true; do sleep 1; done"
eval until [ -f y \";\" -lt 5 ]\; do sleep 1\; done

Done looks like

eval's arguments, joined with spaces as bash joins them, are read as a payload the way a shell wrapper's -c argument is, both commands above are denied, and self-test rows pin them.

Found by the local strict review of the #1998 fix (handoff #2073). It is older than that fix, and is the same kind of blind spot as a wait inside a script file.

Activity

  1. added
    bug
    agents
    pre-existing
    on Sep 29, 2026
  2. added a commit that references this issue on Oct 6, 2026
    0032064
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

    agentsbugpre-existing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions