I just launched VS Code 1.57 and see this message: "Do you trust the authors of the files in this folder?"
Why am I seeing this message?
Should I trust the current workspace?
If you select Yes, I trust the authors , Visual Studio Code will trust the current workspace and enable all of the editor feature you are used to in it.
Command-line switch# You can disable Workspace Trust via the VS Code command line by passing --disable-workspace-trust .
To show this option you can press (Alt + 5) key, by opening the changes window you can see the detail of changes with change set ID, Change set Description, Author Name and Date of Changes.
Visual Studio Code 1.57 introduces the concept of trusted workspaces. Trusted workspaces try to make it clear that while simply browsing through code is safe, enabling all editor features in a folder/project that came from a malicious source could potentially put you in danger.
The prompt is shown when you open a new folder for the first time. Here Visual Studio Code is asking if it should be trusted or not:
If you select No, I don't trust the authors
, Visual Studio Code will open the workspace in 'restricted mode'. This is the default for all new workspaces. It lets you safely browse through code but disables some editor feature, including debugging, tasks, and many extensions. However, keep in mind that 'restricted mode' is all you need for many use cases.
If you select Yes, I trust the authors
, Visual Studio Code will trust the current workspace and enable all of the editor feature you are used to in it.
You can easily change your choice later on too.
Ultimately you will need to decide for yourself if you are comfortable trusting a workspace or not. Here are a few general guidelines:
Stick with restricted mode if:
You just need to quickly read some code.
You got the workspace from an unfamiliar/untrusted source (such as that random zip someone posted on a sketchy forum)
Consider trusting the workspace if:
You trust the source of the workspace and know how code ends up in your workspace
And you also need all the features of Visual Studio Code, such as debugging
Say you start in restricted mode, but later realize that you now need to use the debugger (and you are confident in where the contents of the workspace came from). To switch to trusted mode, you can:
Click on the restricted mode
entry in the status bar
Run the Workspaces: Manage Workspace Trust
command in the command palette
This will open a new editor that lets you manage trust of the current workspace:
Select Trust
to switch into a trusted workspace
Yes, but keep in mind that doing so comes with security tradeoffs. Here are a few options:
Using a single trusted folder to hold your projects
If you work with many projects that you trust and don't want to be prompted about trusting each one individually, you can consider trusting their parent folder.
Workspaces: Manage Workspace Trust
commandTrusted folders and workspaces
section and click Add Folder
Now any project you open under the parent folder will be trusted automatically.
Disabling the trusted workspaces entirely
If you really want to disable trusted workspaces entirely, you can use the Security › Workspace › Trust: Enabled
setting.
"security.workspace.trust.enabled": false
Windows10 / VScode 1.64.2:
1 Navigate to user settings by paste: %APPDATA%\Code\User
2 in the settings.json
add there:
"security.workspace.trust.startupPrompt": "never",
"security.workspace.trust.enabled": false,
"security.workspace.trust.banner": "never",
"security.workspace.trust.emptyWindow": false
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With