Let an agent use a credential without holding it
And without inheriting everything the credential allows
Ask a coding agent to review a change in a private repository. It needs to fetch the code. It doesn’t need to push commits, read the team’s other repositories, or see the GitHub token. But put a token in the agent’s environment and the agent can do whatever the token allows, whatever you asked it to do.
OpenClaw Enterprise (OCE) separates two questions that a token in the environment answers together: who holds the credential, and what it can be used for. The agent holds only a placeholder. When a request leaves the sandbox, a proxy at the boundary replaces the placeholder with the real credential. Copy the placeholder anywhere else and it authenticates nothing. The proxy also swaps in the credential only for the operations the operator granted. That can be much less than the credential itself permits.
One connection, two denials
Say a team has installed a GitHub App on twelve private repositories. For a review agent, the operator grants read access to just one. OCE records that grant in the agent’s approved configuration. The team reuses its existing GitHub connection without giving this agent all of it.
The agent runs an ordinary git fetch. Git sends the request from inside the sandbox with the placeholder, as if it were a normal token. At the boundary, the proxy checks the request against the grant: the right repository and a read operation. It matches, so the proxy swaps in the real credential and forwards the request. GitHub applies its own permissions, and Git gets the response as usual.
Now change one thing. Point the same Git client at a second repository that the GitHub App covers. GitHub would accept the real token there, but this agent was never granted that repository, so the proxy won’t swap it in. Or keep the repository and change the fetch to a push. A read grant doesn’t become a write grant because the agent asked.
The denials are the point. A proxy that swapped in the real token on every GitHub request would solve only half the problem. The token would be hard to steal, but everything it allows would still be one request away.

When something goes wrong
Keeping the real token out of the sandbox limits what a leak can expose. A diagnostic script that dumps the agent’s environment can still reveal sensitive data, but for this GitHub connection it finds only the placeholder.
Narrowing limits what a manipulated agent can do. An instruction hidden in a repository can convince the model that a push is necessary, but it can’t convince the proxy. The component that enforces the grant never reads the instruction.
Creating boundaries the agent can’t abuse
A lot of agent security tries to make the agent behave: careful prompts, stricter instructions, models trained to resist injection. Those help, but they ask the component under attack to defend itself. OCE puts the rule where the agent can’t reach it.
Two properties make that work, and you need both. If you hide the token but don’t narrow it, its full power is still one request away. If you narrow it but leave the real token in the sandbox, the agent can skip the proxy and use the token directly. With both, the agent has nothing worth stealing, and each request is checked against what the operator granted. What the credential allows doesn’t matter, and neither does what the model was told. This is the better approach for agent security.
Stay up to date
with AI.
AI news and insights from RAW Labs, covering the technology, the business decisions, and what it takes to put AI to work.
Check your inbox.
We’ll email a confirmation link to your address. Open it and confirm to start getting new articles.
The link works for 48 hours. Can’t find the email? Check your spam folder.