Threat actors expand abuse of Microsoft Visual Studio Code
95 points
5 hours ago
| 9 comments
| jamf.com
| HN
TheAdamist
2 hours ago
[-]
Coming from the perspective of an eclipse fan, why is VS code the defacto answer nowadays?

Im forced to use vs code (so biased), but everything seems worse than eclipse, plus these repeated security issues from malware laced projects.

Theres been several posts about infected projects by fake recruiters here in the last year or two.

Im guessing the answer is probably Java is why eclipse is out of favor.

reply
com2kid
1 hour ago
[-]
I switched to VSCode because it has a free editor with a really great jump to file hotkey.

I remember when the big VS added jump to file but it was so damn miserably implemented as to be useless.

Having worked at Microsoft for a decade, the most frequent way I navigated a large source tree was dir /s *partialfilename*.*

Then again while I was there, most code bases couldn't even open in Visual Studio. (highly team dependent, I was mostly on older C/C++ code bases.)

Some teams at MS paid for an editor called Source Insight, which indexed your code and could also parse C #defines and other preprocessor macros, which was super unique and powerful. It had an incredibly powerful symbol and fuzzy filename search capabilities, I'd frequently have Source Insight open just so I could find where in a folder structure a file was and then I'd open it up in my preferred editor.

Back when I got my first SSD the largest boost to my dev productivity was not in compile times (large C++ code bases tend to template bound more so than IO bound), it was how fast I could find files in the directory structure.

I'm sure Vi/Emacs users have some magic set of plugins that do all of this for them, but as someone back on Windows back in the 2000s and 2010s, the supported MS tooling was horrible at all this.

Then VS Code comes along with amazing fuzzy file name matching. Holy cow. Sure it is missing 90% of the power of real Visual Studio (being able to have a debugger step from front end web code to your backend and then into stored procedures in SQL, running on a remote machine, that your debugger transparently auth'd to, is something Microsoft had working 20 years ago and would be considered impossible dark magic with today's tooling), but wow can I navigate a project quickly!

reply
danielodievich
28 minutes ago
[-]
Site license to source insight was something I missed badly after Microsoft. Bought my own copy. It did wonders when looking at Snowflake monorepo, which was otherwise impossible to understand . Great piece of software, still going strong too.
reply
josephg
2 hours ago
[-]
> Coming from the perspective of an eclipse fan, why is VS code the defacto answer nowadays?

Is eclipse good now? I used it 15 years ago. It took ages to start. It was a memory hog and it was dog slow besides. My entire team got RAM upgrades on our computers because the default company issued machines (which were quite good at the time) didn't have enough RAM to use eclipse properly.

I can't imagine why it went out of favour...

reply
someguyiguess
52 minutes ago
[-]
This is exactly what I was going to say. I used eclipse in college when learning Java. Back then it was bloated, slow, had really bad UX, and would occasionally crash for no reason I could ascertain (I was just doing basic school projects. Linked lists, binary search trees, etc...)

VS Code, although it is starting to go get a bit bloated, has always been extremely responsive and snappy. Yeah I've had it crash, but I was never surprised that it crashed. (e.g. opening enormous files, running several instances at once with tons of tabs open, long debugging sessions, etc...)

But now I use NeoVim so none of that matters...

reply
ryukoposting
41 minutes ago
[-]
> It took ages to start. It was a memory hog and it was dog slow besides. My entire team got RAM upgrades

The more things change, the more they stay the same. I used to use VS Code on some very large C projects with 16GB of RAM, and my machine would grind to a halt while intellisense was indexing.

reply
GrayShade
25 minutes ago
[-]
The indexer was probably clangd, not Code itself.
reply
Alupis
1 hour ago
[-]
How much ram did you have, and when was this? I remember being extremely happy with Eclipse on an 8GB machine - this was back in the jvm7 days. Heck, I did jvm6 development with Eclipse on Windows XP with 4GB of ram and was content.

Eclipse gets a lot of automatic hate - I believe mostly since a lot of people first use it in university and struggled with their first real IDE.

For years and years I had people telling me how great IntelliJ was, etc. I eventually switched - lo and behold, IntelliJ had just as many quirks (even some of the same) as Eclipse.

reply
josephg
29 minutes ago
[-]
It was 2010. Our default work machines had 16gb of ram. Eclipse ran, but it was tight. Especially while debugging. Some developers also apparently liked to open a second eclipse instance for some reason. You'd go OOM pulling stunts like that.

They upgraded all of us to 32gb. 32gb doesn't sound like a lot of ram now, but in 2010 it seemed pretty wild to me. Especially for just running an IDE.

In eclipse's defence, we were working on a very large java codebase. But that shouldn't have been a surprise to anyone. I've never seen a java codebase come in any other size.

I'm running intellij (RustRover) right now, and its sitting on about 4.5gb of ram. That still seems very inefficient to me. But it doesn't sound that bad compared to eclipse.

reply
morcus
1 hour ago
[-]
> Eclipse gets a lot of automatic hate - I believe mostly since a lot of people first use it in university and struggled with their first real IDE.

More like Eclipse struggled on the kind of hardware that people could afford as a student.

My main memories of Eclipse (15 years ago at this point) are waiting forever for it to start up, though it was pretty adequate after that.

reply
DrewADesign
53 minutes ago
[-]
Right, but it’s essentially a fancy text editing environment. It should never have needed anything but barebones hardware.
reply
Semaphor
1 hour ago
[-]
I used eclipse in university around that time (2005), then first switched to netbeans which I already liked more, then discovered IntelliJ and have been using that ever since. Everything about Eclipse felt worse in ways neither of the others did, but all of that was still during university (though I now use JetBrains professionally).
reply
dfajgljsldkjag
2 hours ago
[-]
Eclipse is not safer it just has fewer people looking for holes in it. The problem is not the software but how we trust code from the internet. Even if you used Eclipse a fake recruiter could still trick you into running a bad script. We cannot fix social engineering by changing the text editor.
reply
jonwinstanley
43 minutes ago
[-]
As I remember it, VS code was Microsoft’s response to Sublime.

Sublime was exceptionally popular for web developers throughout the 2010s.

Sublime was maintained by a single person as far as I know.

VS code was pretty much a copy of Sublime but with a much better extensions system and relatively quickly there were some great plugins that made VS code the de-facto editor for web development.

reply
glenngillen
1 minute ago
[-]
Wasn’t it a copy of Atom?
reply
Avicebron
48 minutes ago
[-]
The only thing that matters is extensibility/customization and speed. I want the lightest, most customizable thing that isn't emacs (for real reasons, trying to set up emacs at work is too much of pain in the ass) as my single pane of glass on any OS I care to use. If it can't do that, it doesn't live long.
reply
rapind
32 minutes ago
[-]
I want the lightest, most customizable thing, that is also Vim. Thank god there's Vim for that. (cloning my dotfiles for instant setup on a new box)
reply
Avicebron
26 minutes ago
[-]
I mean, sure, you could do that. No one said being competent was easy. Have you tried lisp?
reply
eikenberry
2 hours ago
[-]
Seems very odd to me that someplace would force the use of a particular development tool. I've seen it only one time while interviewing, where they wanted everyone to have identical setups so they could easily hop onto each others computers when needed... it was weird and I took it as a red flag and didn't follow through them them.
reply
userbinator
2 hours ago
[-]
That is a massive red flag to me too. They are basically saying "you are identical to everyone else, and easily replaced."
reply
doubled112
2 hours ago
[-]
Wanting to be able to use anybody's machine is very strange, agreed.

From a support/IT perspective though, the closer everybody's machine is, the easier the job is.

The last software shop I worked at, we had a default set of tools and configs. It was a known happy path. You were allowed to adventure off of that path, but you were mostly on your own.

reply
MaulingMonkey
49 minutes ago
[-]
> Wanting to be able to use anybody's machine is very strange, agreed.

Very useful if people are struggling to create reliable repro steps that work for me - I can simply debug in situ on their machine. Also useful if a coworker is struggling to figure something out, and wants a second set of eyes on something that's driving them batty - I can simply do that without needing to ramp up on an unfamiliar toolset. Ever debugged a codegen issue that you couldn't repro, that turned out to be a compiler bug, that you didn't see because you (and the build servers) were on a different version? I have. There are ways to e.g. configure Visual Studio's updater to install the same version for the entire studio, which would've eliminated some of the "works on my machine" dance, but it's a headache. When a coworker shows me a cool non-default thing they've added a key binding for? I'll ask what key(s) they've bound it to if they didn't share it, so we share the same muscle memory.

reply
Alupis
1 hour ago
[-]
Devcontainers[1] or some similar technology are a must. Use whatever specific IDE you want, but the development environment itself should be identical across everyone on the team.

No more "works on my computer" issues. The environment is always identical.

[1] https://containers.dev/

reply
not_a_bot_4sho
1 hour ago
[-]
It's quite common if you work in a team of engineers, or in a large company with many engineers.

Having consistent machine and OS and app configurations enables better (lower cost, higher reliability) scripting and tooling solutions in things like repos and infrastructure.

Not unlike consistency in language and compiler choices.

reply
croes
1 hour ago
[-]
Or they bust don‘t want to look after a dozen different tools and their security issues.
reply
vbezhenar
1 hour ago
[-]
For me vscode is super-lightweight and at the same time has enough functionality. I didn't use Eclipse for many years, but from my memory it was super-heavyweight. And it didn't really support anything except Java.

Interestingly Java is the only language that I've found vscode support poor, so I keep buying Idea license exclusively for Java projects. For rest of languages that I use (JS/TS, Go, Python, Shell, YAML, XML) I'm using vscode and happy about it.

In recent years vscode starting to get bloated, mostly with AI stuff. But so far I can disable everything AI with a single setting and it works good afterwards. I'd prefer for all AI features to be contained in a separate plugin that I can just not install, but I guess managers these days want to shove AI in everyone's throat.

Another good thing about vscode is that its written with JavaScript and can be launched in browser, so in the future I want to put my development environment in the browser, but so far I didn't do that.

reply
MaulingMonkey
1 hour ago
[-]
I bucket Eclipse under "heavyweight IDE". I used to use it, plus the CDT plugin, for my C++ nonsense.

Then Visual Studio's Express and later Community SKUs made Visual Studio free for ≈home/hobby use in the same bucket. And they're better at that bucket for my needs. Less mucking with makefiles, the mixed ability to debug mixed C# and C++ callstacks, the fact that it's the same base as my work tools (game consoles have stuff integrating with Visual Studio, GPU vendors have stuff integrating with Visual Studio, the cool 3rd party intellisense game studios like integrates with Visual Studio...)

Eclipse, at least for me, quickly became relegated to increasingly rare moments of Linux development.

But I don't always want a heavyweight IDE and it's plugins and load times and project files. For a long time I just used notepad for quick edits to text files. But that's not great if you're, say, editing a many-file script repository. You still don't want all the dead weight of a heavy weight IDE, but there's a plethora of text editors that give you tabs, and maybe some basic syntax highlighting, and that's all you were going to get anyways. Notepad++, Sublime Text, Kate, ...and Visual Studio Code.

Well, VSC grew some tricks - an extension API for debuggers, spearheading the language server protocol... heck, I eventually even stopped hating the integrated VCS tab! It grew a "lightweight IDE" bucket, and it serves that niche for me well, and that's a useful niche for me.

In doing so, it's admittedly grown away from the "simple text editor" bucket. If you're routinely doing the careful work of auditing possibly malicious repositories before touching a single build task, VSC feels like the wrong tool to me, despite measures such as introducing the concept of untrusted repositories. I've somewhat attempted to shove a round peg into a square hole by using VSC's profiles feature - I now have a "Default" profile for my coding adventures and a "Notes" profile with all the extensions gone for editing my large piles of markdown, and for inspecting code I trust enough to allow on disk, but not enough to autorun anything... but switching editors entirely might be a better use of my time for this niche.

reply
blackoil
31 minutes ago
[-]
Because it is fast enough, easy to onboard to with sane defaults. MS provided initial plug-ins and the ecosystem developed.

Threat model described is not unique to VS Code

reply
atq2119
50 minutes ago
[-]
My personal reason for switching some years ago was the excellent remote session support via ssh.

I haven't reevaluated that choice in a while, but that plus LSP support (and to a lesser extent ML Auto-complete) are must-haves for me nowadays.

reply
dangus
16 minutes ago
[-]
It's the license. The MIT license is what makes VSCode the defacto answer.

It also runs on the web, which makes it extremely convenient to toss into...web things. It's the code editor for the Google Cloud console, the Lambda web console, the GitHub web editor, and so on.

I'm going to guess that Eclipse doesn't have the same amount of security issues because it's not a popular target. Everyone (relatively speaking) is using VSCode or something based on it.

reply
mr_toad
2 hours ago
[-]
> Im guessing the answer is probably Java is why eclipse is out of favor.

Some people just want a text editor, whereas eclipse is “an IDE and Platform”.

reply
forrestthewoods
1 hour ago
[-]
I’ve never written a line of Java in my life. Why would I ever use Eclipse?

VSCode is defacto standard because it’s kinda mediocre but works ok enough for every language and every platform. Microsoft created and popularized LSP so VSCode isn’t a single language IDE.

I use a mixture of code editors. My favorite is probably 10x but it only works with C++. So VSCode is just a reasonably standard unless a different editor is better for a specific use case.

reply
SV_BubbleTime
2 hours ago
[-]
Wild. I would quit my job and start selling jam at the Farmer’s Market before I went back to Eclipse! :)
reply
doodlesdev
2 hours ago
[-]

  > everything seems worse than eclipse
I would say the answer is that's not the general perception of the software. I'm personally migrating out of VSCode, because having to use the OpenVSX registry to have open-source builds makes me mad (I've since migrated to Zed for now, since I've never adapted well to neovim nor emacs).

In general, I believe most people see VSCode as "good enough". Maybe not the best text editor, but it's good enough at everything it does and extensible enough to the point that there's really no point to go for anything else unless you have a really good reason to.

   > Im guessing the answer is probably Java is why eclipse is out of favor.
My previous answer is thinking about editors in general. But in the case of Eclipse I'd say you're right LOL.
reply
com2kid
1 hour ago
[-]
People forget that there was a period of time during which the Java runtime installer tried to install actual adware. You had to jump through hoops to deselect adware from being forced onto your machine, it was infuriating.

Setting up a new machine, I could choose between Eclipse (free, took forever to open, slow, asked me a million questions before it let me start working) or Visual Studio (cost money, incredibly powerful, written in C++ and was really damn fast.)

reply
jen20
2 hours ago
[-]
“Java” does not explain why Eclipse is irrelevant where IntelliJ is thriving.
reply
reaperducer
2 hours ago
[-]
why is VS code the defacto answer nowaday?

  1. It's free
  2. A million plug-ins
Personally, I don't use it because it's so dog slow.
reply
josephg
2 hours ago
[-]
> A million plug-ins

> I don't use it because it's so dog slow.

You might find it runs better with fewer plugins.

reply
godelski
1 hour ago
[-]
Load time is in seconds, even with the program cached. I can still load vim with a ton of plugins[0] and still load a project in a few hundred milliseconds.

Maybe VS Code is faster with fewer plugins but it's still "dog slow" to load and run. Only thing I'm "missing" in vim is the bloat

[0] personal I only use a handful but I've played around because why not

reply
rmunn
1 hour ago
[-]
With LazyVim (requires NeoVim) and its load-on-demand architecture, startup time usually stays below 50 milliseconds even with a ton of plugins. Below 50ms is fast enough that it feels instant. Aliasing `nvim` to `n` in my ~/.bash_aliases just makes it even faster. cd to a project directory, run `n .` and I'm looking at the NeoVim file explorer plugin for that project directory. No break in thought flow, no standing up to get coffee while the IDE loads, just keep going.
reply
mhuffman
2 hours ago
[-]
I have noticed that Antigravity is lightening fast, wonder what magic they are using?
reply
blackoil
18 minutes ago
[-]
Between long lost of dependencies, LLM and these threat models; developing inside containers should be default workflow.
reply
sciencejerk
54 minutes ago
[-]
Is tasks.json automatically run? I thought additional user interaction was required?
reply
internet2000
2 hours ago
[-]
It's Macro-enabled Office files all over again.
reply
dfajgljsldkjag
2 hours ago
[-]
It is scary that a text editor can run hidden code just by opening a folder. We traded our safety for convenience and now we are paying the price. Users will always click the button to trust a file if they think it helps them work faster. We cannot blame them when the software design makes it so easy to make a mistake.
reply
mmh0000
2 hours ago
[-]
Tooooo be fair

Vim had also had its share of execution vulnerabilities over the years.

https://github.com/numirias/security/blob/master/doc/2019-06...

reply
EE84M3i
2 hours ago
[-]
Doesn't it ask you if you trust a folder when you open it?
reply
dfajgljsldkjag
2 hours ago
[-]
You are right that the computer asks you. But people click yes because they are used to ignoring warning signs. The software relies on people making perfect choices every time and that never happens.
reply
whs
1 hour ago
[-]
It should tell me what should I look before I trust it. Not trusting the workspace means I might as well use Notepad to open it. I wouldn't think that tasks.json include autorun tasks in addition to build actions.
reply
croes
1 hour ago
[-]
> We traded our safety for convenience

Not the first time. Same with LLMs.

reply
jmyeet
1 hour ago
[-]
Maybe I'm a dinosaur in this regard but I don't like nor trust any of these desktop application that are really just Web technologies with an embedded browser eg Discord.

They're resource hogs and the attack surface is huge. You're basically betting that automatic code that's run won't find a vulnerability and escape the sandbox from an entire browser.

I have way more trust in Jetbrains IDEs and the JVM as a sandbox vs HTML/CSS/JS.

Still, I'm always impressed at the ingenuity of the people who come up with these attacks and the people who find them.

reply
josephg
8 minutes ago
[-]
Yep. You’d think using web tech would make it really easy to sandbox any 3rd party JavaScript that gets run. But I suppose sandboxing is simply too inconvenient.
reply
geophph
1 hour ago
[-]
I wonder what happens if you open the repo in VSCode Online through GitHub?
reply
rvz
58 minutes ago
[-]
A great reason why you should switch to Zed.
reply
bethekidyouwant
1 hour ago
[-]
tasks.json is the problem here, who thought that was a good idea?
reply