| ▲ | antoniomika 4 hours ago | |
Truthfully, I tend to agree with you. I built lend mainly for the fact that I like ssh tools a lot (feel free to check my other projects) and have always wanted a way to run local commands without having to setup reverse ssh when I don't need to run sshd on my laptop. For example, I store k8s credentials in 1pass and the cluster is only accessible via the network on my remote machine. I can grab the credentials from my laptop for the work I want to do on the remote, and never have to install 1pass on the remote machine. Primary use case for lend wasn't agents when I started the project. It just was natural to add support for it after the fact. | ||
| ▲ | saagarjha 2 hours ago | parent [-] | |
What I do on my machine is I basically do not allow for local exec at all, except in some very specific scenarios where I carefully design the environment and make sure that it seems reasonable before handing it to the agent. For example, I have a specific profiling task that requires performance counters. Normally my agents can spin up VMs to run commands without my permission but in this case the counters are not exposed in the VM, which basically means that this must be run outside of the VM. In this case I have configured my setup to be that the agent is allowed to write to a binary at a specific location, and I approve of it running one command (in this case, without my supervision even) that is basically xctrace sandbox-exec [very restrictive handwritten profile] [this binary]. In this way, it can run code on my machine and get the metrics it wants, but it can't go "oh let me write a program to go and poke around the host machine" which it is prone to doing if you don't restrict it this way. I guess what I have done is the exact opposite in that I have designed an environment for agents and then I am using it as a hammer to solve all my problems, I have had almost exactly the same problem as you and the the way I typically solve it is that I have persistent SSH connections already supported in my harness, and I can arbitrarily expose whatever I want into the "agent environment" (which doesn't necessarily need to even have an agent living there), and this environment is able to connect to the place that doesn't have the credentials, and then I can set up a way for reverse access to work with this tunnel. | ||