Skip to content

tool guard: other spellings of a hook-skipping push aren't refused #993

Closed

Description

@jayden1711

The tool guard refuses an agent's push that skips the pre-push hook only when the skip is spelled exactly. Other spellings git accepts are let through, and git then skips the hook (measured on main 40ef312, in a scratch repo with a local bare remote and a refusing hook). The exact forms are held privately (#707). Found by the second review of #932 round 6.

Impact is limited (inferred): agents have no push credentials, and the push gate on the server side is unaffected.

Fix, by design: read push and commit option words the way git does: unique long-option prefixes, plus aliases from -c and from the repo config. Alternatively, refuse any line whose git subcommand is an alias, or whose option is an abbreviation, when the hook could be skipped. This is the same direction as #979, which refuses shell evaluation in git's words.

Until this is fixed, pushgate.no-hatch-skip-swap is not counted as covered on the #707 scoreboard.

Activity

  1. added 18 commits that reference this issue on Oct 21, 2026
  2. added a commit that references this issue on Oct 26, 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