fix: propagate sandbox proxy environment aliases#736
Open
ousamabenyounes wants to merge 1 commit into
Open
Conversation
Contributor
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.
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
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: