Skip to content

actions-disable-guard: a gh command built at run time gets through #1131

Done

Description

@scuttletoby

What: actions-disable-guard on main lets a command through when the guarded words are put together at run time, for example gh $(printf "workflow dis%sable" "") 1. The guard reads the command text, and the words "workflow disable" never appear in it.

Found by: the #1108 fix round (it is a gap on main, not in that PR).

Done when: a command substitution, printf/echo building, variable joins or eval that make a gh command which could disable a workflow are refused (fail closed: a gh command whose arguments come from a substitution is refused unless the substitution is plainly harmless), with refused tests for these forms and allowed tests for ordinary gh $(...) uses the agents need.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:guardssize:smalltype:bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions