Repository navigation
Run the secret-path guard with /usr/bin/python3 - #924
Merged
seathatflowsinourveins merged 2 commits intoOct 9, 2026
Merged
seathatflowsinourveins merged 2 commits into
seathatflowsinourveins merged 2 commits into
Conversation
The template's guard command started the first python3 on PATH. When that python3 cannot run (an inactive mise shim, a removed toolchain), every guarded Bash call exited 1: clients without onFailure let it through and clients with it blocked every call. The command now execs /usr/bin/python3; the missing-script refusal still runs jq and exits 2. The new-WSL renderer admits that one absolute path as a practice-hook command word. Tests show it still refuses other interpreter paths, and run the rendered hook with only jq and a failing python3 on PATH. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
.claude/settings.json ran the repository's guard with the first python3 on PATH; with its onFailure "block", a python3 that cannot run would block every Bash call in the checkout. It now takes the template's form: /usr/bin/python3 for the guard, and a jq refusal with exit 2 when the script is missing. A test runs it behind a PATH holding only jq and a failing python3. Co-Authored-By: Claude Opus 5.5 <[email protected]>
seathatflowsinourveins
deleted the
claude/cc-native-practice-guard-python-pin-20261009
branch
October 9, 2026 08:57
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.
Scope
/usr/bin/python3instead of the firstpython3onPATH, so a broken or inactive interpreter shim can no longer make every guarded Bash call exit 1; the new-WSL renderer admits that one absolute path as a practice-hook command word, with tests that it still refuses every other interpreter path.22e3ef6ffd53b09f3cb335c46f7c696093521274(main after Secret-path guard hook refuses when its script is missing #920)lane:foundationadoption/templates/claude.settings.template.json(one command),.claude/settings.json(the project guard command, folded in at the command center's request),tools/adoption/new_wsl_client_config.py(BASE_COMMAND_WORDSand its comment),tests/test_install_claude_profile.py,tests/test_new_wsl_client_config.py,docs/decisions/2026-10-08-guard-hook-fails-closed.md(append-only addendum),manifests/evidence.json(re-registration).Successor to #920, scoped by the command center on 2026-10-09: the interpreter pin, the allowlist entry for that one path, the jq refusal and missing-script exit 2 kept, and a test with no mise shim on
PATH.SOTA sources
onFailure: "block"added in 2.1.295 (anthropics/claude-code@602df92bf481ed904533e95c09f740f40aab5aedCHANGELOG.md line 5: "a hook that can't start, times out, or exits with an unexpected code blocks the action instead of letting it through").halt_error(exit_code)(https://jqlang.org/manual/v1.7/), unchanged from Secret-path guard hook refuses when its script is missing #920.ast.parse(..., feature_version=...)(https://docs.python.org/3/library/ast.html#ast.parse), used to check the guard parses as 3.9 through 3.14.docs/decisions/2026-10-08-guard-hook-fails-closed.mdand the Claude Code native practice record of 2026-10-09 (Claude Code native practice, 2026-10: one evidenced default per role slot #923, slothooks).Evidence-class table
python3first onPATHmakes the guard return 1 for a credential-file read and forgit status; pinned, 2 and 0local_integrationPATH= a directory holding onlyjqand a failingpython3stubpython3onPATHlocal_integrationtest_rendered_hook_runs_the_system_interpreter_without_a_working_python3_on_path; fails when the template is unpinned/usr/bin/python3and refuses/usr/local/bin/python3,/usr/bin/python3.14,/usr/bin/python,/bin/python3,/tmp/python3,./python3,/usr/bin//python3,/usr/bin/../bin/python3,/usr/bin/envlocal_integrationtest_a_practice_hook_may_name_only_the_pinned_system_interpreter_by_absolute_path; fails when the allowlist entry is removed, and--checkon the shipped template then reports the guard.claude/settings.jsontakes the same form: a checkout without the script gives 2 and the refusal; the repository's guard gives 2 for a credential-file read and 0 forgit status, behind the same failing-python3PATHlocal_integrationtest_project_hook_runs_the_system_interpreter_and_refuses_a_missing_script; fails when the hook is unpinned and when its refusal is removedsource_reviewscripts/hooks/secret_path_guard.py:108-115;ast.parsewithfeature_version3.9 through 3.14, run by/usr/bin/python33.14.4; the suite ran under 3.13.16Local commands run
Decision record
docs/decisions/2026-10-08-guard-hook-fails-closed.md, new addendum "the guard runs the system interpreter": the measurement, the allowlist scope, the project hook and the limits. A host without/usr/bin/python3, or a missing script with nojqonPATH, exits 127, whichonFailure: "block"turns into a block from 2.1.295 (the floor raise is the currency lane's change). After this lands, the command center aligns the host's user settings to the rendered form; until then the host keeps its own pinned form.Host evidence
Not applicable: no file under
evidence/hosts/changes.Checklist
permissions: {}and grant each job only what it needs. (none changed)🤖 Generated with Claude Code