Sinatra Docs
Configuration

Workspace and repository secrets

Share encrypted credentials across a workspace or limit them to one repository, with approved destination hosts.

Use repository secrets for API tokens needed by setup commands, tests, or the agent. They are encrypted and scoped to the workspace and repository. Keep ordinary, non-secret configuration in sandbox.env; that field is committed plaintext.

Without repository environments enabled, repository secrets are injected when the sandbox is created, only if its repository is already known. If an agent chooses a repository later, start a new task with an explicit repository when its setup or tests require those secrets. With repository environments enabled, activating a connected repository publishes its committed environment into the existing task sandbox. Workspace secrets do not require a selected repository in either path.

Workspace secrets

An owner or admin can open Settings → Secrets to define credentials shared by every new task sandbox in the workspace, even when no repository has been selected. Members can view the names, allowed hosts, header settings, and last four characters, but cannot read back or change the saved value. Workspace secrets are not supplied to repository-preparation sandboxes.

Use the same name, value, allowed-host, and advanced header fields described below. Each workspace can hold up to 50 workspace secrets, independently of each repository's limit. Allowed hosts are required when saving a workspace secret. Owners and admins can rotate values, edit hosts and header settings, or delete secrets from this page.

With repository environments enabled, workspace secrets are also loaded when the task's environment is republished, without adding them to a repository's saved configuration. Proxy-disabled local development injects plaintext values instead.

Name precedence

When names overlap, the order from lowest to highest priority is workspace secrets → repository secrets → .sinatrarc sandbox.env → Sinatra-managed platform variables. A repository secret therefore overrides a workspace secret with the same name. Reserved names cannot be defined as secrets and are never injected from secret storage.

Add a secret

An owner or admin can open Repositories → repository → Access & secrets and add:

  1. Name: the environment variable your tool reads, such as SERVICE_API_TOKEN.
  2. Value: the credential. The saved value cannot be read back from the dashboard; only its last four characters are shown.
  3. Allowed hosts: the destinations permitted to receive it, such as api.example.com. Use hostnames without a URL scheme, port, or path. In Sinatra, *.example.com matches both example.com itself and its subdomains. Use an exact hostname when you need a narrower scope.

A repository can hold up to 50 secrets, with up to 20 host patterns per secret and a maximum value size of 64 KiB. Names use letters, digits, and underscores, and cannot start with a digit. Sinatra-managed credential names, system and proxy variables, and names beginning with SINATRA_ or DAYTONA_ are reserved.

How the credential reaches the service

In a hosted proxied sandbox, a workspace or repository secret's environment variable contains a placeholder. Your command sends that placeholder in an HTTP request header; the proxy replaces it with the real credential only for an approved host. Requests that try to use the protected credential elsewhere are rejected.

For example, configure SERVICE_API_TOKEN with allowed host api.example.com and leave the advanced header field empty. A tool can then send:

curl --fail --show-error \
  -H "Authorization: Bearer $SERVICE_API_TOKEN" \
  https://api.example.com/status

By default, substitution happens in whichever request header contains the placeholder. Under Advanced: pin header and prefix, you can set the outgoing credential header and prefix, such as authorization and Bearer (including the trailing space), or x-api-key with an empty prefix.

These secrets are for HTTP header authentication. A tool that needs the raw secret locally to sign data, or expects it in a request body or query parameter, cannot treat a placeholder as the original value. An allowed host also does not bypass the proxy's private-address restrictions.

Change or remove a secret

Owners and admins can edit allowed hosts and header settings, rotate the value, or delete the secret. A legacy secret with no allowed hosts blocks proxied sandbox creation until an owner or admin adds approved hosts; its encrypted value is retained for repair. Members can view secret metadata but cannot reveal, edit, or delete the value. Proxy-disabled local development continues to inject repository-secret values directly.

In hosted proxied sandboxes, workspace and repository secrets are resolved without credential caching. After a deletion or an allowed-host change is saved, the next request checks the current secret and hosts, including in already-running sandboxes. Deletion prevents the placeholder from resolving; narrowing hosts rejects subsequent use on removed hosts. Requests already authorized by the proxy may still finish. This does not revoke plaintext values already injected into proxy-disabled local development processes.

Adding a name that already exists points you to Rotate instead of replacing it. The request-specific Supply access and Replace access flows can still replace a secret. When supplying access, the allowed hosts must include the request's target; a mismatch is shown beside Allowed hosts. Saving makes the credential available on the next agent run and does not restart the task. Model provider keys and personal model subscriptions have their own Settings connections. Do not try to replace them through repository secrets.