question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

General Discussion on Workspace Trust Feature

See original GitHub issue

Trusted Workspace

The trusted workspaces concept is intended to centralize and unify a security conscious decision required by a variety of VS Code features. The easiest existing example to understand of this decision is with the ESLint extension. The ESLint extension will try to use the eslint module in the current folder that is opened in VS Code and execute code from it. Since you may have checked out a random repository from the web, this could be dangerous if the repository contains a corrupt eslint module. Notice that ESLint is not trying to be malicious, but rather, the repository/corrupt module is taking advantage of this automatic code execution.

With Trusted Workspaces, the user will be able to declare whether or not they trust the folder that is opened in VS Code before these features are executed.

Current Subscribers

Extensions

Extensions should use this guide to participate in workspace trust.

Tasks

Tasks will not execute in an untrusted workspace.

Status Bar Indication

A trusted state is indicated with a small green icon. An untrusted state is indicated with the icon and text. image image

Management

The following json editor is a stand-in for a more feature-rich editor. We intend to replace this soon. image

Try it out

Enable the setting

Add "security.workspace.trust.enabled": true to your settings.json.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:26
  • Comments:32 (12 by maintainers)

github_iconTop GitHub Comments

6reactions
bjorn3commented, Mar 22, 2021

I think extensions having to opt-out of working in non-trusted workspaces is the wrong approach. It will do nothing for unmaintained extensions and extensions for which the author did not know about the trusted workspaces concept. This will likely give the user a false sense of security. Instead I think extensions should opt-in to working in non-trusted workspaces. While this will require more effort on the end of extension authors, which admittedly may make this impractical, it should drastically reduce the amount of extensions working in non-trusted workspaces that should only be exposed to trusted workspaces.

5reactions
anomaly256commented, Jun 15, 2021

A specially crafted project causing malicious code to execute when being opened inside an editor.

@kesu1, add this to your Settings:

"security.workspace.trust.enabled": false,

Can there be an option to just not ‘trust’ any workspace as a default, or maybe the pop up dialog can have a ‘don’t trust, stop asking me, and continue’ option and stop prompting me each time I open a new subdir in a given workspace? It’s quite annoying the way it’s working at the moment. I’ve been prompted multiple times on this 1 project workspace today already… perhaps this is unintended behaviour?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio Code Workspace Trust security
The Workspace Trust feature lets you decide whether code in your project folder can be executed by VS Code and extensions without your...
Read more >
Cloud Storage & Infrastructure Security - Google Workspace
Learn how Google Workspace focuses on your business's cloud storage security in order to keep your network infrastructure & data encryption secure.
Read more >
General Discussion - VMware Technology Network VMTN
Welcome to the Horizon Workspace Community! Thank you for your particpation. We invite you to add any general discussion here.
Read more >
How to Configure Default Device Access Behavior of ...
Note: When setting Client Selective Trust on a Windows 7 Machine launching applications using Google Chrome via NetScaler Gateway Site, the application will ......
Read more >
View my privacy options in the Microsoft Office Trust Center
When changing privacy settings, you should make selections that will help set the level of Office privacy you want. The selections can include...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found