Your Agent Never Sees the Key. Check What Its Placeholder Can Still Open.
Credential brokers that add real keys outside an agent's sandbox are now documented by OpenShell, E2B, Infisical and OpenAI. They take the reusable secret out of the agent's reach, but not the authority behind it. A test of custody, path and authority shows what a broker buys, where the real value can still surface, what it costs to run, and why a clean secret scan does not prove an agent is credential-free.

Credential brokers that add real keys outside an agent’s sandbox are now documented by OpenShell, E2B, Infisical and OpenAI. They take the reusable secret out of the agent’s reach, but not the authority behind it. A test of custody, path and authority shows what a broker buys, where the real value can still surface, what it costs to run, and why a clean secret scan does not prove an agent is credential-free.
Watch the full analysis (12:23)
Watch the full analysis (12:23) on YouTube · Watch the Short (0:35)
Threat Lance Security retired its first agent design before using it for client work. Michael Chesang, founder and CEO of Threat Lance Security, a security firm whose website advertises adversarial AI and agentic testing, described that starting point in a written response to PSEEDR: “In our initial MVP, we ran an AI agent within an environment with access to credentials. However, we stopped using this implementation before using it for client work.”
The design that replaced it runs agents and sub-agents in E2B sandboxes where, Chesang wrote, “only dummy tokens are present, which are not usable on their own.” All network requests are routed through a credential broker that runs in a separate, isolated environment. “The broker checks if the request is compliant with policy for that host, method, route and scope of engagement,” Chesang wrote. “If it is, a temporary credential (scoped to this engagement) is issued and the request is made and logged. If it is not, the request is rejected.”
In that pattern, the agent holds a stand-in, and something outside the agent adds the real credential only to requests a policy allows. Engineers who already keep secrets in a manager and scope their tokens face the same choice for coding and operations agents that run unattended or in shared environments. Describing the move is easy. The harder questions are what it actually buys, what authority the agent keeps, where the real value can still appear, and what the broker takes to run and to verify.
The short answer: a broker removes the reusable secret, not the authority to use it. How much that protects depends on two further things: where the stand-in can be turned into a real credential, and how narrow the allowed requests are. Running it means writing and maintaining narrow policy, and living within operating limits the vendors themselves document.
Why this is a design question now
On 10 November 2026, the Cloud Native Computing Foundation welcomed OpenShell as a Sandbox project. NVIDIA contributed the runtime, which enforces policy on agents from outside them, and the announcement said OpenShell “is adopting Cedar” as its policy language. OpenShell v0.1.8 shipped the same day, and v0.1.9, released on 17 November, is the version this article describes.
Two caveats travel with those dates. CNCF’s own site describes Sandbox projects as “Experimental projects not yet widely tested in production.” And the Cedar move is an announcement: the current OpenShell documentation still describes sandbox policy as a YAML configuration, enforced by the supervisor’s proxy and an OPA policy engine.
OpenShell is one design, not the standard. E2B documents E2B Secrets, which inserts a stored secret into configured request headers outside the sandbox and which E2B describes as generally available on E2B Cloud. Infisical publishes a guide for running agents in E2B sandboxes behind its Agent Vault proxy. OpenAI’s Agents API sandbox security page tells developers to keep third-party credentials outside the environment and let a proxy supply them. Those three pages carry no publication dates, and documentation shows what vendors have built, not how widely anyone runs it.
E2B’s announcement states the problem all four designs address. Code running in a sandbox can read a secret passed in as an environment variable, write it to a log or send it elsewhere, and “Sandbox isolation doesn’t protect a credential you’ve placed inside the sandbox.”
Three things a broker changes
A broker changes three separate things, and each one fails in a different way:
- Custody: what the agent actually holds, and what that is worth if it leaks.
- Path: where a stand-in can be turned into a real credential, and whether the broker is the only way out.
- Authority: what a request the policy allows can do, whoever wrote the instruction behind it.
OpenShell’s documentation uses a GitHub token as its running example, and this article borrows it: picture a coding agent that needs to call the GitHub API.
Custody: what the agent holds instead of the key
None of the documented designs lets the agent read the real value, but most leave it holding something. In OpenShell v0.1.9, each eligible credential reaches the agent as an opaque placeholder in its environment. In the running example, the agent’s GITHUB_TOKEN variable holds a placeholder, and when an HTTP request carrying it passes through the proxy, the proxy resolves it to the real value immediately before forwarding. The architecture page says the sandbox runtime that shares the agent’s container “holds no gateway signing key, gateway JWT, or provider credentials,” although it still protects its own TLS key and enforcement state from the agent.
E2B Secrets goes further for the headers it covers: the agent holds nothing for that credential. The request leaves the sandbox without the secret, and E2B adds the value outside. Its management API never returns stored values. In the Infisical guide, the session token that authorizes the proxy is held by E2B on its own servers rather than in the sandbox, and the example code creates one session per run and revokes it when the run ends. OpenAI’s design pairs a placeholder with a proxy that supplies the real secret for approved hosts, and is candid about a second item the environment holds: “Agent-generated code can read the environment key.” That key, the page says, “only permits connecting environments.”
Practitioners describe the same shape. Mani Padisetti, founder of Almost Magic Tech Lab, a Sydney technology studio, reports running unattended agents in production there. Padisetti said in a written response to PSEEDR that “keeping real credentials out of anything the agent can read was the first design decision, not an afterthought.” In Padisetti’s setup, “agents never see a standing secret. Each agent holds a scoped identity, and when it needs to reach a real service, a broker outside the agent’s environment checks the request against policy and adds the credential at the boundary.” The account is undated, gives no counts and names no vendor or product.
So “credential-free” describes the real value, not the authority. Where the agent holds a handle, whether a placeholder, a marker, a scoped identity or a narrowly scoped key, the broker changes what that handle is worth. A real key copied out of an environment can be used outside it, within whatever limits its issuer enforces, until someone rotates or revokes it. A placeholder does nothing unless it passes through the broker, and how long it keeps working is a property of each product, not a general rule. OpenShell says an acknowledged detach revokes retained references and removes them from environments for future launches; the Infisical guide ends each run by revoking its session. Where the agent holds nothing, as with E2B’s header injection, the authority travels with the sandbox’s network route instead: E2B adds the secret to requests that match the configured rules, whatever code in the sandbox sent them. For any design, the useful question is what each item the agent holds, and each route it can use, opens, from where and for how long.
Jason Radney’s build shows why the answer matters even when the agent never sees a key. Radney, founder and CEO of Coast2Coast MSP in Tampa Bay, is building an agent for a car dealership client that takes service requests from a web form and enters them into the dealership’s management system. “The agent’s functions call the vault, and the vault adds the credentials only to the requests we’ve approved,” Radney said in a written response to PSEEDR, which also disclosed that “the dealership is a paying managed IT services client of Coast2Coast MSP.” Radney added: “The agent itself never sees a password or key, and none ever goes into a code repository.” The response does not say whether “approved” means a policy rule or a staff decision, or whether the function code receives a credential value. Passwords rotate on a documented yearly schedule to meet the client’s compliance rules. A long-lived real credential therefore sits behind the vault, which makes the vault’s custody more important, not less.
Path: where the placeholder can turn into a key
A placeholder is only as safe as the set of places where it resolves. If a broker attached the real value to any request carrying the placeholder, an agent steered by injected text could address the request to a host it chose, and the broker would supply the key. OpenShell’s own roadmap issue #896, opened in April 2026 as a proposal and closed in September, described the injection of that time as working for any destination and listed exactly this risk. That is a maintainer’s description of an earlier design, not an incident and not a statement about the current release.
OpenShell v0.1.9 binds credentials to endpoints. A static credential resolves only for the endpoints in its provider’s profile; in the GitHub example profile, that means api.github.com:443 and github.com:443. If the network policy allows a request but the credential’s binding does not include its endpoint, the proxy rejects the request with HTTP 403 and the reason credential_endpoint_mismatch. It also emits a denied event and a security finding that leave out the secret, the placeholder, the environment key and the query string. The providers documentation gives the GitHub case: even where a sandbox policy allows uploads.example.com:443, sending the GitHub placeholder there is rejected. Unknown, malformed or expired placeholders also fail closed. Since v0.1.8, the proxy also enforces where a credential sits in a request when the gateway and supervisor support it, so a header credential moved into a query parameter, a path or an unrelated header is denied before forwarding; older supervisors keep their previous behavior. The Secure Agent Workspace, an open pattern built on OpenShell, documents the same idea for its proxy mode: a marker sent to the wrong host gets a 502, and the request never reaches the provider.
Binding decides where a credential can be attached. Whether the broker is the only route out is a separate question. In OpenShell’s architecture, the mediated channel to the supervisor is the workload’s only allowed egress, and each runtime builds the outer fence with its own tools: Docker and Podman turn off networking on the workload container, Kubernetes uses a NetworkPolicy that admits only the supervisor service, and VM guests have no network device. OpenShell’s best-practices page adds that ignoring proxy environment variables does not bypass mediation.
Other setups are partial by design, and their documentation says so. E2B’s bring-your-own-proxy feature, which the Infisical guide notes E2B lists as a private beta, tunnels a sandbox’s TCP connections to a proxy you run after allow and deny filtering, but UDP traffic, including DNS, is not tunneled. If the proxy is unreachable, “Egress fails closed.” The Infisical guide built on that feature spells out the consequence: DNS lookups to a public resolver leave without the proxy, so an agent can still move data out in the hostnames it looks up, “though never a credential.” Under the guide’s default traffic policy, the proxy forwards requests to any host on the internet; the guide recommends restricting it to the hosts its services cover. E2B sends only ports 80 and 443 to the proxy, and a network update on a running sandbox that omits the egress_proxy setting sends the sandbox’s traffic out directly.
These details correct a tempting intuition, that a broker without a tight network fence is merely a convenience. An open, unrelated path does not hand the agent the brokered secret, because that secret never entered the workload. What the path controls is three other things. Binding decides where the real credential can be attached. The fence decides whether data and unauthenticated requests can leave outside the policy. And the path decides whether the agent can reach different credentials over the network, such as a cloud metadata endpoint. OpenShell’s policy prover flags agent-proposed rules that would add access to metadata endpoints, v0.1.9 stopped wildcard endpoints from allowing private IP literals on their own, and Infisical’s proxy refuses private and internal destinations unless a service in the session’s access bundle names the host.
Coverage is the last limit on the path. OpenShell resolves credentials only when its proxy handles a request as HTTP; raw TLS passthrough and non-HTTP tunnels stay opaque, and the proxy does not rewrite cookies, response content or WebSocket binary frames. The Secure Agent Workspace warns that a custom http:// URL bypasses its TLS proxy and would expose the marker to that endpoint. A broker on the only route closes the path, but only for the HTTP traffic its bindings cover.
Authority: what an allowed request can still do
The Secure Agent Workspace states its threat model plainly: an attacker with root in a user’s VM. Its proxy mode keeps provider keys outside the VM, so that attacker cannot read them from the VM’s disks or the gateway database. Root in the VM, the document says, “can still use a key while it controls the VM,” by sending a marker to an endpoint bound to that key.
The mechanism is not specific to one product. A broker attaches the credential to requests the policy allows, and it cannot tell whether the instruction behind a request came from the operator or from text the agent read in a malicious file. Chesang’s team designs for that failure. “Even with strict policies, there are edge cases where a malicious request will be approved by the model,” Chesang wrote. The firm also sets policy by hand: “We do not want the model to determine its permissions.”
Radney framed the same goal from the client’s side: “That system runs the entire business, so the real question was never whether the agent could reach it. It was how to make sure a mistake or a bad instruction could only do a small amount of damage.”
Custody limits where, and for how long, the authority works. Policy and the credential’s own scope limit what it can do, so the two have to be narrowed together. In the running example, a GitHub token with broad repository rights behind a rule that checks only the host still gives a misled agent all of those rights on that host. OpenShell denies outbound connections that no rule allows, ties destinations to the binaries allowed to reach them, and can restrict REST methods and paths; Chesang’s broker checks host, method, route and engagement scope. Neither replaces a token scoped to the job.
Verification tools have limits here as well. OpenShell’s prover documentation says a passing boundary check does not show that a policy is as narrow as it could be, that it is safe for a particular task, or that a running sandbox enforces it. Padisetti described a review benefit of brokering: “During a review I could answer what this agent could reach if it went rogue with a short list, because the broker records every approved request.” That record shows what the agent used. The grants define what it can still reach. A review needs both.
Where the real value can still appear
Even with custody, path and authority handled, the documentation names places where the real value can surface. None of these is a reported leak; they are stated design limits and fixes.
Upstream responses. OpenShell v0.1.9’s providers page says credential injection “does not automatically scrub credential values from upstream responses,” and advises sending credentialed requests only to trusted endpoints. Which upstream APIs echo credentials back is not documented in any of these sources.
Broker logs. OpenShell v0.1.8 removed AWS SigV4 signing diagnostics from supervisor TRACE logs, where they could have exposed a temporary session token; the release reports a fix, not an exposure. Some designs state their redaction rules. OpenShell’s mismatch events omit the secret and the placeholder, its provider listings show credential key names but never values, and the Secure Agent Workspace proxy logs exclude headers, query strings, bodies and keys. Any broker deserves the same question.
Operator export. OpenShell lets an mTLS operator retrieve real credential values through an RPC that, by the documentation’s own description, exports them outside sandbox endpoint enforcement. Ordinary users and OIDC admins cannot call it.
The broker itself. Moving secrets out of the agent concentrates them somewhere else. Infisical’s guide keeps its proxy token only on the proxy’s machine and says to rotate that token if someone takes control of the machine. The Secure Agent Workspace documents that, during a configuration apply, root in the VM can read or use a temporary admin key held in memory-backed storage.
Earlier exposure. A broker cannot recall copies that already exist. The Secure Agent Workspace tells operators to rotate every provider key that ever reached a VM, because old copies on copy-on-write storage cannot be reliably scrubbed, and notes that its rotation counter is an operator’s acknowledgement, “not proof of revocation.”
What it takes to run
In the three first-hand accounts, the cost shows up as policy work and human steps. “Agents asked for access patterns I had not predicted, and the broker refused them, as designed,” Padisetti wrote. “The fix was never to loosen the broker but to write narrower grants.” Chesang described the trade-off from the other side: “Very restrictive policies may prevent legitimate functionality. We must carefully approve additional permissions. If a step cannot be reliably automated, then we must get a human to approve the step. In this case, the process is not autonomous.”
Radney’s dealership build adds people on purpose. The agent runs on its own Windows virtual machine on the client’s network, signs in with its own named account, works only during business hours and is rate-limited, and “for now every entry waits in a queue for a staff member to approve before anything touches the live system.” Radney reported that “the setup has already caught things that shouldn’t have gone out,” and that “Because approved requests get their credentials automatically, it eliminated a lot of the repetitive permission pop-ups that slow people down.” Every entry also passes the staff queue, so the account does not show whether the vault or the people caught those items, and the build is still in progress.
The documentation adds costs that none of the three accounts mention:
| Cost | What the documentation says |
|---|---|
| Session length against job length | Infisical: requests fail with 403 partway through a run if the session expires; set the session lifetime a few minutes longer than the sandbox timeout. |
| Rotation reach | OpenShell: after an ordinary static update, running processes keep their old references, so new processes must be launched, unless the credential uses stable_placeholder. E2B: later matching requests use the new value without restarting sandboxes, while requests that already resolved the old value can finish with it. |
| Broker outage | Secure Agent Workspace: provider calls fail, with no fallback key in the VM. E2B bring-your-own-proxy fails closed. |
| Protocol and client fit | OpenShell resolves credentials only in HTTP traffic. E2B sends only ports 80 and 443 to the proxy. Tools with their own trust stores need the proxy’s CA added (Infisical, E2B), and clients that parse JWT-shaped tokens may need OpenShell’s documented alias. |
| Configuration drift | E2B, per the Infisical guide: a network update without egress_proxy sends traffic out directly. |
The documentation supports one operating habit: make denials loud. OpenShell emits a denied activity event and a security finding on a binding mismatch, and Infisical’s session logs mark requests that received a credential as Brokered. A team that reviews its denials can write the narrower grant Padisetti describes instead of loosening a rule to unblock work. It also pays to decide in advance what happens when the broker is down, and to size sessions to the longest job they serve.
Before you call an agent credential-free
A secret scanner is the tempting check, and scanner vendors are clear about its limits. GitGuardian’s blog notes that code an agent writes can read an environment variable at runtime, and “that manipulation happens outside what scanning tools see.” The ggshield secret scan path command scans the files and directories it is given. Its --exit-zero option, or the GITGUARDIAN_EXIT_ZERO variable, returns a success status even when incidents are found, and --exclude, --ignore-known-secrets and banlisted detectors narrow what it reports. A clean result therefore supports one narrow claim: no secret in a format the scanner recognizes turned up in the scanned paths, under those options, at that moment. It says nothing about process memory, environment variables at runtime or upstream responses.
The stronger checks are behavioral:
- Inventory what the workload holds. List every placeholder, marker, identity and scoped key, and every route that adds a credential, and for each one record what it opens, from where and for how long.
- Send a placeholder to an allowed but unbound host. Expect a refusal and a logged event, as OpenShell documents for its GitHub example. If the request is forwarded instead, check what the receiving end got before drawing a conclusion: a real credential arriving there shows that binding is missing, while a forwarded request without one does not by itself show a binding failure.
- Confirm that direct egress fails, and name what leaves anyway. DNS in the E2B setups and any traffic the broker cannot handle as HTTP are documented examples.
- Check private and metadata destinations. Make sure the policy does not open a route to other credentials over the network.
- Scan files, images and logs, and read the result narrowly. Check that a run cannot pass through a forced exit status or broad exclusions.
- Rotate any real key that was ever inside the environment. A broker does not reach copies made before it existed.
The vendors also document the limits of their own proof tools: OpenShell’s prover, as described above, and the Secure Agent Workspace’s statement that its local test suite cannot establish runtime compatibility with a cluster’s exact OpenShell build. The deployment you actually run is the one to test.
When a broker is worth it
A broker earns its cost when agents run unattended or in shared environments, read input you do not control, and call HTTP APIs with credentials whose reuse outside the session would be expensive, provided you can write endpoint- and method-level policy and keep the broker on the only route. Padisetti’s rule explains why custody comes first: “if your agent can read the credential, the credential is already gone; the only question is when.”
A broker is not enough on its own when credentials are not bound to endpoints, when a broad key sits behind a host-only rule, or when the network around the sandbox stays open. In those cases it moves the secret without bounding where a stand-in resolves, what an allowed request can do, or what else can leave. Traffic the broker cannot handle as HTTP falls outside it altogether and needs its own control. And for some tasks the simpler control is the better one: do not give the agent that credential at all.
What none of these accounts or documents measures is the running cost of the denials. After a month, how many of a team’s broker refusals were legitimate work, and how long did each new grant take to write? The teams with a month of denial logs are the ones who can answer.
Sources
- https://www.cncf.io/blog/2026/11/10/welcoming-openshell-to-the-cncf-open-governance-to-secure-agentic-ai/
- https://github.com/ai-openshell/openshell/releases/tag/v0.1.8
- https://github.com/ai-openshell/openshell/releases/tag/v0.1.9
- https://docs.nvidia.com/openshell/latest/how-it-works/policies/overview
- https://docs.nvidia.com/openshell/latest/security/best-practices
- https://e2b.dev/resources/introducing-e2b-secrets
- https://infisical.com/docs/documentation/platform/agent-vault/guides/e2b
- https://developers.openai.com/api/docs/guides/agents-api/environments/security
- https://docs.nvidia.com/openshell/how-it-works/providers/overview
- https://docs.nvidia.com/openshell/latest/about/architecture
- https://github.com/NVIDIA/OpenShell/issues/896
- https://github.com/validatedpatterns-sandbox/secure-agent-workspace/blob/main/docs/credential-isolation.md
- https://e2b.dev/docs/network/byop
- https://docs.nvidia.com/openshell/latest/how-it-works/policies/prover
- https://blog.gitguardian.com/ai-agent-security-best-practices
- https://docs.gitguardian.com/ggshield-docs/reference/secret/scan/path