Earlier quoted context omitted.
Until this post it wasn't clear to me that just opening and trusting a directory can cause code to be run without taking any other explicit actions that seem like they might involve running code, like running tests. My bad, but still!
The message displayed when asking if you want to trust the directory is pretty clear about it. https://code.visualstudio.com/docs/editing/workspaces/worksp...
Threat actors expand abuse of Microsoft Visual Studio Code
151–160 of 306 posts
Re: Threat actors expand abuse of Microsoft Visual Studio Code
#152In VS Code settings search for "tasks" you will find "Task: Allow Automatic Tasks"...turn it off. Anything else that should be locked down?
Re: Threat actors expand abuse of Microsoft Visual Studio Code
#153Re: Threat actors expand abuse of Microsoft Visual Studio Code
#154Not a VSCode user, so a genuine question: what are practical use-cases in which you want VSCode to automatically execute a task only by opening a folder? Is it only for convenience so it already `npm i` or `npm start` without you having to do anything, or are there any other legitimate purposes beyond that?
Re: Threat actors expand abuse of Microsoft Visual Studio Code
#155Earlier quoted context omitted.
https://code.visualstudio.com/docs/editing/workspaces/worksp... It is very clear, the first sentence it that it may automatically execute code.
>Code provides features that may automatically execute files... What features? What files? "may"? So will it actually happen or is it just "well it possibly could"? I've used it to open folders that I personally made and which don't have any tasks or files that get automatically executed, and yet the message pops up anyway. It's like having an antivirus program that unconditionally flags every file as "this file may…
(They could, with some breaking changes, maybe try to enforce a permissions system for the matrix of addons and folders, where it would ask for permission when an addon does actually try to run something, but this would result in a lot of permission requests for most repos)
Re: Threat actors expand abuse of Microsoft Visual Studio Code
#156Earlier quoted context omitted.
The message displayed when asking if you want to trust the directory is pretty clear about it. https://code.visualstudio.com/docs/editing/workspaces/worksp...
The message, at least for me, does not convey that merely opening may lead to code execution.
Re: Threat actors expand abuse of Microsoft Visual Studio Code
#157Earlier quoted context omitted.
What is the stated reasoning for arbitrary code execution as a feature? Seems pretty mad to me.
Programming projects frequently feature scripts for building and packaging said projects, those have to be run somehow. Bundling running those into the editor seems like the mad part to me, but I've missed the whole VSCode train so probably something I'm missing.
Re: Threat actors expand abuse of Microsoft Visual Studio Code
#158Earlier quoted context omitted.
What is the stated reasoning for arbitrary code execution as a feature? Seems pretty mad to me.
Makefiles etc. Many types of projects use arbitrary setup and build commands or can load arbitrary plugins, and unlike VS which imposes its own project format, VSC tries to be compatible with everything that people already use. Git hooks are another one.
Re: Threat actors expand abuse of Microsoft Visual Studio Code
#159Earlier quoted context omitted.
Until this post it wasn't clear to me that just opening and trusting a directory can cause code to be run without taking any other explicit actions that seem like they might involve running code, like running tests. My bad, but still!
What is the stated reasoning for arbitrary code execution as a feature? Seems pretty mad to me.
(I think some people are fixating on the specific feature that's mentioned in the article. The reason this pop-up exists is that there are many ways that this code execution could happen. Disabling this one feature doesn't make it safe, and this feature if not present, could still be achieved by abusing other capabilities that exist in the vs code ecosystem)
Re: Threat actors expand abuse of Microsoft Visual Studio Code
#160Earlier quoted context omitted.
Programming projects frequently feature scripts for building and packaging said projects, those have to be run somehow. Bundling running those into the editor seems like the mad part to me, but I've missed the whole VSCode train so probably something I'm missing.
The grand parent is talking about code execution can happen by just opening the directory, you’re imagining like I did (and the grandparent) that you have to run or execute something in VSC to get that to happen and I’m asking about what features could possibly require this to happen. Obviously running tests or a make file everyone understands clearly you’re executing other people’s code.