feat: add public HTTPS sandbox egress mode#115
Open
D01414531 wants to merge 1 commit into
Open
Conversation
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.
Description
Adds an opt-in
SANDBOX_EGRESS_MODE=public_httpsmode for sandbox network egress. The default remainsallowlist, preserving the existing package-registry allowlist behavior.In
public_httpsmode, the inline CONNECT proxy permits arbitrary public HTTPS hostnames on port 443 while keeping the existing private/link-local/internal IP protections and iptables enforcement in place. This supports agent workflows that need to retrieve data from public APIs without allowing sandbox processes to bypass the proxy with direct sockets.Fixes # (no existing issue)
Type of change
How Has This Been Tested?
pytest tests/unit/test_egress_proxy.py -qpytest tests/unit/ -qpytest tests/integration/ -qblack src/ tests/unit/test_egress_proxy.py --checkmypy src/bandit -r src/ -s B104,B108 --severity-level highAdditional manual validation on a self-hosted deployment:
SANDBOX_EGRESS_MODE=public_httpsallowed sandboxed code to fetchhttps://api.github.com/rate_limit.403 Forbiddenfor a private RFC1918 target (https://10.0.0.2/), confirming private target blocking still applies.Checklist: