The computer
Each run gets a Linux sandbox that no other run uses. It starts empty except for what the run was given: the repository for a repository run, and nothing for an agent run. When the run ends the sandbox is destroyed, along with any saved image of it and its storage. The container runs with every Linux capability dropped, cannot gain new privileges, and has fixed limits on CPU, memory and the number of processes. Setup commands you wrote yourself, insensei.yaml or in a definition, may need to install system packages. They run in a computer that has five capabilities for that: CHOWN, DAC_OVERRIDE, FOWNER, SETUID and SETGID. None of them touches the network or mounts. That computer is saved as an image and switched off, and the work runs in a new computer made from the image, with every capability dropped.
When a run waits for a person, the computer is saved as an image and switched off. It is restored when you answer. An image kept for a waiting run is removed if you stop the run.
Repository tokens
The token you connect a repository with is used in a separate helper container, for the clone and the push. That container is gone before Sensei’s container starts. Sensei’s commands run in a container that never has the token, and the token is kept out of the clone’s git configuration. Run events are scrubbed before they are stored: the repository token and authorization headers are replaced before a line reaches the timeline.Services
A service a run starts, such as a database, is an image from somewhere else, started as it comes. It runs in a sandbox of its own with its own limits on CPU, memory and processes, and it cannot gain new privileges. It is on a network made for this run, which no other run is on, and it has none of the run’s storage, so it cannot read the repository. It is destroyed with the run.Settings and secrets for runs
A setting is a plain value. It is in the environment of every command of a run, and it is shown on the project and on the run. A secret is stored encrypted and never returned. It is given to the setup commands of a run that names it, and to nothing else. The work then happens in a new computer where no setup process is running and no command is given the secret. Every value of a secret a run holds is replaced in what the run prints, before the model reads it and before it reaches the timeline. A file a setup command writes stays in the computer the work runs in. If a setup command writes a secret into a file, the work’s commands can read that file. If the file is one the repository tracks, the change is not kept, shown or pushed, and the run fails and names the secret. See Services, settings and secrets.Tool secrets
The secret you connect a tool with never enters a sandbox. When an agent callsstripe.refund, the request leaves the sandbox as a request for that action, and the runs service makes the call from outside with the secret. Code the agent runs in the sandbox cannot read a secret it never had.
Tool addresses must be https and must resolve to public addresses. The check is repeated on every request, redirects included, so a tool address cannot be used to reach a private network.
Definitions
A definition holds no secrets.sensei push refuses a definition with a key such as api_key or token, or with text that looks like a credential in its instructions or step inputs. The message tells you to connect the tool on the project.
Your key
The key that starts a run is used for the model calls the run makes on your behalf. It is held encrypted for the length of the run and cleared when the run ends. Your routing rules for that key decide which model answers. See Choose the model.Text from other people
Review comments and check output on a pull request are written by other people. Sensei is given them marked as review to weigh. They do not change the task and are not followed as instructions.Callbacks
A run can post its status to acallback_url when it waits or finishes. The address must be https and public, and it is checked when you give it and again when it is called.