Earlier quoted context omitted.
The indexer was probably clangd, not Code itself.
IME more likely cpptools (which comes with vscode) than clangd. Relevant: https://news.ycombinator.com/item?id=43788332
Threat actors expand abuse of Microsoft Visual Studio Code
231–240 of 306 posts
Re: Threat actors expand abuse of Microsoft Visual Studio Code
#232In VS Code settings search for "tasks" you will find "Task: Allow Automatic Tasks"...turn it off. Anything else that should be locked down?
1. Uninstall VSCode 2. Install Vim / Emacs / Sublime / Helix 3. ???? 4. Profit
I'm not sure about the other ones, but I know that helix supports language servers by default and it does not have a workspace trust system like vscode, so LSPs can automatically execute code when you enter a directory
https://github.com/helix-editor/helix/issues/9514#issuecomme...
So uninstalling VSCode would be a bit of a step back in that case
Re: Threat actors expand abuse of Microsoft Visual Studio Code
#233Earlier quoted context omitted.
Never liked Eclipse, but I’ve been forced to use VSCode over my preferred JetBrains IDEs because it is the only modern mainstream editor with a competent client-server mode. As in, actually rendering the UI locally while doing all the code indexing and intelligence on the server. Corporate world would much rather maintain disposable remote VMs than help you unfuck your laptop after whatever required security upgrade…
Have you tried Jetbrains Gateway? I’m curious whether it’s insufficient or just too recent, as I’ve eyed it a few times.
Re: Threat actors expand abuse of Microsoft Visual Studio Code
#234VS Code team member here :wave: As called out elsewhere, workspace trust is literally the protection here which is being circumvented. You're warned when you open a folder whether you trust the origin/authors with pretty strong wording. Sure you may find this annoying, but it's literally a security warning in a giant modal that forces you to chose. Even if automatic tasks were disabled by default, you'd still be vuln…
Re: Threat actors expand abuse of Microsoft Visual Studio Code
#235Earlier quoted context omitted.
I mean it's not in caps, but it's literally the first line in the dialog after the header: https://code.visualstudio.com/docs/editing/workspaces/worksp... I'm big on user first, if that dialog had sirens blaring, a gif and ten arrows pointing that "THIS MAY EXECUTE CODE" and people still didn't get the idea, I'd say it needs fixing. It can't be said that they didn't try or that they hid it though.
>"THIS MAY EXECUTE CODE" So at the end of the day its still unclear whether it executes code or not? Just say "this WILL execute code" and specify exactly which code it tries to execute by default.
Not "I will execute autorun.inf like an idiot."
And NO. I do not want my IDE to execute code when i open files for editing. I want it to execute code only as part of an explicit step that I initiate.
Re: Threat actors expand abuse of Microsoft Visual Studio Code
#236Re: Threat actors expand abuse of Microsoft Visual Studio Code
#237Earlier quoted context omitted.
Some project types, such as Gradle or Maven projects, use arbitrary commands or plugins in project setup. You have to run arbitrary plugins to know which directories are the source directories, and you have to know which directories are the source directories to do anything in Java.
There’s no need to run that when opening a directory is there?
Re: Threat actors expand abuse of Microsoft Visual Studio Code
#238Earlier quoted context omitted.
Yikes, sounds like hell. Corporate never seems to get that git is the kind of interface you want between your computer and their servers. Then when you trash your computer you can just get it back to the state of being able to git.
They're not using the remote VM as a server but as the development machine though. You don't want to have to git commit and push every time you need to run or even type-check your code. I think what GP describes is actually a pretty okay solution for orgs that don't want to provider their devs with local admin privileges.
Re: Threat actors expand abuse of Microsoft Visual Studio Code
#239Earlier quoted context omitted.
I suspect that you're relying too heavily on the user here. Even for myself, a very experienced developer, I don't have a flash of insight over what my risk exposure might be for what I'm opening at this moment. I don't have a comprehensive picture of all the implications, all I'm thinking is "I need to open this file and twiddle some text in it". Expecting us to surface from our flow, think about the risks and make…
> I don't have a flash of insight over what my risk exposure might be for what I'm opening at this moment Maybe I'm too close to it, but the first sentence gives a very clear outline of the risk to me; Trusting this folder means code within it may be executed automatically. > I don't have a comprehensive picture of all the implications, all I'm thinking is "I need to open this file and twiddle some text in it". I'm c…
loss of syntax highlighting and to a lesser extent the neovim plugin. maybe having some kind of more granular permission system or a whitelist is the answer here.
opening a folder in vscode shouldn't be dangerous.
Re: Threat actors expand abuse of Microsoft Visual Studio Code
#240VS Code team member here :wave: As called out elsewhere, workspace trust is literally the protection here which is being circumvented. You're warned when you open a folder whether you trust the origin/authors with pretty strong wording. Sure you may find this annoying, but it's literally a security warning in a giant modal that forces you to chose. Even if automatic tasks were disabled by default, you'd still be vuln…
This is the main problem with that dialog: It’s completely unclear to me, as a user, what will and will not happen if I trust a workspace.
I treat the selection as meaning that I’m going to have nothing more than a basic text editor if I don’t trust the workspace. That’s fine for some situations, but eventually I want to do something with the code. Then my only options are to trust everything and open the possibility of something (?) bad happening, or not do any work at all. There’s no visibility into what’s happening, no indication of what might happen, just a vague warning that I’m now on my own with no guardrails or visibility. Good luck.