Repository navigation
🐛 fix(pep514): reject relative registry paths - #212
Merged
gaborbernat merged 2 commits intoNov 3, 2026
Merged
gaborbernat merged 2 commits into
gaborbernat merged 2 commits into
Conversation
PEP 514 requires a full executable path. A relative registry value lets interpreter discovery run a file from the caller's working directory.
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.
_resolve_exe()accepted a relative PEP 514 executable path if a matching file existed in the caller's working directory. Discovery could then run that file as the caller. The registry source now requires an absolute string before it checks or probes the executable. This addresses draft advisory ANT-2026-NWCJ24KD.Registry executable paths
PEP 514 requires
ExecutablePathto be the full path to the executable. The oldload_exe()only checked whether the raw registry value existed. The new validation checks the value's type and uses Windows absolute-path semantics for bothExecutablePathand theInstallPathfallback. It also skips non-string registry values instead of raising an uncaught type error.Behavior changes
Discovery accepts absolute drive and UNC paths. It skips relative, drive-relative, rooted-without-drive, and non-string values with a PEP 514 warning.
REG_EXPAND_SZvalues contain unexpanded environment references; discovery skips any such value that remains relative.Reported by Antigravity: ANT-2026-NWCJ24KD.