Skip to content

check_release_tree.py wrapper-command allowlist misses command, nice, stdbuf, and a backslash .. escape #950

Closed

Description

@fdaviddpt

Consolidates two trap.d fragments from the v0.42.0 release gate 3 audit (round 2 and round 4), both re-checked directly against .github/scripts/check_release_tree.py:839-889 while curating trap.d/ (2026-10-07) -- still true.

1. command builtin not in _UNSCOPED_COMMANDS. The set at line 840-851 lists shells, interpreters, package managers, downloaders and wrapper commands (xargs, sudo, eval, exec, source, ., find, awk, nohup, timeout, added for #879) -- but not command. bash_grant_problem("Bash(command curl:*)") returns None (not flagged), while Bash(sudo curl:*) and Bash(env curl:*) are correctly refused. No shipped allowed-tools grant in this repo currently uses command, so this matters only for a future grant.

2. Other wrapper spellings and a backslash-separated .. escape also missed. Same set/function: nice and stdbuf are not listed either, and the .. path-escape check at line 876 (if ".." in p.split("/")) only splits on forward slash, so a path with backslash-separated .. segments instead of forward-slash ones is not caught. Bash(nice:*), Bash(stdbuf:*) and that backslash-escaped form all return None from bash_grant_problem, while Bash(timeout 5 bash:*) and the forward-slash /../ form are correctly refused (the auditor's own positive control). No shipped file in this repo currently carries any of these four missed grants.

What would settle it: add command, nice, stdbuf to _UNSCOPED_COMMANDS, and widen the .. path-escape check to split on both forward and backslash separators (or normalize separators before the check) -- docs/releasing.md also still says wrapper commands are "not yet" covered, which understates current coverage and is worth correcting alongside the code fix.

Original fragments: trap.d/879.wrapper-grant-missing-command-builtin.md, trap.d/879.wrapper-grant-spellings-missed.md (deleted by this same curate pass).

[AI-generated]

Activity

  1. added
    priority:low
    filed-by-loop
    lane-other
    on Oct 7, 2026
  2. added
    cohort-21
    cohort-22
    on Oct 7, 2026
  3. self-assigned this
    on Oct 8, 2026
  4. added a commit that references this issue on Oct 8, 2026
  5. removed their assignment
    on Oct 8, 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

    cohort-21cohort-22filed-by-looplane-otherpriority:low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions