Repository navigation
Enforce the microsandbox network cap on the fork runtime - #901
Merged
Merged
Conversation
Create and restore both turn off strict hostname enforcement and DNS rebind protection, so the private pre-resolution and the restore address pins go. The cap accepts *.example.com for subdomains, enforced as a suffix allow behind an apex deny.
State the plain-text limit once (sandbox-deployment), note why an Endpoint at a suffix apex skips the apex deny, and test that the Web accepts *.suffix.
…node Restore accepts only rules and defaults, so create sets the strict and rebind options itself. With rebind protection off, a guest-chosen resolver could bind a cap name to any private address: deny DNS to every server but the host, and the rest of the host (its loopback).
The fork release oac-v0.7.11-2 adds a subdomain destination that never matches the apex, through SNI, the DNS cache binding and DNS queries, and publishes the runtime archive next to the FFI. The adapter maps each cap *.apex entry to it, so the apex deny and the plain-text limit go.
*.com would allow every .com name on any address it resolves to; the cap now requires at least two labels after *., as wildcard certificates do. The helper no longer reports unresolved names, so its stderr parsing keeps only unsupported endpoints. The distribution build reads the fork tag from the provider build script.
This comment has been minimized.
This comment has been minimized.
*.example.com is now a valid cap entry; *.com is the invalid one.
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
microsandbox now enforces the network cap without interims, on create and resume alike:
*.example.com: covers the subdomains ofexample.comat any depth, neverexample.comitself and never a whole top-level domain (*.comis rejected). The adapter maps each entry to the fork runtime's subdomain-only destination, so the apex stays refused through TLS SNI, the DNS-answer binding and DNS queries. Restricted Session domains stay exact.oac-v0.7.11-2: the Go SDK (go.mod replace), its FFI and the runtime archive (msbbuilt by the fork, the officiallibkrunfwof v0.7.11) come from one tag,FORK_TAGinscripts/build-microsandbox-provider.py, each pinned by checksum.Verification
make check-microsandbox-provider;go testforinternal/sandbox,internal/sandbox/providers,internal/sandbox/microsandbox/...,internal/execution;go vet ./...;deploy/nodeunit tests; script tests; WebNetworkSettings.test.tsx;specification-contractcheck;websitetranslations tests 1 and 2 (3 needs vitepress, not installed here).c04e6256…, runtime archive9ca514e5…; the archive'slibkrunfw.so.5.6.1is byte-identical to the official v0.7.11 file (3854efcd…).msb), microsandbox node, real Sessions (codex, MiniMax-M2.7):git cloneOK; other private, loopback and metadata addresses refusedrestricted[example.com]disabled*.example.com,*.<intranet domain>www.example.comto example.com's address refused untilwww.example.comitself is resolved;www.example.com200; example.org refused; GitLab through the intranet wildcard API 200, clone OK*.com(review fix, Core swapped to the PR head)invalid_sandbox_configuration, paramnetwork.domainsNode: 25 creates 1.2–1.4 s, 32 suspends 2.9–5.1 s, 9 resumes 0.9–4.6 s, no warnings or errors. Core log: no 5xx, no ERROR, no credential strings.
Need help on this PR? Tag
@codesmith-botwith what you need.