fix(guardrails): isolated-session remedy, crash fail-open, strict option parse (0.29.10) - #3251
Conversation
…ion parse (0.29.10) Name scratch_roots and session --settings ahead of the global switch. Keep fail-open on crash with a visible notice. Accept only exact true/false for block_hook_bypass_enabled. Closes #3130 Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
|
Claude finished @kyle-sexton's task in 4m 21s —— View job Security review —
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bfe03ae4ae
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Last security-reviewed head: |
…medies Remove BLOCK_HOOK_BYPASS_TEST_CRASH from the shipped hook. Exercise the fail-open path via a hook copy. Put isolated-session operator levers on stderr — systemMessage is an exit-0 field and is discarded on exit 2. Closes #3130 Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
|
Claude finished @cursor[bot]'s task in 3m 2s —— View job Code review —
|
|
Claude has reviewed this PR 1 time. The lane skips further automatic reviews after 5; deleting this comment resets the count. |
Closes #3130
Summary
block-hook-bypassdocumented a dead end for isolated sessions (shell write blocked, Write/Edit refused) and failed open on its own crash with no signal. Option values other than exacttruesilently disabled the guard.Fix
The block message names
block_hook_bypass_scratch_rootsand session-scoped--settingsahead of the user-global switch. The operator-only sentence moves tosystemMessage. Crash posture stays fail-open (hottest-path availability) and now emits a dual-channel "guard did not run" notice.block_hook_bypass_enabledaccepts only exacttrue/false(unset → true); any other value keeps the guard on and says so. README records the 60shooks.jsontimeout fail-open and MCP-provided write tools as residuals. Fleet-wide sibling hooks and the PowerShell lane are out of scope.Verification
plugins/guardrails/hooks/block-hook-bypass.test.sh— PASS=564 FAIL=0 (isolated-session remedy, typo enable stays on, crash fail-open notice)scripts/check-changelog-parity.sh --check-bump origin/main— passRelated
Refs #912, #3128