Repository navigation
🐛 fix(probe): extract zipapp script privately - #206
Merged
gaborbernat merged 2 commits intoNov 3, 2026
Merged
Conversation
Archive imports extracted the interrogation script into the shared temp root, which Python adds to the probe's module search path. Place the script in a private directory and remove that directory after the probe.
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.
Archive imports extracted the interpreter probe script directly into the shared temp directory. Python searches the script's directory first, so another local user could affect imports during an interpreter probe. The script now runs from a private directory. This addresses draft advisory ANT-2026-T96K7JXU.
Archive probe extraction
The old fallback created a script in the temp root when an archive supplied the package. The fallback now creates a private directory, writes the script there and removes the directory when interrogation ends. Filesystem imports continue to use the packaged script.
Behavior changes
For archive imports, the child interpreter sees a private script directory at the start of its module search path. The context manager removes the temporary directory and its script after the probe, including when the probe raises an error.
Reported by Antigravity: ANT-2026-T96K7JXU.