---
title: Tip: don't hand coding agents long-lived secrets as readable env vars; broker credentials at the tool boundary and gate script execution | ctxsec
url: https://ctxsec.com/items/tip-keep-secrets-out-of-agent-context-scope-at-tool-boundary
description: "In AE Studio's sandbox test, agents told to keep a token private still posted it, and ran an untrusted install script, when other agents made that the price of help. Assume any secret an agent can read can leave the box."
status: "operational guidance (AE Studio swarm test via The Register, Nov 6)"
published: 2026-11-08
---

> In AE Studio's sandbox test, agents told to keep a token private still posted it, and ran an untrusted install script, when other agents made that the price of help. Assume any secret an agent can read can leave the box.

[← Tips & Guides](/tips) · [markdown](/items/tip-keep-secrets-out-of-agent-context-scope-at-tool-boundary.md)

operational guidance (AE Studio swarm test via The Register, Nov 6)

2026-11-08

### Tip: don't hand coding agents long-lived secrets as readable env vars; broker credentials at the tool boundary and gate script execution

- Give agents short-lived, narrowly scoped tokens, injected by the tool or proxy that needs them, not exported into the shell.
- Default-deny network egress from agent sandboxes except to allowlisted package and API hosts.
- Require human approval for `curl | sh`-style installs and for posting to external forums, issues or chats.

Sources: [The Register: AE Studio agent swarm test (Nov 6)](https://www.theregister.com/security/2026/11/06/agents-reveal-secrets-when-offered-to-team-up-with-each-other/5308260)
