Environment Variables Security
Last updated on November 23, 2026
Environment variables keep values out of your repository, not away from the code that runs on a station. This page explains who can read what.
Station Boundary
A phase or a plug receives the secrets it declares in clear, so it can use them. Code that can use a secret can also print it or send it elsewhere.
The people who can read a station's secrets are the people who can put code on it:
- Anyone who can merge to the branch that deploys to it
- Anyone who can push or roll back a build to it
- Anyone with an OS login on the machine
Every procedure on a station runs as the same OS user, and can read the files of the others. Treat all procedures on one station as one trust domain.
The station's encrypted cache protects a copied file or a backup. It does not protect against code running on the station.
Environment Isolation
Each build only receives the secrets of its own environment:
| Build | Receives |
|---|---|
| Production | Production secrets, and the station's own secrets |
| Preview | Preview secrets only |
| A build waiting to be replaced by another environment | Config values only |
A preview build on a production station never receives that station's secrets. Keep production and preview credentials separate so this isolation holds.
Deployment Restrictions
Station values count as production. Pushing, promoting or rolling back a build to a station that receives production secrets requires:
- A user login with the Developer role or above. API keys are refused.
- For a member of access groups, a station in one of their groups.
Editing Secrets, station values or anything that targets production requires Admin. A developer can deploy code to a production station, but cannot redirect MES_URL to capture MES_TOKEN.
Automatic deployments from your production branch are not gated by role. Protect that branch in your git host.
The check runs when a build is pushed. A secret added to a station later reaches the build already running there, so check the station's deployment history first.
Access Groups and Suppliers
A station in an access group receives the same values as any other station. A supplier running your procedure on their own bench receives the procedure and Shared secrets of that environment.
To keep a credential away from a supplier, set it on your own stations only, not at the procedure or Shared level.
Members of access groups below Admin:
- Deploy production builds only to their groups' stations
- Link procedures only to their groups' stations
- Create stations only inside their groups
- Cannot move a station into or out of a group
A Viewer restricted to access groups sees the Shared values, those of the procedures they can see and those of their groups' stations, never those of another group's station or procedure.
Config Is Not Confidential
Every Config value is shown on the runs that used it, to everyone who can read runs, suppliers included. If you would not paste a value in a run report, store it as a Secret.
The dashboard flags a Config whose key looks like a secret with Needs Attention.
Masking
Secret values of 8 characters or more are replaced by •••• in everything the CLI sends or prints. Masking catches a token printed in a traceback. It does not catch a value that is shorter, encoded, split or sent elsewhere.
Storage
| Config | Secret | |
|---|---|---|
| Database | Encrypted (AES-256-GCM) | Encrypted (AES-256-GCM) |
| Dashboard and CLI | The value | A digest only |
| Run records | The value | The version only |
| Station | Encrypted cache | Encrypted cache |
A Secret is never sent back to a browser or the CLI after it is saved. To change one, use Rotate in the dashboard or tofupilot env update.
How is this guide?