Menu

1 / 7

Your AI coding agent can read your SSH keys. I built a Neovim plugin that won't start it unprotected

DEV Community: rust·Xynorash·18 days ago
#HlaDrzrL
#devtorust#devto#dev#nvim#xyno
Reading 0:00
15s threshold

If your editor can launch a coding agent, that agent runs with your privileges: your ~/.ssh , your cloud credentials, your git history. One day I caught myself asking what exactly stops it from touching all that. The answer was "nothing", which wakes you up faster than coffee. So I wrote a plugin that makes my editor refuse to start the agent unprotected.

It is one of nine standalone plugins I extracted from xynovim , my Neovim config for Rust. All are MIT, all need Neovim 0.12+, and you can install any of them without the rest of the config. Splitting them out taught me more than writing them did (my ego has not fully recovered).

xyno-sandbox.nvim: an agent that refuses to start unprotected

The plugin runs a command-line agent inside bubblewrap: a read-only filesystem except the project and a scratch directory, credential folders such as ~/.ssh and ~/.aws replaced with empty ones, secret-looking environment variables removed, and git directories locked read-only.

The design rule is that it fails closed.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.