Skip to content

agent-guards: switch-off shapes the actions-disable-guard full reading passes on main (globs, $PWD, 4 deep, base64 | bash, workflow file deletes) #1208

Backlog

Description

@scuttletoby

actions-disable-guard (fork-kit/agent-guards): the full reading on main already passes these switch-off shapes. Each file below holds the gh workflow-disable call, or runs a file that does. Found in the PR #1180 lens round 1 (item 5) and by the writer of round 2. They are out of scope for #1180.

Passed by the full reading on main:

  • globs and expansion in a script name: bash o*.sh, bash off.s[h], bash $((1)).sh, for f in *.sh; do bash $f; done
  • bash a=b.sh (a file named like an assignment)
  • a variable the guard does not know: bash "$PWD/off.sh", bash "${D:-.}/off.sh", cd "$X" && bash off.sh
  • a script four files deep (l1 → l2 → l3 → off.sh)
  • encoded or reversed text piped into a shell: base64 -d x | bash, rev x | bash
  • cat a.sh | bash, where a.sh holds no token but runs bash {off,zz}.sh
  • find . -name off.sh -exec bash {} \;, ls | xargs bash
  • a shell function that runs its argument: f() { bash "$1"; }; f off.sh
  • a script that is not there when the guard reads (bash x.sh, written later in the same call by a tool the guard does not read)
  • project launchers: make, npm run t, pnpm t, where the Makefile or package.json holds the call (they are not read)
  • Python code that runs a shell line (subprocess.run('bash {off,zz}.sh', shell=True)): code files are read for tokens only

Not covered by the guard at all:

  • deleting or renaming workflow files: git rm -r .github, mv .github x, rm .github/workflows/ci.yml

#1180 dropped its out-of-time skim, so the full reading is the only reading: out of time, the guard refuses whatever the command is, as on main. Each shape above should get a test that is red on main.

Part of #1094

🤖 Generated with Claude Code

Activity

  1. added
    bug
    area:guards
    size:small
    type:bug
    on Nov 28, 2026
  2. scuttletoby commented on Nov 29, 2026

    @scuttletoby
    OwnerAuthor

    Minors from #1248 round 2 (placed worktree pins), for the sweep:

    🤖 Generated with Claude Code

  3. scuttletoby commented on Nov 29, 2026

    @scuttletoby
    OwnerAuthor

    More cases for this list, from the #1261 round-2 security reviews. They are not fixed there. Each one runs text the guard cannot read, with no cue in the command:

    🤖 Generated with Claude Code

  4. scuttletoby commented on Nov 29, 2026

    @scuttletoby
    OwnerAuthor

    Claim: a writer is taking the three placed-worktree pin minors from the first comment here (from #1248), together with the #1252 lens minors, in one PR on fix/delegate-launch-minors. The guard cases in this issue stay open.

    🤖 Generated with Claude Code

  5. scuttletoby commented on Nov 29, 2026

    @scuttletoby
    OwnerAuthor

    Claim: a writer from the minors sweep is taking the first group of guard shapes here, a shell's script name the guard cannot spell out: globs and expansion in the name (bash o*.sh, bash off.s[h], bash $((1)).sh, for f in *.sh; do bash $f; done), bash a=b.sh, and bash "$PWD/off.sh". Branch fix/actions-guard-1208-shapes.

    bash "${D:-.}/off.sh", cd "$X" && bash off.sh and the four-deep script are already refused on main (checked on 0eb2ed8). The other shapes (pipes into a shell, find/xargs, functions, launchers, python, workflow file deletes, and the comment lists) are not in this round.

    🤖 Generated with Claude Code

  6. scuttletoby commented on Nov 29, 2026

    @scuttletoby
    OwnerAuthor

    Claim: a writer from the minors sweep is taking the pipe group here, branch fix/actions-guard-1208-pipes: base64 -d x | bash, rev x | bash and cat a.sh | bash (a.sh names no token but runs bash {off,zz}.sh). The same fix covers tr/gzip -dc/xxd -r into a shell, and such text written to a file the same command runs (base64 -d x > y.sh; bash y.sh).

    Not in this round: find -exec bash {}, ls | xargs bash, shell functions, launchers (make/npm/pnpm), Python running a shell line, and the $(..)/<(..) forms of a decoder (eval "$(base64 -d x)", source <(base64 -d x), which still pass).

    Owner question (skipped until answered): workflow file deletes. git rm -r .github, mv .github x and rm .github/workflows/ci.yml pass today. Refusing them also blocks normal work: removing or renaming a workflow in a PR that the owner asked for. Which should the guard do?

    1. (Recommended) Leave local deletes alone. The change only takes effect when it is pushed and merged, and the push and the review are where it can be stopped (a token without workflow scope cannot push it at all).
    2. Refuse deleting or moving anything under .github/workflows/, with the owner marker as the way out.

    🤖 Generated with Claude Code

  7. scuttletoby commented on Nov 29, 2026

    @scuttletoby
    OwnerAuthor

    Decision (orchestrator, a clear call, not an owner question): local deletes of workflow files (git rm -r .github, rm .github/workflows/ci.yml) stay allowed. A local delete turns nothing off. Getting it onto GitHub needs a push with workflow scope and a PR through review and the merge gate, which already catch it. Refusing it would block normal workflow edits. Skip that item.

    🤖 Generated with Claude Code

  8. scuttletoby commented on Nov 29, 2026

    @scuttletoby
    OwnerAuthor

    Claim: a writer from the minors sweep is taking the runner group here, branch fix/actions-guard-1208-runners: find . -name off.sh -exec bash {} \;, ls | xargs bash and a shell function that runs its argument (f() { bash "$1"; }; f off.sh).

    Not in this round: launchers (make/npm/pnpm), Python running a shell line, the $(..)/<(..) decoder forms, and the 11-29 comment's list (inline python/node, here-strings, heredoc bodies, positional file names).

    🤖 Generated with Claude Code

  9. 1 remaining item

  10. scuttletoby commented on Nov 30, 2026

    @scuttletoby
    OwnerAuthor

    Claim: a writer from the minors sweep is taking the decoder group here, branch fix/actions-guard-1208-decoders: text a stage makes at run time that a shell then runs through a substitution, not a pipe. These pass on main 9983982:

    • eval "$(base64 -d x)", eval "$(rev x)", bash -c "$(rev x)"
    • source <(base64 -d x), . <(rev x), bash <(rev x), sh <(base64 -d x)
    • bash -s <<< "$(rev x)", bash <<< "$(base64 -d x)", . /dev/stdin <<< "$(rev x)"

    These are already refused on main (checked on the same commit), so they need no change: bash -s <<< "$(cat cmd.txt)", source /dev/stdin <<< "$(cat cmd.txt)", a heredoc body bash <<EOF\n$(cat cmd.txt)\nEOF, and the inline python3 -c 'os.system("gh $(cat args.txt) 1")' / node -e '..execSync(..)'.

    Not in this round: launchers (make/npm/pnpm), Python subprocess.run('..', shell=True) running a shell line, and the positional file name case from the 11-29 comment.

    🤖 Generated with Claude Code

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

    area:guardsbugsize:smalltype:bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions