-
Notifications
You must be signed in to change notification settings - Fork 30.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
6 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e7b3397
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure this concept of 'isTrusted' really solves the problem; it just moves the accountability off of the product and into the hands of the user - who frankly has no idea about whether or not a trusted or untrusted workspace can or would be impacted by this sort of vulnerability? Wouldn't be it better to somehow track the usage of VSC by the user and prompt them over a period ('nagging') and educating them into understanding the risks behind 'trusting' a workspace? I'm just saying, it's a single click of a button and you've just undone all of these workarounds.
e7b3397
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s worse than that: such education is impossible to begin with.
According to the VS Code documentation, the purpose of restricted mode is to prevent code execution. But it should be obvious that viewing information about dependencies doesn’t execute any code, so there is no reason to disable this feature in restricted mode. You can’t educate users about something that doesn’t even make sense to the people who should understand it the most.
Of course, the real problem is that VS Code is messing about with command lines and incomprehensible regular expressions instead of using a proper API. Since VS Code and npm are under common ownership (both owned by Microsoft), surely they can sort this out?