How Secrets Work
When a sandbox is created with a project:- The server decrypts the project’s secrets
- Secrets are sent to the worker and sealed into opaque tokens (
osb_sealed_...) - Inside the sandbox, env vars contain sealed tokens — never real values
- When the sandbox makes an outbound HTTPS request, the MITM proxy intercepts it and replaces sealed tokens with real values in headers and request body
- The real secret only exists in the proxy’s memory on the host, never inside the VM
Creating a Project
Project.create(opts)
Promise<ProjectInfo>
Listing Projects
Project.list(opts?)
Returns: Promise<ProjectInfo[]>
Getting a Project
Project.get(projectId, opts?)
UUID of the project.
Promise<ProjectInfo>
Updating a Project
Partial updates — only the fields you pass are changed.Project.update(projectId, opts)
UUID of the project to update.
Promise<ProjectInfo>
Deleting a Project
Project.delete(projectId, opts?)
Returns: Promise<void>
Setting a Secret
Project.setSecret(projectId, name, value, opts?)
UUID of the project.
Secret name (used as the env var name in sandboxes).
Secret value (encrypted at rest, never returned by API).
Promise<void>
Listing Secrets
Project.listSecrets(projectId, opts?)
Returns: Promise<string[]>
Deleting a Secret
Project.deleteSecret(projectId, name, opts?)
Returns: Promise<void>
Creating a Sandbox with a Project
Pass theproject option to Sandbox.create() to inherit the project’s config and secrets:
timeout, envs, cpuCount, etc.) override project defaults.
ProjectInfo Type
| Property | Type | Description |
|---|---|---|
id | string | Project UUID |
orgId | string | Organization UUID |
name | string | Project name |
template | string | Default template |
cpuCount | number | Default vCPU count |
memoryMB | number | Default memory in MB |
timeoutSec | number | Default timeout in seconds |
egressAllowlist | string[] | Allowed egress hosts |
createdAt | string | ISO 8601 timestamp |
updatedAt | string | ISO 8601 timestamp |