Recipe Read Guard: check-ignore Metadata Command Compatibility (#4262)#4263
Open
AyushkhatiDev wants to merge 1 commit into
Open
Conversation
…T-Org#4262) ## Summary dry-walkthrough's required committability check (`git check-ignore -v {path}`) was denied by recipe_read_guard whenever the deliverable path was a protected recipe, skill, or agent path, because `check-ignore` was missing from `_PROTECTED_PATH_METADATA_GIT_SUBCOMMANDS` (PR TalonT-Org#4213's staged allowlist only covered `add`/`diff`/`status`/`wc -l`). Adds a narrow classifier for the exact grammar dry-walkthrough prescribes: `git check-ignore (-v|--verbose) [--no-index] [--] LITERAL_PATH...`. Permits only forms whose output is limited to ignore provenance/status for named literal paths. Rejects Git global options that redirect repository/config context (`-c`, `-C`, `--git-dir`, `--work-tree`, `--bare`), `--stdin` and other non-literal path sources, redirect metacharacters, and unexpanded shell variables. Both the hook (`recipe_read_guard.py`) and server (`_guards.py`) enforcement layers share the same primitive, so classification stays in parity automatically. Closes TalonT-Org#4262 🤖 Generated with [Claude Code](https://claude.com/claude-code) via AutoSkillit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
git check-ignore -v {path} was getting blocked by recipe_read_guard on protected paths because check-ignore was never added to _PROTECTED_PATH_METADATA_GIT_SUBCOMMANDS — #4213 only covered add/diff/status/wc -l.
Added a narrow classifier for the exact form dry-walkthrough prescribes. Only allows -v/--verbose with literal paths — rejects --stdin, shell variables, redirect metacharacters, and global Git options that can redirect config or repo context (-c, -C, --git-dir, --work-tree, --bare). Hook and server layers share the same primitive so parity is automatic.
Closes #4262