Skip to content

Allow a Bounded Wrapper Inside a function-Keyword Definition #2314

Closed as not planned

Description

@ptr727

Problem

The wait-loop check in host-setup/agent-safety/claude/gh-write-guard.py denies a bounded wrapper inside a function defined with the function keyword and no (). Constructed example, denied although the timeout bounds the loop:

function f { timeout 900 bash -c 'until [ -f x ]; do sleep 60; done'; }

The walk back from the wrapper reaches function, which is neither a command prefix nor timeout, so the run reads as unbounded. README requirement 7 does not declare this false deny. The f() { ... } form is allowed.

Done looks like

The function name { opener ends the walk the way a separator does, with a self-test row for the shape above, or README requirement 7 declares the false deny.

Found by a local strict review pass on #2117. It predates that pull request.

Activity

  1. 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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions