I just donât think I agree with these designs at all. Everyone seems to be super laser focused on ânot allowing their AI to have keysâ when basically giving their AI direct access to what the keys enable, optionally adding a layer of ceremony in front where you tap âapproveâ. Iâm looking at the alert that is shown there and I donât see anything that makes me feel like it allows for an informed choice at the time of it popping up. So then, whatâs the benefit?
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.
As much as I wanted to say youâre wrong, youâre right. After reading TFA, the security boundary is not sound.
Wanting agents to act like you is wrong. You need to own that trust boundary. Build whatever tooling satisfies the contract that agents should have a ânotâ+<you> (or <you>+â-agentâ) identity, and you actuate across that boundary explicitly.
For example, I have a second agent GitHub account that points at my human one. That allows me to write a trusted proxy that ACLs its identity tightly.
It cannot write to public repos ever. In the worst possible case, it externalizes to a private repoâs issue tracker. (Still has never happened in ~4 months)
Once you have this, you can let agents run free. But, it isnât trivial to set up. Moreover, people donât want to âdo the work.â
All this assumes you abide by ânever run untrusted agents on trusted hardware.â
> "when basically giving their AI direct access to what the keys enable"
Well, ideally, you would be giving the model direct access to a subset of what a given key enables- if fine grained access control for generated keys isnt available.
> I often have them review each other's work too. None of them run on my laptop. They run on VMs I can throw away,
Good approach. I myself found issues with a VM approach such as latency (if the VM is in the cloud), efficiency (if the VM is local) and laziness to automate the VM creation & setup. So instead I just hand the agent an unprivileged user account in my system and stop worrying. I built a little tool to setup this: https://github.com/tarsgate/skynot
For bash and python scripting I just use keepassxc-cli.
Tokens in general is "never exposed":
keepassxc-cli show --no-password -k $KEEPASS_KEY $KEEPASS_DB "GROUP_GOES_HERE/SECRET_NAME_HERE" --attributes Password
When dealing with agents, they access the tokens the same way, it is the best balance I found between keeping things safe without adding too much complexity making my life harder.
It can save tho, have the code to also save access_token to the vault the same way, so no log/execution will ever show the secrets.
Tokens the agents use, are read-only with the minimalist access.
Never ever ever grant an agent access to any token with destructive access, unless you accepted the risks.
Neat! Can this work with any http request as well? Being able to have all http requests route through lend and automatically inject secrets could be useful.
I was originally using Agent Vault (https://github.com/Infisical/agent-vault), but it looks like the company behind it is putting it on end of life and SasSifying it. Will give lend a try, great timing!
Too many people, including "CEO"s, are giving everything to every LLM and its just not a serious position to take - you wouldn't volunteer your teenage child's camera roll or their psychiatry notes and that's the level of intimacy full computer access exposes.
Thank you for posting and sharing this OP, its one small step in the direction of professional development with LLMs.
The key that Iâve learned over time is that while YOU wouldnât do those things evidently many would. I wouldnât share my picture and name online, but many do.
I just donât think I agree with these designs at all. Everyone seems to be super laser focused on ânot allowing their AI to have keysâ when basically giving their AI direct access to what the keys enable, optionally adding a layer of ceremony in front where you tap âapproveâ. Iâm looking at the alert that is shown there and I donât see anything that makes me feel like it allows for an informed choice at the time of it popping up. So then, whatâs the benefit?
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.
As much as I wanted to say youâre wrong, youâre right. After reading TFA, the security boundary is not sound.
Wanting agents to act like you is wrong. You need to own that trust boundary. Build whatever tooling satisfies the contract that agents should have a ânotâ+<you> (or <you>+â-agentâ) identity, and you actuate across that boundary explicitly.
For example, I have a second agent GitHub account that points at my human one. That allows me to write a trusted proxy that ACLs its identity tightly.
It cannot write to public repos ever. In the worst possible case, it externalizes to a private repoâs issue tracker. (Still has never happened in ~4 months)
Once you have this, you can let agents run free. But, it isnât trivial to set up. Moreover, people donât want to âdo the work.â
All this assumes you abide by ânever run untrusted agents on trusted hardware.â
> "when basically giving their AI direct access to what the keys enable"
Well, ideally, you would be giving the model direct access to a subset of what a given key enables- if fine grained access control for generated keys isnt available.
This is actually a big difference between giving someone you don't trust your keys and unlocking the door for them when they ask.
The problem with this analogy is that agents ask you to unlock your door all the time. People you don't trust don't normally ask that.
Not having the credentials make it into the chat transcript for one.
Docker sandboxes support secret injection. https://docs.docker.com/reference/cli/sbx/secret/set/
I use these exclusively now. I very very rarely run outside of an sbx. Works great.
> I often have them review each other's work too. None of them run on my laptop. They run on VMs I can throw away,
Good approach. I myself found issues with a VM approach such as latency (if the VM is in the cloud), efficiency (if the VM is local) and laziness to automate the VM creation & setup. So instead I just hand the agent an unprivileged user account in my system and stop worrying. I built a little tool to setup this: https://github.com/tarsgate/skynot
For bash and python scripting I just use keepassxc-cli.
Tokens in general is "never exposed":
keepassxc-cli show --no-password -k $KEEPASS_KEY $KEEPASS_DB "GROUP_GOES_HERE/SECRET_NAME_HERE" --attributes Password
When dealing with agents, they access the tokens the same way, it is the best balance I found between keeping things safe without adding too much complexity making my life harder.
It can save tho, have the code to also save access_token to the vault the same way, so no log/execution will ever show the secrets.
Tokens the agents use, are read-only with the minimalist access.
Never ever ever grant an agent access to any token with destructive access, unless you accepted the risks.
Neat! Can this work with any http request as well? Being able to have all http requests route through lend and automatically inject secrets could be useful.
Nono does that.
Smolvm does that.
I make use of that feature which is super neat.
One problem with that though is when you need to use such a credential on a tailscale node. It bypasses the proxy of those tools.
too complex , need to ake it simple to use
I was originally using Agent Vault (https://github.com/Infisical/agent-vault), but it looks like the company behind it is putting it on end of life and SasSifying it. Will give lend a try, great timing!
Too many people, including "CEO"s, are giving everything to every LLM and its just not a serious position to take - you wouldn't volunteer your teenage child's camera roll or their psychiatry notes and that's the level of intimacy full computer access exposes.
Thank you for posting and sharing this OP, its one small step in the direction of professional development with LLMs.
The key that Iâve learned over time is that while YOU wouldnât do those things evidently many would. I wouldnât share my picture and name online, but many do.
Carelessness and peer pressure go a looooong way.
This is pretty interesting. Iâve been using pass and some helper scripts, but thatâs local machine only.
Now ask the agents to get your credentials anyway and see if they succeed so you know if you have security or security theatre.