feat: explicit task-network-policy opt-out for subprocess - #2562
Draft
samsja wants to merge 1 commit into
Draft
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.
Add SubprocessConfig.ignore_task_network_policy, default false. Trusted host-process runs may explicitly ignore task-level network_allow/network_block requirements, including the borrowed-placement check. Default refusal remains unchanged; container image requirements and container runtime policies are unaffected. Document that this does not enforce network isolation.
Validation: Ruff passes; direct runtime-resolution checks confirm default rejection and explicit opt-in. Existing config/taskset tests ran: 16 passed and 4 failed because optional code_golf, deepwiki, glossary and compact packages are not installed. No dependencies or existing virtual environment changed.
Note
Add
ignore_task_network_policyopt-out toSubprocessConfigSubprocessConfig(defaultFalse) that lets subprocess runtimes ignore task-level network restrictions, since subprocesses cannot enforce framework-aware network policiesresolve_runtime_configto skip applying task network policy and suppress the unsupported-policy error when the flag is enabled; image requirements still cause rejection_check_borrowed_placementso borrowed subprocess runtimes with the flag are not rejected solely for task-level network restrictions, while base runtime restrictions still trigger validationignore_task_network_policy=Truewill run without those restrictions enforced, silently bypassing the requested policyMacroscope summarized 1140510.