feat(venv): add secure per-launch find-links support - #5387
Open
m199369309 wants to merge 2 commits into
Open
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
This was referenced Aug 19, 2026
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
virtual_env_find_linkslaunch parameter across REST, Supervisor, Worker, sync/async clients, and CLIuvXINFERENCE_VIRTUAL_ENV_FIND_LINKS_ALLOWED_ROOTS(default:${XINFERENCE_HOME}/wheels)Dependency
Depends on #5386 so direct FlashInfer post-install commands honor the same configured find-links sources as the main virtualenv installation.
This PR is intentionally stacked on #5386. The shared commit will disappear from this PR after #5386 is merged.
Security
Validation happens on each selected Worker because the Supervisor cannot safely validate Worker-local filesystems. Allowed roots must be controlled by administrators and must not be writable by untrusted users, since installing wheels executes package code.
Set
XINFERENCE_VIRTUAL_ENV_FIND_LINKS_ALLOWED_ROOTSto an empty value to disable request-level local paths.Tests
pytest -q xinference/core/tests/test_virtual_env_manager.py xinference/core/tests/test_worker.py xinference/core/tests/test_launch_strategy.py xinference/core/tests/test_model_replica_scale.py(163 passed)pre-commit run --files <modified files>--virtual-env-find-link