Skip to content

Promote Windows Sandbox#11341

Merged
iceweasel-oai merged 14 commits intomainfrom
dev/iceweasel/promote-sandbox-nux
Feb 11, 2026
Merged

Promote Windows Sandbox#11341
iceweasel-oai merged 14 commits intomainfrom
dev/iceweasel/promote-sandbox-nux

Conversation

@iceweasel-oai
Copy link
Collaborator

  1. Move Windows Sandbox NUX to right after trust directory screen
  2. Don't offer read-only as an option in Sandbox NUX. Elevated/Legacy/Quit
  3. Don't allow new untrusted directories. It's trust or quit
  4. move experimental sandbox features to [windows] sandbox="elevated|unelevatd"
  5. Copy tweaks = elevated -> default, non-elevated -> non-admin

@iceweasel-oai iceweasel-oai changed the title Dev/iceweasel/promote sandbox nux Promote Windows Sandbox Feb 10, 2026
@iceweasel-oai iceweasel-oai force-pushed the dev/iceweasel/promote-sandbox-nux branch from e1fd473 to ccdf8bc Compare February 10, 2026 20:19
Copy link
Collaborator

@dylan-hurd-oai dylan-hurd-oai left a comment

Choose a reason for hiding this comment

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

Some light things to discuss but nothing hugely blocking

apply_windows_sandbox_mode(
&mut features,
resolve_windows_sandbox_mode(cfg, config_profile),
);
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we really be potentially mutating the config every time we load it? I see the reasoning for resolving to a healthy config but curious if this is the right way to do so

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

gonna clean this up so we don't ever rely on the old features. This doesn't write the config to disk, but it's still a bit wonky


/// Begin the non-elevated Windows sandbox setup flow.
#[cfg_attr(not(target_os = "windows"), allow(dead_code))]
BeginWindowsSandboxLegacySetup {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We refer to this as non-admin in the product but Legacy in the code - should we standardize? wasn't obvious to me

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we should. I just wanna do it in a follow-up since Legacy probably appears in a bunch of places (including metrics tags, etc.)

},
SelectionItem {
name: stay_label,
name: "Use non-admin sandbox (higher risk if prompt injected)".to_string(),
Copy link
Collaborator

@dylan-hurd-oai dylan-hurd-oai Feb 10, 2026

Choose a reason for hiding this comment

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

Will we have already shown the user the warning in this case? Do we need the parentheses here? Also Use the

Copy link
Collaborator Author

@iceweasel-oai iceweasel-oai Feb 10, 2026

Choose a reason for hiding this comment

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

this is the first time they are seeing really anything about sandbox modes

lines.push(line![""]);
lines.push(line![
"Elevation failed. You can also use a non-elevated sandbox, which protects your files and prevents network access under most circumstances. However, it carries greater risk if prompt injected."
"You can still use Codex in a non-admin sandbox. It carries greater risk if prompt injected."
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why remove which protects your files and prevents network access under most circumstances. ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think we might want to bring that back. Will discuss

{
tracing::warn!(error = %err, "failed to run personality migration");
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: keep?

Copy link
Collaborator

@dylan-hurd-oai dylan-hurd-oai left a comment

Choose a reason for hiding this comment

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

One final comment about naming, LTGM after we fix CI!

let windows_sandbox_level = WindowsSandboxLevel::from_features(&features);
let windows_sandbox_level = match windows_sandbox_mode {
Some(WindowsSandboxModeToml::Elevated) => WindowsSandboxLevel::Elevated,
Some(WindowsSandboxModeToml::Unelevated) => WindowsSandboxLevel::RestrictedToken,
Copy link
Collaborator

Choose a reason for hiding this comment

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

WindowsSandboxModeToml and WindowsSandboxLevel feel mismatched - should we rename to WindowsSandboxLevelToml?

@iceweasel-oai iceweasel-oai merged commit 87279de into main Feb 11, 2026
32 checks passed
@iceweasel-oai iceweasel-oai deleted the dev/iceweasel/promote-sandbox-nux branch February 11, 2026 19:48
@github-actions github-actions bot locked and limited conversation to collaborators Feb 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants