Repository navigation
feat(hooks): review only commands that reach past the sandbox - #178
Merged
Merged
Conversation
Local commands now pass in any form unless a forbidden rule or the
dangerous-Git guard denies them. Precise forms remain only for gh, curl,
and wget, where a run-time word counts as a placeholder. The Git guard
asks about a run-time word only when it can hide a denial: the program
or subcommand, an argument of an option-judged verb, or the repository
an implicit push reads its branch from.
A lone bracket is no longer a glob, parameter operations such as
${c:0:7} parse, and ln -s is allowed. ADR-0036 supersedes ADR-0034.
Refs #177
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 17, 2026
furedea
added a commit
that referenced
this pull request
Oct 17, 2026
…ts (#180) Prompts reported after #178 came from three sources other than the allowlist. - **Sandbox-failing Git forms are redirected.** - The dangerous-Git guard denies `git commit -S`/`--gpg-sign`, `git tag -s`/`--sign`/`-u`, and `git push -u`/`--set-upstream`. - The denial message names the form that works. These forms fail inside the sandbox, and sessions then retried them with the sandbox disabled, which prompted. - Options are matched as parsed arguments, so a commit message that mentions `-S` passes. - **`nix develop` moves to allow.** It enters the project's development shell, which `flake.lock` pins. `nix shell` and `nix run` keep asking. - **The shell directory scope check is dropped.** - `cd` and `git -C` outside the registered worktree asked even for reads. The sandbox confines shell writes, and the check never saw absolute-path writes made without a `cd`. - Write, Edit, patch, and `workdir` target checks stay. Closes #179 ## Verification - `uv run --frozen pytest tests`: 1464 passed. The 3 errors in `tests/hermes/test_hermes_gateway.py` also occur on main. - ruff, ty, and lefthook pre-commit passed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: furedea <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
1 task done
furedea
added a commit
that referenced
this pull request
Nov 12, 2026
agent-config 0.1.2(`3b3d9c5`)を取り込みます.#74 のモデル判定まわりの残りがすべて入ります. | 取り込む変更(furedea/agent-config) | 中身 | | --- | --- | | #172 | 「ルールの見本のフォルダ」の判定を 1 か所にまとめる | | #173 | jev-lint の子プロセスに `GIT_LITERAL_PATHSPECS=1` を渡す(#159) | | #174 | 時間に頼らないタイムアウトのテスト(#171) | | #175,#178 | Go と Rust のルールの穴と,境目の見本(#164) | | #180 | 読み取り専用の GraphQL の問い合わせのあとに `jq` を付けてよくする | | #177 | Stop のテストの行を,ランナーごとに 1 つの件数にまとめる(Rust は `312 passed` のように合計する) | - [x] `darwin-rebuild switch` で反映済み ほかのセッションが main の古い `flake.lock` で反映すると,これらが取り消されます.早めにマージします. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: furedea <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Replaying the 151 Bash commands run after #175 gave 58 non-allow verdicts. 56 of them were prompts for local commands that used a shell variable or a form the precise allowlist did not list. This PR keeps prompts for effects the sandbox cannot undo.
gh,curl, andwget, listed per rule underprograms. Every other command passes unless a forbidden rule or the dangerous-Git guard denies it. This coversgit commit -S,git -C $W add,sed -i '',cat > $D/pr.md, and unlisted subcommands of approved tools.gh pr view $Nandgh api repos/o/$r/... --jq(reads) pass.gh api $E --method DELETEasks.worktree remove), or the repository an implicit push reads its branch from.git -C $W push origin topic,git -C $R worktree add ... $W, andgit commit -m "$MSG"pass.[is no longer a glob, so[ -d "$W" ]is not a run-time program.${c:0:7}parse. A substitution inside${x:-$(rm -rf y)}is still denied.ln -smoves to allow.git stash dropandgit stash clearstay ask, because recovering a dropped stash needs dangling-commit archaeology. The plan had listed them as recoverable; that was wrong.Closes #177
Verification
uv run --frozen pytest tests: 1459 passed. The 3 errors intests/hermes/test_hermes_gateway.pyalso occur on main.$P -c ...);${(@f)...};git worktree remove $R-$w;curlto a remote host.--no-verify, andgit add -A.🤖 Generated with Claude Code