Repository navigation
🐛 fix(probe): report paths in host file system encoding - #290
Merged
Merged
Conversation
The interrogation script runs in UTF-8 mode, but the host decodes the paths it gets back with its own file system encoding. Under a non-UTF-8 locale the same text named other bytes, so discovery could run a different file and return it as system_executable. The host now passes its file system encoding to the script, which re-encodes the reported paths into it. The cache entry records that encoding as well, so an entry written under one encoding is not read under another. Reported by oss-scanner as ANT-2026-794CGR4Y.
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.
Discovery starts each candidate interpreter in UTF-8 Mode and reads the file names it reports. Under an older non-UTF-8 locale such as ISO-8859-1, the calling tool decodes file names differently, so a path with accented letters could name another file. Discovery could then start a program another local user placed under the look-alike name and report it as the base Python. 🔒 Candidates now report names in the caller's encoding. This addresses draft advisory ANT-2026-794CGR4Y.
With a Python install in a folder whose name is stored as UTF-8, run under a Latin-1 locale:
Before:
After:
The calling tool passes its encoding to each candidate, and cached answers are stored per encoding, so an answer recorded under one locale is never reused under another.
UTF-8 locales, macOS and Windows see no difference. After upgrading, each interpreter is queried once more, because older cached answers no longer match.
Reported by oss-scanner: ANT-2026-794CGR4Y.