Repository navigation
Enforce the sandbox network cap - #888
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
SaladDay
force-pushed
the
enforce-the-sandbox-network-cap
branch
from
October 27, 2026 17:52
5f83eb9 to
f48a48f
Compare
Add the deployment network cap (public, exact private domains), the Provider NetworkSupport declaration and the Egress that Core sends at Create and Resume. microsandbox and E2B enforce it in their adapters; the node installer no longer writes network rules.
This was referenced Oct 27, 2026
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.
What changes
NetworkSupport{Restrict, PrivateDomains}inDeploymentPolicy;Egress{Public, PrivateDomains, Endpoints}inBootstrapandResumeRequest. Docs EN and zh.network{public, domains}: default{true, []}; exact host names only, at most 100, stored lowercase, deduplicated and sorted. The format rule is authored once in Go (sandbox/network.go) and projected to the node installer (node_spec.py) anddeployment-contract.tsby the contract generator. Validation against the Provider declaration returnsinvalid_sandbox_configurationwithparamnetwork.publicornetwork.domains. Migration 000010 adds the default to stored specifications./core/v1/sandbox/deploymentacceptnetwork; every view returnsspecification.network. Omitted on POST is the default; omitted on PUT keeps the stored cap (not on first setup).Egressat Create and Resume (execution/network_egress.go):{Public, PrivateDomains: cap.domains, Endpoints: [model provider host, loopback skipped]}. MCP hosts are not added; MCP follows the policy. Thedisabled/restrictedrejection is unchanged.deploy/node/host_microsandbox.pyno longer resolves Core or writes rules.Restrictonly. Public givesdeny_outfor loopback, private and link-local ranges; not Public givesdeny_out: [0.0.0.0/0]plusallow_out: [Core host, Endpoints]. The documented SDK semantic is thatallow_outwins overdeny_out; I did not probe a real account.NetworkSupport).Verification
go build ./... && go vet ./...inservices/core;go testfor sandbox, api, deployment, execution, persistence, cmd and the integration suite (local PostgreSQL); helper moduleGOWORK=off go vetand the rule tests (the other helper tests need the SDK FFI bundle that this checkout lacks).deploy/nodeunit tests,tools/e2b-providerprovider tests.pnpmtypecheck foragents-clientandapps/web, vitest for both.make openapiregenerated.Deviations and limits
Domains, wildcard suffixes, Docker, microsandbox sources.Need help on this PR? Tag
@codesmith-botwith what you need.