Skip to main content
This page covers the credentials a sandbox gets. For the full security picture, read Security and isolation.

Safe for third parties

One switch sets the security of an environment.

On

Use it for sandboxes that other people use, for example your own end users. boat passes nothing of yours. The sandbox gets no environment variables, no secret files, no GitHub access, no boat credentials, no agent logins and no repository setup scripts. This is true whatever the section toggles say. The sandbox cannot act on your account or your other sandboxes.

Off

Use it for sandboxes that only you use. The four section toggles below apply. You choose exactly what goes in.
$BOAT_API_BASE is https://boat.dev/api/v1. Get $ENV_ID from GET /environments or boat env list.
When the switch is on, the toggle fields still show true in boat env list and the API. The effective field shows what sandboxes really get. A secret that you add to such an environment reaches no sandbox. The API answer then carries a warning.
Check what a sandbox received:
Safe for third parties and --no-env do not limit the network. For that, set a network policy.

The --no-env flag

The --no-env flag (noEnv in the API) gives the same protection to one sandbox. boat keeps this flag forever.
  • boat new --no-env works exactly like a start in an environment that is safe for third parties.
  • Use the environment when more than a few sandboxes need this protection.
  • The environment setting applies to every sandbox that uses it.
  • The environment setting stays through forks and resumes. Your code does not have to pass a flag.

What a normal sandbox receives

This table shows what a sandbox gets from your account when boat withholds nothing. boat never writes a Claude Code login file (~/.claude/.credentials.json). Claude Code gets your Claude credential from environment variables. Remote Control needs a sign-in inside the sandbox. See Your own Claude sign-in in a sandbox. Every sandbox, protected or not, also gets two neutral variables: BOAT_ID and ASCII_TOKEN. ASCII_TOKEN can act only on this one sandbox. A protected sandbox receives nothing else, except the values that you pass with env.

What a protected home contains

A protected sandbox does not start with an empty home. boat puts these defaults in every home. They are not your data, and they hold no account credentials. The credential files in the table above do not exist in a new protected sandbox.

Protect an existing sandbox

A snapshot of a normal sandbox can contain your secrets. To protect a sandbox made from such a snapshot, resume or fork it with --no-env:
Before the sandbox becomes reachable, boat removes every owner secret that the snapshot can contain:
  • The managed ~/.bashrc blocks.
  • ~/.config/gh/hosts.yml. boat also runs a gh logout.
  • ~/.git-credentials.
  • The ~/.ssh/id_* private keys.
  • The login files of the coding agents, including Claude Code’s.
  • The in-sandbox boat CLI token.
  • Every secret file that you configured.
boat keeps authorized_keys and known_hosts, so you can still reach the sandbox.

Per-sandbox variables

The request that makes a sandbox no-env also drops its per-sandbox variables (the -e values of the source). The sandbox keeps only the variables that you pass with -e on that same request:
This applies to boat fork --no-env, to boat resume --no-env on a sandbox that is not no-env yet, to boat new --from <name> --no-env, and to boat share. A sandbox that is already no-env keeps its variables. You gave them to a no-env sandbox on purpose. A fork without --no-env of such a sandbox gets them too.

Third-party credentials

The same request also removes the credentials that other tools wrote into the home of the sandbox. boat removes the secret and keeps the settings: To keep these files, add --keep-files (keepFiles: true in the API):
  • boat removes them at the first start after that request. Credentials that the user of the sandbox writes later stay in that sandbox.
  • A fork of that sandbox, and a sandbox made from a snapshot of it, loses them again at its first start, also with --keep-files.
  • A sandbox made from the share code of another account always loses them. --keep-files does not apply there.
  • boat does not search the disk. A credential in another location, or in a file that you wrote yourself, stays.
While the removal runs, SSH and desktop return a sandbox_securing error. Retry the request. This change goes one way only. The sandbox stays protected after it.
boat removes the Claude and Codex credential files even when the sandbox’s own user signed in with a personal account inside the sandbox. boat cannot tell whose files they are. If they belong to the sandbox’s user, back them up first and restore them after.

The four section toggles

When Safe for third parties is off, four separate toggles decide what a sandbox receives. Each toggle is a section in the dashboard. Open a section to edit what is inside it.

AI credentials

Two fields decide which AI credentials the environment’s sandboxes get.