-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Support untrusted workspaces in VSCode #9224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
So, I think in order to implement this right (when you actually, for real, don't trust the workspace you're opening), we need to avoid invoking any part of the Rust toolchain, since everything can be overridden by the workspace to run arbitrary code. That means that there are quite a few places that need to be stubbed out (eg. we load target-specific One problem with doing this is that r-a becomes pretty much useless if we can't fetch the crate graph, so currently I don't really see the benefit of this over just keeping the whole extension disabled in an untrusted workspace (which I think is the default). You could use |
even there I think we call rustc —cfg by default. |
This sounds like it's possibly turning into a feature request for rustup to set a boundary under which all toolchain configs are ignored. Or perhaps to turn off the rust-toolchain file config entirely if requested. |
Filed rust-lang/rustup#2793 |
Additional info for this is here https://code.visualstudio.com/api/extension-guides/workspace-trust |
We could potentially disable proc macros if not given trust, for example.
See microsoft/vscode#120251 for API details.
(from https://twitter.com/ekuber/status/1403499878836322311)
The text was updated successfully, but these errors were encountered: