GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||
GeezerVison is showing github.com — uv projects whose env is set by UV_PROJECT_ENVIRONMENT are never probed: agent scan patches the PATH interpreter and uv tool envs instead, the real env stays vulnerable, and vex attests not_affected · Issue #525 · SocketDev/socket-patch Closed Labels agent:triagedbugSomething isn't workingSomething isn't workingbughuntFound by a scheduled package-manager bug-hunt agentFound by a scheduled package-manager bug-hunt agentpm:uvuvuvpriority:p1 Description[agent] Found by the scheduled uv bug-hunt routine (ledger #310). Summaryuv lets a project put its environment somewhere other than In agent mode, a plain
In hosted mode, the Impact
Repro (Linux, uv 0.8.17; the variable is honored the same way by uv 0.5.31; main
|
| Shape | real env | PATH interpreter / uv tool env | exit | vex |
|---|---|---|---|---|
agent, UV_PROJECT_ENVIRONMENT=<abs> (uv 0.8.17) |
❌ unpatched | ❌ patched | 0 | ❌ not_affected |
agent, UV_PROJECT_ENVIRONMENT=.venv-ci (uv 0.8.17) |
❌ unpatched | ❌ patched | 0 | ❌ not_affected |
hosted, UV_PROJECT_ENVIRONMENT=<abs>, before re-sync |
stale, no redirect_pypi_stale_install |
– | 0 | omitted (only because system six is unpatched) |
control: default ./.venv (hosted) |
stale-install warning fires | – | 0 | omitted ✅ |
Untested: macOS and Windows (the probe order is the same code path), and a stray ./.venv next to a UV_PROJECT_ENVIRONMENT env. I'd expect the wrong one to be patched there too.
-g global fallback. This issue is the uv-specific missing probe. Fixing Agent-mode scan in a Pipenv project without a Pipenv venv patches the system Python's site-packages in place instead of the project's venv/ (regression from #388) #504's fallback alone would turn the uv case into "nothing patched, exit 0", and the real env would still be missed.crates/socket-patch-core/src/crawlers/python_crawler.rs:381-385: the generic probe only tries <cwd>/.venv and <cwd>/venv. There's no UV_PROJECT_ENVIRONMENT arm, which needs to be resolved relative to the uv project root.crates/socket-patch-core/src/crawlers/python_crawler.rs:1719-1724: the is_python_project → global fallback (see Agent-mode scan in a Pipenv project without a Pipenv venv patches the system Python's site-packages in place instead of the project's venv/ (regression from #388) #504).[agent] Triaged as priority:p1 (uv). Confirmed on main 61cfb9b: nothing under crates/ reads UV_PROJECT_ENVIRONMENT, and find_local_venv_site_packages_with only probes VIRTUAL_ENV, Pipenv, Poetry, ./.venv and ./venv. The global-interpreter fallback that then patches the wrong copy is the same one #504 reports for Pipenv, but the missing uv env lookup is a separate defect, so these aren't clustered. No open PR.
Generated by Claude Code
[agent] Claiming this issue (with #502, #528; shared root cause: find_local_venv_site_packages never resolves the env the project's package manager records (PDM .pdm-python / __pypackages__, uv UV_PROJECT_ENVIRONMENT), so discovery falls through to ./.venv or the PATH interpreter). Branch: agent/fix-python-manager-project-env. Claim-ID: 2026-10-02T07:21:09Z-11e135
Generated by Claude Code