Ask questionsTweak settings to prevent accidental execution of code from within a workspace
We want to prevent the chance of someone opening a fresh workspace on a repository to explore the code and then accidentally triggering the execution of code from within that repository. This is possible if you specify certain settings in a certain way, e.g.:
The expected solution to all of this is:
By requiring a user action to set the Python path to e.g. an virtual environment within the workspace it forces the user to choose to trust that interpreter. And by only running paths to tools as specified at the user level then it doesn't allow a repository to override that location.
Answer questions luabud
@kynan we already have an API that allows for extensions to retrieve the value of the selected environment, but we're making some final updates on it: https://github.com/microsoft/vscode-python/issues/12596