Repository navigation
🐛 fix(shims): validate version names - #205
Merged
gaborbernat merged 4 commits intoNov 3, 2026
Merged
Conversation
A version from a shared parent directory could escape the version manager root and cause discovery to probe another user's binary. Reject path-like version names before building the candidate path.
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.
Shim resolution joined a configured version to the version manager's installation directory without checking whether the version was a directory name. A value that contains a path could make interpreter discovery probe a binary outside that directory under the caller's account. Discovery now accepts one directory name per version. This addresses draft advisory ANT-2026-TKSZQ34K.
Shim version selection
python-discovery reads versions from the environment and version files when resolving pyenv, mise, and asdf shims. The old join accepted path syntax in those values. The resolver now skips names containing paths before building a candidate path.
Behavior changes
Discovery ignores version names containing a path separator or equal to
.or... Discovery tries later configured versions. If none resolves to a binary, the existing shim fallback still applies. Normal version directory names continue to resolve.Reported by Antigravity: ANT-2026-TKSZQ34K.