Skip to content

[680] fix(sandbox): respect user UseNetNS=false with MCP allowed hosts - #686

Closed
decko wants to merge 1 commit into
mainfrom
soda/680
Closed

[680] fix(sandbox): respect user UseNetNS=false with MCP allowed hosts#686
decko wants to merge 1 commit into
mainfrom
soda/680

Conversation

@decko

@decko decko commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • effectiveUseNetNS now respects configured=false — never silently overrides the user's opt-out of network namespace isolation
  • Previously, declaring allowed_hosts on all MCP servers would force netns on even when explicitly disabled, causing hard launch failures on systems without unprivileged user namespaces

Changes

  • Refactored sandbox helpers from config_build.go into run_helpers.go with improved documentation
  • 12 test cases for effectiveUseNetNS covering the bug fix (including the 2 cases that were previously wrong)
  • AllowedHosts on MCPServerConfig simplified to []string

Closes #680

Assisted-by: SODA

effectiveUseNetNS previously forced netns on when all MCP servers
declared AllowedHosts, even if the user set use_net_ns: false. This
caused hard launch failures on systems without unprivileged user
namespaces.

Now configured=false is always respected. AllowedHosts only preserves
netns when the user already opted in (configured=true).

Refactored sandbox helpers into run_helpers.go with comprehensive
tests (12 effectiveUseNetNS cases covering the bug fix).

Closes #680

Assisted-by: SODA
Assisted-by: Claude Opus 4.6
@decko decko added the ai-assisted PRs assisted by AI label Jul 21, 2026
@decko

decko commented Jul 21, 2026

Copy link
Copy Markdown
Owner Author

Superseded by PR #679 which includes this fix in commit f60f8f5.

@decko decko closed this Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted PRs assisted by AI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(sandbox): effectiveUseNetNS should not override user's UseNetNS=false

1 participant