Repository navigation
Enforce disabled and restricted Environment networks - #890
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Executes the official Environment
networkfield for hosted Sessions, within the deployment cap.disabled: the sandbox reaches only Core and the Session's model provider for its whole life, packages and setup included. No Core check on packages or setup.restricted: exact host names only. A domain equal to a cap domain goes toEgress.PrivateDomains; otherwise, when the cap allows the public internet, to the newEgress.Domains(public addresses only); otherwise Session creation fails withsandbox_network_outside_capandparamset to thatallowed_domainsentry. The same check runs again when an allocation derives its Egress.disabledandrestrictedon a hosted Environment need the current Provider'sNetworkSupport.Restrict(sandbox_network_unsupported);self_hostedkeeps accepting onlyenabled. The blanket rejection is gone.Domainsget domain allow rules afterdeny private, so only public answers pass. E2B:allow_outalso listsDomains(not Public denies everything else).allowed_domainsentries are rejected, unspecified officially), Harness capabilities row, Sandbox Provider protocol.Existing validation already rejects wildcards, a leading dot, and
disabledwithallowed_domains, and accepts upper case.Not verified live: E2B
allow_outwith a public domain on a real sandbox (the SDK documents hostnames; the Core host already uses one).Need help on this PR? Tag
@codesmith-botwith what you need.