fix: propagate sandbox proxy environment aliases#736
Conversation
Greptile SummaryThis PR centralizes sandbox environment setup and expands propagated proxy settings. The main changes are:
Confidence Score: 4/5The sandbox environment path needs a small proxy-alias fix before merging.
strix/runtime/session_manager.py
|
| Filename | Overview |
|---|---|
| strix/runtime/session_manager.py | Centralizes sandbox environment construction and uses it when creating the sandbox manifest, but misses lowercase proxy aliases. |
| tests/test_session_entries.py | Adds direct assertions for the new environment helper and the expected proxy and CA bundle values. |
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
strix/runtime/session_manager.py:47-48
**Lowercase Proxy Aliases Missing**
When sandbox subprocesses rely on lowercase proxy variables, `ALL_PROXY` and `NO_PROXY` are ignored. A tool that only reads `no_proxy` can send `127.0.0.1` traffic through the Caido proxy at `127.0.0.1:48080`, so local CDP or service calls can loop through the proxy instead of staying local.
```suggestion
"ALL_PROXY": container_caido_url,
"all_proxy": container_caido_url,
"NO_PROXY": _NO_PROXY_VALUE,
"no_proxy": _NO_PROXY_VALUE,
```
Reviews (1): Last reviewed commit: "fix: propagate sandbox proxy environment..." | Re-trigger Greptile
ab6e6ba to
6e4e3f9
Compare
44e87ca to
daf39a2
Compare
Centralize sandbox subprocess environment setup and include lowercase all_proxy/no_proxy aliases alongside uppercase proxy aliases and CA bundle variables. RED->GREEN: tests/test_session_entries.py failed before build_sandbox_environment existed; now 5 passed. Full suite: 181 passed, 2 warnings.
f30e1d2 to
ffd1be0
Compare
|
Rebased this branch onto current Verification after rebase: The two full-suite failures are the existing |
Summary
Fix #430
Build the sandbox environment in one helper and propagate proxy settings through lowercase and uppercase aliases, including
all_proxyandno_proxy, plus the CA bundle variables used by common Python and TLS tooling.This keeps subprocesses spawned inside the sandbox on the same Caido proxy and trust configuration while preserving localhost bypass behavior for tools that only read lowercase proxy variables.
Test verification (RED -> GREEN)
RED with the production fix reverted while keeping the test:
GREEN with the fix applied:
Additional validation: