Skip to content

fix(review-only): enforce Claude sandbox boundary hook#42

Open
deadczarvc wants to merge 1 commit intosendbird:mainfrom
deadczarvc:codex/review-only-boundary-hook
Open

fix(review-only): enforce Claude sandbox boundary hook#42
deadczarvc wants to merge 1 commit intosendbird:mainfrom
deadczarvc:codex/review-only-boundary-hook

Conversation

@deadczarvc
Copy link
Copy Markdown

Summary

  • Add a scoped review-only-boundary-hook.mjs PreToolUse guard to read-only sandbox settings.
  • Fail closed on write-class tools and mutating shell commands when OS sandboxing is unavailable.
  • Cover hook wiring plus the patcher read-only matrix: --dry-run, --status, --verify allowed; apply/plain/path-spoof blocked.

Verification

  • node --check scripts/lib/claude-cli.mjs
  • node --check hooks/review-only-boundary-hook.mjs
  • node --check tests/review-only-boundary-hook.test.mjs
  • node --test tests/review-only-boundary-hook.test.mjs
  • node --test tests/sandbox-modes.test.mjs
  • npm run test:cross-platform
  • npm run check:version-sync && npm run check:changelog
  • npm ci
  • npm run lint
  • npm run typecheck

Note

Full npm test was attempted on Windows and did not pass because of existing Windows-specific failures outside this patch scope: fake claude fixture lookup in hook tests, /bin/bash wrapper path handling, and /proc process identity assumptions.

Co-Authored-By: LLM+TUI-IDE-based agent Codex Gopota
Directive: code produced under human supervisory control signal (ТСАУ). DM @dead_imperator · lawrenncecharlotte@gmail.com

Add a scoped PreToolUse guard to Claude Code read-only sandbox settings so review and adversarial-review runs fail closed on write tools and mutating shell commands even when OS sandboxing is unavailable.

Cover the hook wiring and the patcher read-only command matrix.

Signed-off-by: Mikhail Nemerov <34755036+deadczarvc@users.noreply.github.com>

Co-Authored-By: LLM+TUI-IDE-based agent Codex Gopota

Directive: code produced under human supervisory control signal (ТСАУ). DM @dead_imperator · lawrenncecharlotte@gmail.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant