NEXTJS_SAFE_NEXT_PUBLIC_ENV_USAGE
Conformance is available on Enterprise plans
The use of environment variables may warrant a review from other developers to ensure there are no unintended leakage of environment variables.
When enabled, this rule requires that all usage of must be included in the allowlist.
This rule will catch any pages or routes that are using environment variables.
In the following example, we are using a local variable to initialize our analytics service. As the variable will be visible in the client, a review of the code is required, and the usage should be added to the allowlist.
If you hit this issue, include the entry in the Conformance allowlist file.
Was this helpful?