Skip to content

Commit f278dbf

Browse files
committed
sandboxes: clarify security implications for auth methods
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
1 parent 9cd0887 commit f278dbf

2 files changed

Lines changed: 19 additions & 3 deletions

File tree

content/manuals/ai/sandboxes/get-started.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ Follow these steps to run a sandbox with Claude Code:
4646
2. Restart Docker Desktop so the daemon picks up the new environment variable.
4747

4848
Alternatively, you can skip this step and authenticate interactively when
49-
Claude Code starts. If no credentials are found, you'll be prompted to log
50-
in. Note that interactive authentication requires you to authenticate for
51-
each workspace separately.
49+
Claude Code starts. Interactive authentication is less secure and requires
50+
you to re-authenticate for each workspace. See
51+
[Credential security](workflows.md#credential-security) for details.
5252

5353
2. Create and run a sandbox for Claude Code for your workspace:
5454

content/manuals/ai/sandboxes/workflows.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,22 @@ To preserve a configured environment, create a [Custom template](templates.md).
117117

118118
## Security considerations
119119

120+
### Credential security
121+
122+
Set API keys as environment variables on the host rather than authenticating
123+
interactively inside a sandbox. When you set credentials on the host, Docker
124+
Sandboxes proxies API calls from the sandbox through the host daemon, so the
125+
agent never has direct access to the raw key.
126+
127+
When you authenticate interactively, credentials are stored inside the sandbox
128+
where the agent can read them directly. This creates a risk of credential
129+
exfiltration if the agent is compromised or behaves unexpectedly.
130+
131+
Interactive authentication also requires you to re-authenticate for each
132+
workspace separately.
133+
134+
### Workspace trust
135+
120136
Agents running in sandboxes automatically trust the workspace directory without
121137
prompting. This enables agents to work freely within the isolated environment.
122138

0 commit comments

Comments
 (0)