Skip to content

Warn that .dev.vars.example entries become deployed secrets (Deploy button)#31989

Draft
ddyy wants to merge 1 commit into
cloudflare:productionfrom
ddyy:deploy-button-dev-vars-warning
Draft

Warn that .dev.vars.example entries become deployed secrets (Deploy button)#31989
ddyy wants to merge 1 commit into
cloudflare:productionfrom
ddyy:deploy-button-dev-vars-warning

Conversation

@ddyy

@ddyy ddyy commented Jul 10, 2026

Copy link
Copy Markdown

Summary

Adds a caution callout to the Deploy to Cloudflare buttons page, in the "Worker environment variables and secrets" section, warning that every uncommented entry in .dev.vars.example (or .env.example) is presented as a required secret during deployment and stored on the deployed Worker.

The page documents that secrets come from .dev.vars.example, but not the consequence. That file is conventionally a local-development template. Nothing reads it directly; developers copy it to a gitignored .dev.vars and edit the copy. So authors pre-fill it with dev-friendly values and can unknowingly ship them to production. In my case this deployed an auth-bypass flag and localhost URLs to every one-click deployment of my app. Writeup: https://daniel-yang.com/writing/cloudflare-deploy-button-disabled-auth/

Closes #31988.

Documentation checklist

Add a caution callout to the Deploy to Cloudflare button docs noting that
every uncommented entry in .dev.vars.example is prompted as a required secret
and stored on the deployed Worker. Because the file is conventionally a
local-dev template that developers copy and edit, authors can unknowingly
ship dev-only values (auth-bypass flags, localhost URLs, placeholders) to
production. Closes cloudflare#31988.
@github-actions github-actions Bot added product:workers Related to Workers product size/xs labels Jul 10, 2026
@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review

✅ No issues found in commit 3d9997d.

Code Review

This code review is in beta and may not always be helpful — use your judgment.

No code review issues found.

Conventions

No convention issues found.

Style Guide Review

No style-guide issues found.

Commands

Only codeowners can run commands. Post a comment with the command to trigger it.

Command Description
/review Runs a review now. Incremental if a prior review exists, full if not.
/full-review Re-reviews the entire PR diff from scratch, ignoring incremental history. Useful after a rebase, when you want a fresh review, or if the bot gets out of sync and reports issues that no longer exist.
/ignore-review-limit Permanently lifts the 2-review automatic limit for this PR. Future pushes will trigger reviews as normal.
/disable-auto-review Stops automatic reviews from triggering on future pushes to this PR. Codeowners can still run /review or /full-review manually.

@MattieTK

Copy link
Copy Markdown
Member

We're going to look at fixing this in the button itself rather than documenting it (as that's something few people will look to cc @chythram05

@MattieTK
MattieTK marked this pull request as draft July 21, 2026 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:workers Related to Workers product size/xs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deploy button docs should warn that .dev.vars.example becomes a production secret prompt

7 participants