Highlights
Arbitrary Code Execution: 1 prior fix. Scrutinize any change in this area.
jedi/api/environment.py: most-fixed (1 issue). Treat as high-risk during review.
3 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns
The bug types that recur here, drawn from past fixes, not open vulnerabilities.
Arbitrary Code Execution: The automatic resolution and loading of compiled Python extension modules from local project directories can allow an untrusted repository to execute arbitrary code silently when imported by Jedi's engine. Ensuring safe defaults by disabling automatic loads of unverified builtins is essential.
Remote Code Execution: When scanning for virtual environments, executing the 'python' binary located inside a local virtual environment allows a malicious workspace to execute arbitrary code via a trojaned executable. Environment detection must enforce strict file-ownership checks (such as root ownership) before execution.
Code Execution: Evaluating dynamic statements inside sys.path modifications (like appends or inserts) using execution functions enables immediate code execution during static code analysis. Transitioning to pure static parsing prevents untrusted code execution.