-
Notifications
You must be signed in to change notification settings - Fork 8.4k
sandboxes: clarify outbound protocol support #25819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,10 +11,10 @@ security posture. | |
|
|
||
| ## Network defaults | ||
|
|
||
| All outbound HTTP and HTTPS traffic is blocked unless an explicit rule allows | ||
| it (deny-by-default). All non-HTTP protocols (raw TCP, UDP including DNS, and | ||
| ICMP) are blocked at the network layer. Traffic to private IP ranges, loopback | ||
| addresses, and link-local addresses is also blocked. | ||
| All outbound TCP traffic, including HTTP, HTTPS, and SSH, is blocked unless an | ||
| explicit rule allows the destination. Direct external UDP and ICMP traffic is | ||
| blocked at the network layer. DNS queries use the sandbox's internal resolver, | ||
| which enforces network policy. | ||
|
|
||
| Run `sbx policy ls` to see the active network rules for your installation. | ||
| Rules can be customized per machine with the `sbx policy` CLI, or managed | ||
|
|
@@ -71,10 +71,8 @@ policy configuration: | |
| - Host filesystem access outside explicitly mounted workspaces and the shared | ||
| skills store | ||
| - Host Docker daemon | ||
| - Host network and localhost | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [MEDIUM] "Host network and localhost" removed from unconditional block list without replacement The old bullet list included "Host network and localhost" as an explicit, policy-unconfigurable block — meaning agents could not reach the host machine's own network stack or loopback interface. The new text removes this bullet entirely. The remaining bullet "Direct network communication between sandboxes" addresses sandbox-to-sandbox communication, not sandbox-to-host access. Since sandboxes run as VMs, this is a meaningful security boundary. If host network and localhost access is still blocked, consider restoring the bullet or incorporating this guarantee into the introductory paragraph.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did not restore this as an unconditional block because current Sandboxes code provides a policy-controlled host route:
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for the clarification — that makes sense. The distinction between direct host network access (unconditionally blocked) and policy-controlled proxy access to localhost (configurable) is an important architectural detail. The current text correctly states the sandbox doesn't share or directly access the host network, while the policy system can authorize specific localhost connections through the proxy layer. This is actually more accurate than an unconditional block bullet would have been, since it reflects the real security boundary: no direct network stack sharing, but controlled proxy paths are possible when policy permits. |
||
| - Direct network communication between sandboxes | ||
| - Raw TCP, UDP, and ICMP connections | ||
|
dvdksn marked this conversation as resolved.
|
||
| - Traffic to private IP ranges and link-local addresses | ||
| - Direct external UDP and ICMP connections | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [MEDIUM] Removal of private IP/loopback/link-local blocking from security defaults The old text explicitly stated these were blocked for all sandboxes:
The new text replaces these with "Direct external UDP and ICMP connections." The word "external" is ambiguous — readers would reasonably interpret it as not covering loopback ( Consider adding a sentence such as: "Private IP ranges, loopback, and link-local addresses are also blocked and cannot be reached from inside the sandbox."
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for flagging the removed wording. I did not restore it because it is not an unconditional sandbox guarantee: network policy supports CIDR resources, and the Sandboxes policy tests explicitly permit an IP literal such as
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're absolutely right, and thank you for the clarification. I misunderstood the interaction between CIDR allow rules and these address ranges. The old text made an unconditional claim ("blocked for all sandboxes") that doesn't hold when policy explicitly permits a CIDR range covering private IPs, loopback, or link-local addresses. Your decision to remove that stale guarantee rather than restore it was correct — the new text is more accurate. I appreciate you aligning the other security pages as well. Apologies for the noise on this one. |
||
|
|
||
| Outbound HTTP/HTTPS to domains not in the allow list is also blocked by | ||
| default, but you can add allow rules with `sbx policy allow`. | ||
| Outbound TCP to destinations not in the allow list is also blocked by default, | ||
| but you can add allow rules with `sbx policy allow`. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[HIGH] Private IP and link-local address blocking omitted from new network defaults
The old text explicitly stated that "Traffic to private IP ranges, loopback addresses, and link-local addresses is also blocked." The new paragraph drops this guarantee entirely — neither the introductory paragraph nor the bullet list below it mentions this restriction. A reader of the updated documentation cannot determine whether these addresses are still blocked, which is a meaningful gap in security documentation. If these restrictions still apply, consider adding a sentence such as: "Traffic to private IP ranges, loopback addresses, and link-local addresses is also blocked at the network layer."
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This restriction does not still apply unconditionally. The current policy engine can authorize private IP literals through CIDR allow rules; see
dialIsAllowed-CIDR-allow-permits-IP-literal-with-no-domain-ruleinsandboxd/pkg/proxy/policy_engine_test.go. Commit 7352567 updates the remaining security overview text to describe the actual policy-controlled TCP boundary.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the clarification — I see now that this was a false positive. The policy engine's support for CIDR allow rules means private IP literals can be authorized, so the old unconditional block no longer applies. I misread the change as an omission when it actually reflects the more flexible, policy-controlled approach described in commit 7352567.
The updated text correctly describes the current TCP boundary without overstating restrictions that no longer hold.