Article · 30 November 2026

Your AI agent should never hold the key: 12 open-source repos

A coding agent can print anything it can read, .env included. The 3 layers that keep a key out of its reach, a vault, a proxy that adds the token, and a box with one door, and 12 open-source repos for them.

Shareinf𝕏

A coding agent reads files, runs commands and calls APIs. Hand it a key, and the key travels with everything it does: into its context, its logs, a pull request, a reply to a prompt injection that only had to ask nicely. The fix is not a smarter agent. It is an agent that never holds the key at all.

Below: why the usual setup leaks, the 3 layers that keep a key out of an agent's reach, 12 open-source repos for them, and where a team starts.

The usual setup: a key in .env

  • Expected: the agent uses the key to call the API, and nothing else.
  • What happens: the agent can read any file the developer can, .env included, and whatever it reads it can print, paste or send.
  • What the gap costs: a live key in a transcript, a log or a commit, to be rotated everywhere it is used.
  • Why nobody changes it: .env is how every tutorial starts, and the agent runs as the developer, with the developer's rights.
Your agent should never hold the key: 3 layers, the key lives in a vault, the token is added on the way out, the agent runs in a box, each with its open-source repos

3 layers, so the agent never holds the key

  1. The key lives in a vault, never in a file the agent can read. On its own this is not enough: a vault the agent can query hands the key straight back, so the vault's own login, and the key that decrypts the secrets, stay outside the agent's session.
  2. The token is added on the way out. The agent sends its request with no credentials; a proxy outside the agent's reach fetches the key from the vault and adds it, only to requests for that key's own API host. For HTTPS, the agent's box trusts the proxy's certificate while the certificate's private key stays outside the box; clients that pin certificates refuse it, and those can talk plain HTTP to the proxy and let it open the TLS connection.
  3. The agent runs in a box whose only way out is that proxy, so it cannot reach the vault, the host or anything else on the network.

Each layer covers the gap the one before it leaves. The vault alone still answers the agent; the proxy alone is bypassed by an agent that can open its own connections; the box makes the proxy the only door.

One thing none of them stops: the proxy still signs whatever the agent asks for. An agent talked into issuing a refund does not need the key to do it. So each key is scoped to what the agent's job needs, the proxy allows only the hosts, methods and paths on its list, keys are short-lived and rotated, and the proxy logs every call it signs, with the injected header redacted. That log is where to read what the agent did.

One request: the agent in a sandbox sends it with no Authorization header, the egress proxy adds the bearer token fetched from the vault, and the API answers 200 OK

The 12, by layer

ProjectStarsWhat it does
1. The key lives in a vault
Infisical30,907Open-core: secrets, certificates and AI agent access in one platform.
SOPS
CNCF
23,921Encrypts the secrets inside config files, so they can sit in git.
OpenBao9,331Stores and hands out secrets, certificates and keys, and mints short-lived cloud keys on demand.
Varlock5,017AI-safe .env files: the agent reads the schema, never the secrets.
2. The token is added on the way out
mitmproxy47,264Intercepts and rewrites HTTP traffic; a few lines of an addon add the token after the request has left the agent.
Agent Substrate8,624Sandboxed agents with no credentials inside: its egress gateway injects them.
agentgateway
Linux Foundation
6,538A proxy for agents and MCP servers, with auth, API keys and policy in one place.
3. The agent runs in a box
Firecracker
AWS
38,287Lightweight microVMs, one per agent, each with its own kernel.
gVisor
Google
20,164An application kernel between the container and the host.
E2B15,074A throwaway cloud sandbox per agent run, driven from its open-source SDK.
microsandbox9,273Local-first microVMs started from code.
sandbox-runtime
Anthropic
7,339Filesystem and network limits for any process at the OS level, with no container, and a list of the only domains it may reach.

Stars as GitHub reported them on 30 November 2026.

Where a team starts

  1. Today: run the agent under sandbox-runtime with an empty domain allow-list, and see what breaks. Every failure is a place it reaches out.
  2. List every key an agent session can read: .env files, shell history, cloud CLI profiles, vault logins, the CI secrets a workflow prints.
  3. Move them into a vault, and give the agent a schema of what exists instead of the values.
  4. Put an egress proxy between the agent and the internet, and let it add the tokens.
  5. Run the agent in a sandbox whose only network route is that proxy.

Moving the keys stops a key printed from .env, but only once the agent's session holds no vault login. The proxy and the box stop an agent that has been talked into looking for one, and the proxy's allow-list limits what it can do with a key it never sees.

In short

  • An agent can print anything it can read, so the key must not be readable.
  • A vault, a proxy that adds the token, and a box with one door: each covers what the others leave open.
  • The proxy still acts for the agent, so scope its keys, allow-list its calls and read its log.
  • All 3 layers have mature open-source options today.

How Fusebox handles information security

Fusebox is certified to ISO/IEC 27001:2022 by Bureau Veritas. What that covers, and the certificate itself: ISO 27001 at Fusebox.

Discussed on LinkedIn

Found it useful? Share itinf𝕏

Run your flexibility as one system

Tell us what you operate and we will show you how it dispatches, or put the technical question to Fusie.