Engineering note
Sealing secrets per project, not per workspace
Environment variables used to be a workspace-wide convenience. Now every secret is encrypted per project with bound context, rotated independently and never returned in plaintext.
Environment variables are the quietest part of a deployment. They are also the part most likely to turn a small mistake into a cross-project incident. A shared DATABASE_URL is convenient right up until a preview environment reads it.
This release changes the model: secrets are sealed per project, bound to their workspace and project identifiers, and decrypted only inside the process that needs them.
The old model
Previously, workspace-level variables were inherited by every project. That made onboarding simple and isolation difficult. A compromised preview, a misconfigured build or a stray console.log could expose credentials that belonged to a different service entirely.
We wanted three properties:
- Isolation — a project can only decrypt its own secrets.
- Context binding — a ciphertext moved to another project fails to decrypt.
- Auditability — every read is attributable to a deployment or a user action.
Envelope encryption with bound context
Each secret is encrypted with AES-256-GCM. The project and workspace IDs are passed as additional authenticated data, which means the ciphertext is cryptographically tied to its location. Copying a sealed value into another project does not produce a readable secret; it produces an authentication failure.
seal(plaintext, key, aad = workspace_id || project_id)
open(ciphertext, key, aad = workspace_id || project_id)
The data encryption key is wrapped by a workspace key, and the workspace key is wrapped by the platform root key. Rotation can happen at any layer without re-encrypting every value at once.
What the dashboard shows
The console never returns plaintext secrets. It shows a masked value, a fingerprint and the last time the secret was read by a deployment. If you need the value locally, you pull it through the CLI into your own environment:
$ weond env pull --project api
› 8 secrets written to .env.local
› values are never printed to stdout
Preview environments get their own sealed copies. Build sandboxes receive only the secrets declared for the build step, and egress policy is enforced before the container starts.
A secret that cannot be read by the wrong service is worth more than a secret that is rotated often.
Migration and compatibility
Existing workspace variables are migrated lazily: the first deployment after the upgrade re-seals each value under the new project context. Until then, both formats are accepted, but new writes always use the sealed format.
The migration is intentionally boring. No downtime, no dashboard reset, no copy of production credentials into a spreadsheet. Security improvements should not require a maintenance window.
If you are rolling out a similar change, start with the read path: make plaintext reads impossible first, then migrate the write path. The rest is bookkeeping.