Rules
- Secrets only from the environment or a secret manager.
- Validate types and presence at process start.
- Commit
.env.example, never.env. - Different webhook URLs per environment (dev/stage/prod bots).
Tooling
Use the .env validator and secret strength tools while drafting examples.
Cloudflare Workers
Use wrangler secret put for tokens. Do not put secrets in wrangler.toml [vars].