Skip to content

gate: subagent guard allows a backslash-escaped letter inside git or its subcommand (g\it stash, git re\set) #317

Closed

Description

@wasikarn

Found by the #306 differential fuzz (43 of its 46 remaining false-allows; pre-existing, not caused by #306).

In a shell a backslash before an ordinary letter is dropped, so an escaped letter inside the git word or the subcommand still runs plain stash, reset or clean. The guard's anchor only strips one leading backslash, and the quote mask keeps backslash pairs as they are, so the subagent guard allows these. Fix direction: drop a backslash that precedes a non-special character when matching command and subcommand words, then fuzz it per docs/reference/repo-gotchas.md. Check irrecoverable.py for the same gap.

Activity

  1. added a commit that references this issue on Oct 2, 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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions