Repository navigation
feat(python-worker): add sandboxed HTTP proxy transport - #5
Merged
Merged
Conversation
This was referenced Oct 30, 2026
On MSG_CTRUNC, macOS can keep the untruncated cmsg_len. receive_stream trusted it, adopted bytes past the written control buffer as OwnedFds and closed unrelated descriptors, aborting the macOS lib tests with an IO safety violation. Bound each SCM_RIGHTS header by msg_controllen, stop on malformed short headers, and add a platform-independent test.
sundy-li
marked this pull request as ready for review
October 31, 2026 02:00
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.
Summary
WorkerCommand::network_proxy. Keepallow_network = false; configuring direct networking together with a proxy fails rather than falling back to unrestricted networking. Existing default-deny and compatibility modes remain unchanged.NetworkProxy; native Internet socket creation remains denied by seccomp. Python adaptation supplies compatibility, not authorization. No public TCP proxy listener or worker-side DNS/network permission is needed.cargo test -p arrow-udf-python-worker(8 unit tests plus existing and new real-worker suites),cargo clippy -p arrow-udf-python-worker --all-targets -- -D warnings,cargo fmt --all --check, and diff checks. New coverage includes native/direct socket denial, missing-policy defaults, malformed/truncated/multiple/wrong-type descriptors, CLOEXEC, local HTTP, verified HTTPS, denied redirects/CONNECT, policy changes on an existing worker, concurrent requests and cancellation cleanup.ARROW_UDF_TEST_REQUESTS=1 cargo test -p arrow-udf-python-worker --test network_proxywith requests 2.32.5 installed in an isolated PYTHONPATH: HTTP, verified HTTPS, redirect denial and no direct fallback withtrust_env = false. Tests do not fetch from external destinations; optional client packages are installed separately. macOS/aarch64 builds and full-workspace tests were not run locally.AI assistance