Skip to content

Settle the Last Three Strict-Pass Findings on the timeout Rewrite Scan (#2117) #2196

Closed

Description

@ptr727

Question

Pull request #2117 (handoff #2072, track auto-1634, branch feature/auto-1634 at 14400ce) applies decision #2118's option 1: a word the shell may rewrite anywhere in a timeout run makes the run no bound. Three local strict passes ran on this push. The third raised 3 findings, 2 of them introduced, and both edit rounds for this push are spent, so editing stopped. How should the last three be settled?

What the branch holds now

  • 8aaf7c5: any word between timeout and the wrapper that the shell may rewrite makes the run no bound, whatever follows it. The launcher class (env -S 'timeout 800', xargs -I% % 800) is declared not reached in README requirement 7 and filed as Read a Launcher That Builds an Inner timeout as Nesting #2195.
  • 5a242c1 (pass 1): zsh's leading = counts as a rewrite, and a quoted word holding a rewrite character, such as 'a*b', is declared a false deny.
  • 14400ce (pass 2): the scan also covers the words before the head timeout, so env X=$T timeout 900 ... and sudo X=$T timeout 900 ... are denied, and a bash assignment prefix X=$T timeout ... is a declared false deny. A nesting whose inner deadline fires before any outer signal, such as timeout -s KILL 1000 timeout 800 ..., is declared a false deny.
  • --selftest passes, each new row was checked by reverting its logic, and ruff, prose_lint.py, repo_gate.py --check eol, spec/validate.py, and docker_lint.py are clean.
  • Pass 1 also raised a payload-level leak through a nested timeout, which is Stop an Inherited timeout Bound From Reaching a Loop Under a Nested timeout #2055 and was commented there.

Open findings from the last strict pass

  1. A command substitution hides the outer timeout. The walk back from the wrapper stops at the ) of a $(...), so the scan never sees it. timeout -s KILL 10 $(true) timeout 800 bash -c '<the loop>' and $(echo timeout -s KILL 10) timeout 800 bash -c '<the loop>' are allowed, and each runs an outer SIGKILL timeout over an inner one. The walk-back predates this branch, and the base allowed these too, but the README sentence 14400ce wrote claims a rewritable word before the timeout is covered.
  2. introduced: a brace group is now denied. A bare { opens the run and holds the { character, so { timeout 900 bash -c '<the loop>'; } is denied. The base allowed it. A reserved word is not a rewrite, and this deny is undeclared.
  3. introduced: a docstring pronoun binds to the wrong sentence. In _timeout_bounds_wrapper, "it is a false deny too" now follows the launcher sentence, so it reads as calling the launcher, which is a leak, a false deny.

Options

  1. Recommended: fix all three, then let PR review dispose of what follows. Skip a bare { in the rewrite scan, walk back to the last command separator rather than to a parenthesis so a substitution before the head is scanned, and reword the pronoun. Then record a pass and drive Deny a Signal-0 timeout as a Wait Bound in the Guard #2117, with PR review disposing of any later finding instead of parking again, as Choose How to Finish #1634's Lane After the Narrowed Model's Strict Passes #2079 allowed. This keeps every claim the README makes true.
  2. Fix findings 2 and 3, and declare finding 1. Skip a bare { and reword the pronoun, then list a command substitution before or around the head timeout in README requirement 7 as a shape not reached, and file it as a follow-up. PR review disposes of what follows. This is the smaller diff and leaves the walk-back alone.
  3. Drop the prefix-span scan from 14400ce. Scan only from the head timeout again, which removes finding 2 and the claim finding 1 contradicts, and declare a rewritable word before the head, env X=$T timeout ... included, as not reached. Reword the pronoun. This is the most conservative, and it gives back a hole pass 2 found.

Blocks

Activity

  1. added
    decision
    on Oct 1, 2026
  2. ptr727 commented on Oct 1, 2026

    @ptr727
    OwnerAuthor

    Answered by the maintainer: option 1. Fix all three findings (skip a bare { in the rewrite scan, walk back to the last command separator rather than to a parenthesis, reword the docstring pronoun), record a pass, and drive #2117, with PR review disposing of any later finding rather than parking again.

  3. removed
    decision
    on Oct 1, 2026
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