Skip to content

Conversation

@nornagon-openai
Copy link
Collaborator

The sandboxing code has been getting a bit twisty. This is the first step of ??? to iron it out.

  1. move all seatbelt code to a mac-only module under mac/. Goal: don't compile any Seatbelt-related code for platforms that don't have Seatbelt. Likewise for Landlock.
  2. Remove codex_core::exec::SandboxType. This was just a bool with a different value for "true" on each platform. Now it's just a bool.

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ 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".

Comment on lines +1183 to +1186
let sandboxed = !matches!(
&effective_policy,
codex_core::protocol::SandboxPolicy::DangerFullAccess
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P0 Badge Respect platform sandbox availability

This new sandboxed flag ignores whether the current platform actually has a sandbox. In production we use get_platform_has_sandbox() (see core/src/safety.rs) to track e.g. the experimental Windows sandbox, and previously this code called get_platform_sandbox() to fall back to SandboxType::None when it was disabled. Now we always pass sandboxed = true for any policy that isn’t DangerFullAccess, so on Windows without the sandbox enabled we will still route through exec_windows_sandbox (see core/src/exec.rs around the new if sandboxed { return exec_windows_sandbox(...) }). That configuration is common, and those calls will start failing instead of running unsandboxed. Please gate this bool on get_platform_has_sandbox() the same way we did before.

Useful? React with 👍 / 👎.

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.

2 participants