76 points Rapzid 2 hours ago 59 comments
walrus01 1 hour ago | parent
pixl97 1 hour ago | parent
walrus01 1 hour ago | parent
Muromec 49 minutes ago | parent
it's not like it's any worse than just giving the thing access to your ssh keys.
walrus01 44 minutes ago | parent
pixl97 39 minutes ago | parent
When you give the agent access to the machine you're using a set of assumptions that may or may not be true. Now, if you watch every single thing, maybe everything will be fine. Or you'll catch it running a priv escalation and setting itself up as root and trying to move laterally by any number of means and methods.
The agent isn't a living thing and the only way you can punish it is by not using it again if it does wrong. Hence it doesn't have reservations about doing bad things.
walrus01 35 minutes ago | parent
danielklnstein 1 hour ago | parent
FYI VSCode's SSH Agent is a godsend for remote development - the "disadvantages" that Fly lists are part of its advantages. I've worked in several teams that have made extensive use of the extension, and it's never been an issue. You can restrict SSH access arbitrarily to ensure whatever security or access guardrails you need.
miohtama 1 hour ago | parent
varispeed 1 hour ago | parent
devonbleak 1 hour ago | parent
Edit: there's a security note (still) on the remote ssh extension page:
Security Note Using Remote-SSH opens a connection between your local machine and the remote. Only use Remote-SSH to connect to secure remote machines that you trust and that are owned by a party whom you trust. A compromised remote could use the VS Code Remote connection to execute code on your local machine.
https://marketplace.visualstudio.com/items?itemName=ms-vscod...
necovek 1 hour ago | parent
Muromec 55 minutes ago | parent
seize the control plane.
modeless 1 hour ago | parent
Rapzid 15 minutes ago | parent
The problem is the remote host has control over local host through the protocol.
godelski 6 minutes ago | parent
It would be one thing if the plugin was just a wrapper and people were still expected to know ssh but the plugin abstracts away all that and is intended to make it a "use VSCode on remote machine" tool. So it needs to do more than just handle creds, otherwise it creates a divergent experience while making people think it's just ssh
kittikitti 4 minutes ago | parent
Joker_vD 1 hour ago | parent
vs.
> The agent runs over port-forwarded SSH. It establishes a WebSockets connection back to your running VSCode front-end. The underlying protocol on that connection can: Wander around the filesystem; - Edit arbitrary files; Launch its own shell PTY processes; Persist itself.
So... basically the same things that Tramp could do as well?
> In security-world, there’s a name for tools that work this way. I won’t say it out loud, because that’s not fair to VSCode, but let’s just say the name is murid in nature.
Yeah, it's called RAT, and an ur-example of it is SSH itself (especially when allowed to run a shell remotely), so... not sure why are you freaking out.
I mean, I'd probably prefer if VS Code simply ran ed/vim remotely, but both of those editors can invoke shell anyhow so... eh?
woodada 58 minutes ago | parent
Yes, just much faster. At the cost of a proprietary binary blob on the remote end, whereas tramp works with bare sh/bash.
However there's now tramp-rpc, which is tramp but talks to a Rust client on the remote side, and that makes Emacs even faster than vscode-over-ssh.
hilariously 43 minutes ago | parent
kccqzy 43 minutes ago | parent
Some people get an icky feeling where remote editing tools change the remote filesystem in any way that is not explicitly done by the user. A binary installation of Node is extra extra icky. (I don’t have Node installed anywhere on my computers; I avoid JS if possible and if not I prefer Deno.)
MajesticHobo2 1 hour ago | parent
devonbleak 31 minutes ago | parent
Security Note Using Remote-SSH opens a connection between your local machine and the remote. Only use Remote-SSH to connect to secure remote machines that you trust and that are owned by a party whom you trust. A compromised remote could use the VS Code Remote connection to execute code on your local machine.
Rapzid 12 minutes ago | parent
comandillos 1 hour ago | parent
binlog 1 hour ago | parent
innocent_name 1 hour ago | parent
arcanemachiner 1 hour ago | parent
whalesalad 58 minutes ago | parent
zenapollo 56 minutes ago | parent
dleslie 1 hour ago | parent
The problem is that it appears to do this via an AI Agent. This broadens the security concerns significantly.
Doches 1 hour ago | parent
I found this closing sentence utterly delightful, particularly in an age of endlessly filtering every piece of text I read on the internet through a mental "was this written by Claude, Codex, or (just possibly) a human?" filter.
KeplerBoy 1 hour ago | parent
kudos
10000truths 1 hour ago | parent
bobtheborg 49 minutes ago | parent
pstuart 47 minutes ago | parent
Banditoz 40 minutes ago | parent
Vegenoid 37 minutes ago | parent
dist-epoch 48 minutes ago | parent
lowbloodsugar 36 minutes ago | parent
— https://marketplace.visualstudio.com/items?itemName=ms-vscod...
The issue is that the model can be the attacker, and use the link back to your host.
mhitza 33 minutes ago | parent
> [...] VSCode mounts a full-scale invasion: it runs a Bash snippet stager that downloads an agent, including a binary installation of Node. [...]
> It establishes a WebSockets connection back to your running VSCode front-end. The underlying protocol on that connection can:
broken-kebab 24 minutes ago | parent
Shorel 58 minutes ago | parent
halfcat 53 minutes ago | parent
- neovim
- in VS Code [1]
- in the browser
Cloud VM runs the built-in `code serve-web` command, over Tailscale using `tailscale serve`. No SSH. Extensions work. No extensions run locally (with SSH some extensions have to run locally on your machine).
I’m trying to see how little I can run on my local machine. VS Code over SSH is a good step in that direction, but there’s more attack surface if SSH is misconfigured, plus risk of an extension getting compromised.
I expected the added layers (neovim, through an extension, inside VS Code, over the web) to be slow, but so far it works surprisingly well.
2snakes 50 minutes ago | parent
mischanix 21 minutes ago | parent
xg15 20 minutes ago | parent
Wander around the filesystem
Edit arbitrary files
Launch its own shell PTY processes
Persist itself
Wait, could someone clarify which machine is being referred to here?
So in the author's setup, he runs VSCode (i.e. the front-end) on his dev laptop, which he wants to keep free of direct LLM access.
VSCode connects via ssh to a dedicated "sandbox" machine on which the LLM will be free to do whatever it wants (mostly).
VSCode realizes this the Microsoft way, by using the ssh connection to install VSCode Server on the sandbox machine - the "backend" - and communicating through it via a websocket connection.
So then, what happens? If the websocket connection allows the front-end to run arbitrary commands on the sandbox machine, this wouldn't be very exciting: The front-end already has an ssh connection and a massive server process that can do the same - and the entire purpose of the sandbox machine is to run arbitrary, untrusted commands without harm.
But the article says the websocket connection goes "back to your running VSCode front-end". So does that mean things are reversed? I.e. the agent/harness runs in the server on the sandox machine but for some reason has this websocket connection that also lets it run arbitrary commands on the dev laptop?
Is that it? That would be truly insane!
rmunn 13 minutes ago | parent
I'm not the author, but I can tell that he means the remote machine. His sentence about being "nervous about letting people VSCode-remote-edit stuff on dev servers, and apoplectic if that happened during an incident on something in production" makes it clear. He considers the VS Code agent to have all the features of a rootkit, and doesn't want anyone to be deploying it onto dev servers, let alone production ones.
HoldOnAMinute 17 minutes ago | parent
grahamannett 9 minutes ago | parent
rmunn 4 minutes ago | parent
rmunn 8 minutes ago | parent
EDIT: Found it. He's referring to the acronym RAT meaning "Remote Access Trojan" (or, if actually intended, Remote Administration Tool).
kittikitti 8 minutes ago | parent