Skip to content

Commit 0b42160

Browse files
authored
Merge pull request #24709 from dvdksn/fix/issue-24678-credentials-env-vars
Clarify that credential env vars are host-side
2 parents 2b8be5d + 92cd515 commit 0b42160

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

content/manuals/ai/sandboxes/security/credentials.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,20 @@ $ sbx run claude
126126
The proxy reads the variable from your terminal session. See individual
127127
[agent pages](../agents/) for the variable names each agent expects.
128128

129+
> [!NOTE]
130+
> These environment variables are set on your host, not inside the sandbox.
131+
> Sandbox agents are pre-configured to use credentials managed by the
132+
> host-side proxy. For custom environment variables not tied to a
133+
> [supported service](#supported-services), see
134+
> [Setting custom environment variables](../faq.md#how-do-i-set-custom-environment-variables-inside-a-sandbox).
135+
129136
## Best practices
130137

131138
- Use [stored secrets](#stored-secrets) over environment variables. The OS
132139
keychain encrypts credentials at rest and controls access, while environment
133140
variables are plaintext in your shell.
134-
- Don't set API keys manually inside the sandbox. Credentials stored in
135-
environment variables or configuration files inside the VM are readable by
136-
the agent process directly.
141+
- Don't set API keys manually inside the sandbox. Sandbox agents are
142+
pre-configured to use proxy-managed credentials.
137143
- For Claude Code and Codex, OAuth is another secure option: the flow runs on
138144
the host, so the token is never exposed inside the sandbox. For Claude Code,
139145
use `/login` inside the agent. For Codex, run `sbx secret set -g openai --oauth`.

0 commit comments

Comments
 (0)