Skip to content

git-guard blocks read-only show-ref and ls-remote commands #3058

Description

@aider4ryder

Summary

The CSA git-guard blocks read-only repository attestation commands that neither write refs nor publish data.

Session

  • Session ID: 01KZTZZJXBBMB438B3E0NEQJGE
  • Session dir: /home/obj/.local/state/cli-sub-agent/home/obj/project/github/RyderFreeman4Logos/adk-workflow-kit/sessions/01KZTZZJXBBMB438B3E0NEQJGE
  • Repository: /home/obj/project/github/RyderFreeman4Logos/adk-workflow-kit

Reproduction 1

Command:

git show-ref --verify --hash refs/heads/feat/comp-003-closed-operators

Exit: 128

Stderr:

CSA git-guard: blocked command: git <command> <option> <option> <argument>
Use a hermetic local bare fixture under $CSA_SESSION_DIR/git-fixtures and push to its direct canonical path or file:// URL.

Reproduction 2

Command:

git ls-remote --heads origin refs/heads/main refs/heads/feat/comp-003-closed-operators

Exit: 128

Stderr:

CSA git-guard: blocked command: git <command> <option> <argument> <argument> <argument>
Use a hermetic local bare fixture under $CSA_SESSION_DIR/git-fixtures and push to its direct canonical path or file:// URL.

Expected

Both commands should be allowed because they are read-only attestations. show-ref reads local refs; ls-remote reads remote refs and cannot push or mutate them.

Impact

Sole-writer and no-publish tasks cannot prove local feature-ref identity or remote-feature absence with canonical Git plumbing. The current workaround is git rev-parse for local refs and read-only GitHub API calls for remote refs.

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