Exposure
Environment variable names do not match
Make sure the variable names used in code match the names configured in the hosting environment.
Why it matters
A typo or a missing prefix silently produces undefined. The feature fails only in production, often after launch.
Checking the names once prevents hours of debugging where the code looks correct.
How to fix it
-
List the variable names the code reads
-
Compare them with the hosting settings
-
Fail loudly at startup when a required variable is missing
Prompt for an AI assistant
Copy the text below and paste it into an AI assistant.
You are the person improving this website. Check the item below and fix it if it applies to the site. Item: Environment variable names do not match Summary: Make sure the variable names used in code match the names configured in the hosting environment. Steps: 1. List the variable names the code reads 2. Compare them with the hosting settings 3. Fail loudly at startup when a required variable is missing References: - The Twelve-Factor App: Config (https://12factor.net/config) Constraints: - Keep the existing design and tone of voice. - Show the file or section you changed and the suggested final wording. - Do not decide ambiguous points alone; give options and a recommendation. - Do not change anything outside the listed item.
Related checks
-
.env files with secrets in the repository
Do not commit .env files that contain real secrets. Commit an example file with empty values instead.
-
TypeScript configuration
Keep strict type checking on, and make sure the config matches the framework you use.
References
-
The Twelve-Factor App: Config
The Twelve-Factor App(Reference)
Check your site now
Enter a URL and find what is missing before launch, for free.
Run audit