Skip to content

Comments

Restrict host sandbox provider to desktop app only#274

Merged
Mng-dev-ai merged 1 commit intomainfrom
fix/restrict-host-provider-to-desktop
Feb 22, 2026
Merged

Restrict host sandbox provider to desktop app only#274
Mng-dev-ai merged 1 commit intomainfrom
fix/restrict-host-provider-to-desktop

Conversation

@Mng-dev-ai
Copy link
Owner

Summary

  • Hide the "Host (Local)" sandbox provider option in settings when running in the web browser (only show it in the Tauri desktop app via isTauri() check)
  • Add a backend guard in SandboxProviderFactory.create() that rejects host provider creation when DESKTOP_MODE is false, returning a clear error message

Test plan

  • Open the web app and verify the "Host (Local)" option is not visible in Settings > Sandbox Provider
  • Open the desktop (Tauri) app and verify the "Host (Local)" option is visible and selectable
  • Attempt to create a host sandbox via API without DESKTOP_MODE=true and confirm it returns a SandboxException

The host provider executes commands directly on the user's machine,
which is only appropriate in the desktop app context. Hide the option
in the web UI and guard the backend factory with a DESKTOP_MODE check.
@Mng-dev-ai Mng-dev-ai merged commit 034a8a5 into main Feb 22, 2026
2 of 4 checks passed
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