Skip to content

[WRONG BRANCH] fix(claude): stop asserting IS_SANDBOX for root launches (preserve Claude root guard) - #350

Draft
luvs01 wants to merge 1 commit into
mainfrom
codex/propose-fix-for-root-guard-bypass-vulnerability
Draft

[WRONG BRANCH] fix(claude): stop asserting IS_SANDBOX for root launches (preserve Claude root guard)#350
luvs01 wants to merge 1 commit into
mainfrom
codex/propose-fix-for-root-guard-bypass-vulnerability

Conversation

@luvs01

@luvs01 luvs01 commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Remove an unsafe behavior that injected IS_SANDBOX=1 when launched as root with --dangerously-skip-permissions, which asserted a sandbox the process did not create and could bypass Claude Code's root guard.

Description

  • Stop setting IS_SANDBOX=1 from OpenCodex: removed the allowRootSkipPermissions test seam and the environment default that forced IS_SANDBOX into the spawned Claude process.
  • Removed the UID/flag bypass helpers and the code path that logged a bypass notice, so argument forwarding remains unchanged but OpenCodex no longer manufactures a sandbox assertion.
  • Updated unit tests to replace bypass-oriented cases with regression checks that OpenCodex does not assert a sandbox and that explicit user IS_SANDBOX values are preserved.
  • Files changed: src/cli/claude.ts and tests/claude-cli.test.ts (small focused change preserving other behavior).

Testing

  • Ran the focused Claude tests with the repository Bun binary: node_modules/bun/bin/bun.exe test tests/claude-cli.test.ts and observed all Claude-focused tests pass (22 passing).
  • Ran bun x tsc --noEmit (typecheck) and bun scripts/privacy-scan.ts (privacy scan) and both succeeded.
  • Ran repository-wide bun run test which exercised unrelated suites and reported existing, unrelated failures/timeouts; the change is scoped and the focused Claude tests and static checks passed.

Codex Task

@github-actions

Copy link
Copy Markdown

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Aug 28, 2026
@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown

⏳ DRAFT

  • wrong target branch (main); retarget to dev.

What to do

  • Retarget this PR to dev — all contributions go to dev.

Its title has been prefixed with [WRONG BRANCH].
This pull request was already a draft. Its draft status will be preserved after every issue above is resolved.

@github-actions github-actions Bot changed the title fix(claude): stop asserting IS_SANDBOX for root launches (preserve Claude root guard) [WRONG BRANCH] fix(claude): stop asserting IS_SANDBOX for root launches (preserve Claude root guard) Aug 28, 2026
@github-actions
github-actions Bot marked this pull request as draft August 28, 2026 02:39
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aardvark bug Something isn't working codex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant