From bdc37b769cc70240df6161dd5f27fc6d3cd3e1d7 Mon Sep 17 00:00:00 2001 From: Drew Newberry Date: Thu, 12 Mar 2026 23:32:09 -0700 Subject: [PATCH] fix(e2e): use correct python binary glob for community sandbox image The community base sandbox image installs Python via uv at /sandbox/.uv/python/**/python*, not /usr/bin/python*. Update policy binary globs in e2e tests and docs to match the actual resolved path. --- docs/tutorials/github-sandbox.md | 2 +- e2e/python/test_sandbox_policy.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/tutorials/github-sandbox.md b/docs/tutorials/github-sandbox.md index 1fcb653ba..348a25fd9 100644 --- a/docs/tutorials/github-sandbox.md +++ b/docs/tutorials/github-sandbox.md @@ -312,7 +312,7 @@ network_policies: - { path: /sandbox/.venv/bin/python } - { path: /sandbox/.venv/bin/python3 } - { path: /sandbox/.venv/bin/pip } - - { path: /usr/bin/python* } + - { path: "/sandbox/.uv/python/**/python*" } - { path: /usr/local/bin/uv } - { path: "/sandbox/.uv/python/**" } diff --git a/e2e/python/test_sandbox_policy.py b/e2e/python/test_sandbox_policy.py index 30d1bc5f9..7fbb76e5b 100644 --- a/e2e/python/test_sandbox_policy.py +++ b/e2e/python/test_sandbox_policy.py @@ -51,7 +51,9 @@ def _policy_for_python_proxy_tests() -> sandbox_pb2.SandboxPolicy: endpoints=[ sandbox_pb2.NetworkEndpoint(host="api.openai.com", port=443) ], - binaries=[sandbox_pb2.NetworkBinary(path="/usr/bin/python*")], + binaries=[ + sandbox_pb2.NetworkBinary(path="/sandbox/.uv/python/**/python*") + ], ) }, ) @@ -438,7 +440,9 @@ def test_l4_cross_policy_denied( endpoints=[ sandbox_pb2.NetworkEndpoint(host="api.anthropic.com", port=443), ], - binaries=[sandbox_pb2.NetworkBinary(path="/usr/bin/python*")], + binaries=[ + sandbox_pb2.NetworkBinary(path="/sandbox/.uv/python/**/python*") + ], ), "other": sandbox_pb2.NetworkPolicyRule( name="other",