Skip to content

feat: make --no-sandbox configurable in BrowserConfig (#1701)#1875

Open
hafezparast wants to merge 1 commit intounclecode:developfrom
hafezparast:feat/maysam-configurable-sandbox-1701
Open

feat: make --no-sandbox configurable in BrowserConfig (#1701)#1875
hafezparast wants to merge 1 commit intounclecode:developfrom
hafezparast:feat/maysam-configurable-sandbox-1701

Conversation

@hafezparast
Copy link
Copy Markdown
Contributor

Summary

  • Adds no_sandbox param to BrowserConfig (default True — fully backward compatible)
  • When no_sandbox=False, the --no-sandbox Chromium flag is omitted, enabling browser sandbox protection
  • Fixes both ManagedBrowser.build_browser_flags() and BrowserManager._build_browser_args()

Closes discussion #1701

Usage

# Default — same as before (no sandbox)
config = BrowserConfig()

# Enterprise — enable sandbox protection
config = BrowserConfig(no_sandbox=False)

Test plan

  • Default BrowserConfig() still includes --no-sandbox (backward compat)
  • no_sandbox=False excludes --no-sandbox from both build_browser_flags and _build_browser_args
  • to_dict() / load() roundtrip preserves the value
  • clone() preserves and can override the value
  • Other params unaffected
  • Regression: tests/general/ — 48 passed, 5 skipped
  • Regression: tests/docker/test_pool_release.py — 10/10 passed

🤖 Generated with Claude Code

Add `no_sandbox` param (default True) to BrowserConfig so enterprise
deployments can enable Chromium's sandbox protection. Previously
--no-sandbox was always hardcoded in both ManagedBrowser.build_browser_flags()
and BrowserManager._build_browser_args().

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.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