Lurker News
The agent running on a remote machine can authenticate using your local SSH credentials.

That means it can push to your private repos on GitHub, for example.
Proof: https://github.com/openai/codex/pull/28131#discussion_r3410013180

Comments (80) 38 threads

Earlier comments
m000#
At this point, should cases like this even be news? Isn't that a fundamental security design issue? Local agent security guardrails appear to always be built around blacklists, which will always be unreliable and leaky. It is left as an exercise to the user to properly sandbox them.

There may be some limited form of whitelisting, but often it is just a facade, as it is very coarse-grained. So, with tools with very broad capabilities (ssh, kubectl, gcloud, etc) you end up with the agent performing unwanted actions.

carterschonwald3 replies#
this is a normal ssh feature meant to allow keys to be used while keeping keys local …

its actually a keystone of secure infrastructure setups, aka jump hosts.
granted its meant for human or scripted uses, as is everything else

krunck1 reply#
> keystone of secure infrastructure

But only when YOU choose where your SSH agent is accessible.

carterschonwald#
very true :)
hamburglar#
A normal ssh feature that a lot of people consider a really clever maneuver, but many highly locked down environments expressly forbid because it’s a liability.
minitech#
You don’t need to (and should not) forward your SSH agent just to set up a tunnel, especially with the default OpenSSH ssh-agent. It allows the intermediate host to decide what operations to do with your key(s). `ProxyJump` is a way safer default.
otterley1 reply#
If this bothers you, it can be guarded against in your ssh config file:

  Host trusted-server
      HostName server.example.com
      ForwardAgent yes

  Host another-trusted-server
      HostName another.example.com
      ForwardAgent yes

  Host *
      ForwardAgent no
mbreese#
Isn’t that the default setting for `Host *`? That’s why you have explicitly turn it on for other hosts, right?
eosis#
Things are awful for this at the moment. [Was the same for docker desktop at some point.](https://rupertrutledge.com/posts/docker-sbx-s-ssh-security-i...)

Same for [devpod](https://devpod.sh/) for sshing to devcontainers. They are particularly annoying because they just dump it into your config. Use an include statement to your own file for goodness sake.
It was often not ideal in the old world. Now agents are doing everything in those boxes, it is kind of mad.
I have my own utilities now for managing these sockets and files now to deal with this stuff.

Load more comments