docs(sandbox): document sandbox environment variables - #667
Open
tembo[bot] wants to merge 2 commits into
Open
Conversation
Add a dedicated page covering workspace environment variables/secrets: how to add them (single and bulk .env import) in Settings > Sandbox, where they're injected (agent commands, hooks, snapshot setup scripts, MCP servers and integrations), security (encrypted at rest, write-only in the dashboard, workspace-scoped), constraints (unique keys, reserved TEMBO_ variables), and how to remove them. Also link the new page from custom-dependencies and snapshots, which already referenced sandbox environment variables without a target.
tembo
Bot
requested review from
Coleary005,
DarrenBaldwin07 and
benja
as code owners
July 31, 2026 08:07
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Contributor
Author
|
Requesting review from @benja who has experience with the following files modified in this PR:
|
Contributor
|
@tembo don't use em dash |
Replace em dashes with colons, commas, and periods per review feedback. Co-authored-by: Benjamin <[email protected]>
Contributor
Author
done, @benja. removed all em dashes from the environment variables page and pushed to the same branch, so pr #667 is updated. what changed:
verified there are no remaining em dashes across all files in the pr, docs.json is still valid json, and the branch has no merge conflicts with main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a dedicated Environment Variables page under Sandbox docs. Sandbox environment variables (workspace secrets) were referenced in several existing pages but had no page of their own explaining how to configure or use them — this closes that gap.
Docs added/updated
features/sandbox/environment-variables.mdx— how to add variables (single + bulk.envimport) in Settings > Sandbox, where they're injected, security posture, constraints, and how to remove them.docs.json.features/sandbox/custom-dependencies.mdxandfeatures/snapshots.mdxalready mentioned sandbox environment variables — both now link to the new page instead of dangling.Codepaths covered (verified against source in the monorepo)
OrganizationSecret(packages/database/schema.zmodel) —valueis@encrypted(encrypted at rest) and@omit(never returned in reads → write-only in UI); unique per(key, organizationId); scoped by@@allow('all', auth().orgId == organizationId).apps/api/src/db/index.ts(getEncryptionKey, ZenStackencryptionextension).apps/web/components/sandbox/environment-variables/*(single + bulkKEY=valueimport, hidden values, delete) mounted on the Settings > Sandbox page (apps/web/app/[slug]/(sidebar)/settings/sandbox).envVarsForOrganization(apps/api/src/agent/sandbox/utils.ts) used byagent_runandstart_terminal_session;envVarsForGoldenBuild(apps/api/src/services/hypervisor/goldenEnv.ts) for snapshot builds. ReservedTEMBO_*variables andTRIGGER_PAYLOADtake precedence over org secrets.apps/api/src/agent/sandbox/temboConfig.ts(postClone/prePushrun with these env vars).Key knowledge gaps addressed
.envimport flow.TEMBO_/TRIGGER_PAYLOADnames, rotate-by-recreate.Documentation-only change; no code paths modified. No merge conflicts with
main.Note
Low Risk
Documentation-only change with no application code or runtime behavior modified.
Overview
Adds a dedicated Environment Variables doc under Sandbox and wires it into the docs nav.
The new page explains how to create workspace secrets in Settings > Sandbox (single key/value or bulk
.envimport), where Tembo injects them (agent runs, hooks, snapshot setup scripts, MCP/integrations), and the security/constraints model (encrypted at rest, write-only values, unique keys, rotate-by-recreate, reservedTEMBO_*/TRIGGER_PAYLOADnames).custom-dependencies.mdxandsnapshots.mdxnow link to this page where they already told users to use sandbox env vars instead of committing secrets.Reviewed by Cursor Bugbot for commit e0205c9. Bugbot is set up for automated code reviews on this repo. Configure here.