tl;dr: never press github.dev or open vscode.dev on a repo you don't trust
1-Click GitHub Token Stealing via a VSCode Bug
71–80 of 116 posts
Re: 1-Click GitHub Token Stealing via a VSCode Bug
#72This is a very good writeup. Zooming way out (perhaps to the point of useless observation), it's a pity that the web embedded VSCode editor is signed into GitHub at all . Defense-in-depth or not, a huge vulnerability surface arises from that original sin. It'd be like if you had a god-permissioned GitHub API token stored in world-readable plaintext on your workstation for the malicious-NPM-package-of-the-week to find…
It is not safe in the sense that for every extension you install, you are essentially installing a new Node.js app with all its bundled dependencies. Even if you trust the publisher, I am sure there are many holes to exploit.
Re: 1-Click GitHub Token Stealing via a VSCode Bug
#73Very cool.
Re: 1-Click GitHub Token Stealing via a VSCode Bug
#74This is a very good writeup. Zooming way out (perhaps to the point of useless observation), it's a pity that the web embedded VSCode editor is signed into GitHub at all . Defense-in-depth or not, a huge vulnerability surface arises from that original sin. It'd be like if you had a god-permissioned GitHub API token stored in world-readable plaintext on your workstation for the malicious-NPM-package-of-the-week to find…
You can use SSH keys and GitHub deploy keys to approximate this. Can't speak for the security of it, but I have never set up GitHub with access to every repo. Not sure if there exists approximate functionality in other git forges though.
Re: 1-Click GitHub Token Stealing via a VSCode Bug
#75Re: 1-Click GitHub Token Stealing via a VSCode Bug
#76Kudos for the public disclosure. Too many people haven't been happy with MSRC and it's starting to boil over (see the Nightmare Eclipse situation, too). Maybe all of these disclosures will cause them to do some introspection and realize they're the problem. I highly doubt that, but one can dream.
I am not sure if this is still the best approach. They did not even try to submit based on expected "low" ranking when comparing to existing XSS submission. They should at least try or let them know many days before disclosing. You never know.
https://doublepulsar.com/microsofts-stance-on-zero-day-explo...
Re: 1-Click GitHub Token Stealing via a VSCode Bug
#77I don’t really understand why more devs don’t try Neovim. Maybe it’s just my preference, but I like having a small setup where I know what is installed and what is running. With VSCode, browser IDEs, extensions, sync, tokens, and random plugins, it gets hard to tell what actually has access to what.
I stopped using VS Code and switched to Neovim some years ago, once I noticed that the former would automatically install random Python packages with typings for libraries without stock typings. The “feature” (part of Microsoft’s official Python extension, which was the only one that worked acceptably well for me in other regards) ended up installing type definitions for a different version of a library than the one…
Depending on what third party packages you use, you may sometimes get breakage there, but if you start out with a kit like doom emacs, you’ll be largely insulated from that.
There’s also always newer stuff like zed, which looks pretty great and is very snappy in my limited testing.
Re: 1-Click GitHub Token Stealing via a VSCode Bug
#78If you like VSCode but don't like Microsoft, try Zed (zed.dev).
Zed is nice, but the project wide search (sidebar based) in VS Code and diff viewer in VS Code are still better IMO and unfortunately since I no longer code, those are my most used features of an editor. Still using it instead of VS Code but I sure wish it improved those views.
Re: 1-Click GitHub Token Stealing via a VSCode Bug
#79This is a very good writeup. Zooming way out (perhaps to the point of useless observation), it's a pity that the web embedded VSCode editor is signed into GitHub at all . Defense-in-depth or not, a huge vulnerability surface arises from that original sin. It'd be like if you had a god-permissioned GitHub API token stored in world-readable plaintext on your workstation for the malicious-NPM-package-of-the-week to find…
I think the problem lies in the fundamental design of VS Code extensions in general. They are essentially Node.js apps with full access to built-in modules, including fs. If the corresponding VS Code instance is launched with your user privileges, extensions can technically read files in ~/.ssh. It is not safe in the sense that for every extension you install, you are essentially installing a new Node.js app with all…
Re: 1-Click GitHub Token Stealing via a VSCode Bug
#80This is a very good writeup. Zooming way out (perhaps to the point of useless observation), it's a pity that the web embedded VSCode editor is signed into GitHub at all . Defense-in-depth or not, a huge vulnerability surface arises from that original sin. It'd be like if you had a god-permissioned GitHub API token stored in world-readable plaintext on your workstation for the malicious-NPM-package-of-the-week to find…
> malicious-NPM-package-of-the-week This is going to get worse and worse. I recently noticed AI harness (e.g. OpenCode) downloading random npm packages in the background and litter them everywhere in a few place in ~ and in your project dir, all without telling/asking you. What's worse is that people don't seem to care even the devs.