Replace inherited env vars with a minimal env dict (PATH, DATA_DIR, HOME only), omitting VIRTUAL_ENV and PYTHONPATH to prevent subprocess access to installed packages. Switch subprocess invocation to sys.executable so the correct interpreter is used with the restricted PATH. Add httpx to blocked_patterns and BLOCKED_MODULES. Add test_sandbox_cannot_import_httpx to test_security.py. |
||
|---|---|---|
| .. | ||
| api | ||
| auth | ||
| web | ||
| __init__.py | ||
| instance_config.py | ||
| main.py | ||