Skip to main content

env-validation

Validates environment variables on server start and before builds, ensuring clear error messages for missing or invalid configurations.

Install this skill

or
0/100

Security score

The env-validation skill was audited on Feb 9, 2026 and we found 47 security issues across 4 threat categories. Review the findings below before installing.

Categories Tested

Security Issues

medium line 77

Template literal with variable interpolation in command context

SourceSKILL.md
77const green = (s: string) => `\x1b[32m${s}\x1b[0m`;
medium line 78

Template literal with variable interpolation in command context

SourceSKILL.md
78const yellow = (s: string) => `\x1b[33m${s}\x1b[0m`;
medium line 79

Template literal with variable interpolation in command context

SourceSKILL.md
79const red = (s: string) => `\x1b[31m${s}\x1b[0m`;
medium line 80

Template literal with variable interpolation in command context

SourceSKILL.md
80const dim = (s: string) => `\x1b[2m${s}\x1b[0m`;
medium line 81

Template literal with variable interpolation in command context

SourceSKILL.md
81const bold = (s: string) => `\x1b[1m${s}\x1b[0m`;
medium line 123

Template literal with variable interpolation in command context

SourceSKILL.md
123console.log(dim(` Environment: ${environment}\n`));
medium line 138

Template literal with variable interpolation in command context

SourceSKILL.md
138console.log(dim(` ✓ ${path.relative(projectDir, file.path)}`));
medium line 163

Template literal with variable interpolation in command context

SourceSKILL.md
163console.log(dim(` Found ${configFiles.length} config files:\n`));
medium line 176

Template literal with variable interpolation in command context

SourceSKILL.md
176console.log(green(` ✓ ${relativePath}`));
medium line 182

Template literal with variable interpolation in command context

SourceSKILL.md
182console.log(dim(` ○ ${relativePath} (feature disabled)`));
medium line 185

Template literal with variable interpolation in command context

SourceSKILL.md
185console.log(red(` ✗ ${relativePath}`));
medium line 199

Template literal with variable interpolation in command context

SourceSKILL.md
199console.log(red(` ${file}:`));
medium line 202

Template literal with variable interpolation in command context

SourceSKILL.md
202console.log(red(` ${message}\n`));
medium line 288

Template literal with variable interpolation in command context

SourceSKILL.md
288if (new RegExp(`^${envVar}\\s*=`, "m").test(content)) {
medium line 313

Template literal with variable interpolation in command context

SourceSKILL.md
313console.log(yellow(` ⚠ ${name}`));
medium line 314

Template literal with variable interpolation in command context

SourceSKILL.md
314console.log(dim(` defined in: ${files.join(", ")}`));
medium line 322

Template literal with variable interpolation in command context

SourceSKILL.md
322console.log(` Configs validated: ${green(String(validated.length))}`);
medium line 324

Template literal with variable interpolation in command context

SourceSKILL.md
324` Validation errors: ${errors.length > 0 ? red(String(errors.length)) : green("0")}`,
medium line 327

Template literal with variable interpolation in command context

SourceSKILL.md
327` Unused env vars: ${unusedVars.length > 0 ? yellow(String(unusedVars.length)) : green("0")}`,
low line 69

Access to .env file

SourceSKILL.md
69* 4. Warns about env variables in .env files that aren't used by any config
low line 100

Access to .env file

SourceSKILL.md
100// Patch process.env to track access
low line 102

Access to .env file

SourceSKILL.md
102const originalEnv = process.env;
low line 111

Access to .env file

SourceSKILL.md
111process.env = new Proxy(originalEnv, handler);
low line 121

Access to .env file

SourceSKILL.md
121const environment = args.environment ?? process.env.NODE_ENV ?? "development";
low line 122

Access to .env file

SourceSKILL.md
122(process.env as Record<string, string>).NODE_ENV = environment;
low line 126

Access to .env file

SourceSKILL.md
126// Second param `dev` tells loadEnvConfig to load .env.development files
low line 142

Access to .env file

SourceSKILL.md
142console.log(dim(" No .env files found"));
low line 206

Access to .env file

SourceSKILL.md
206// Find unused env variables (in .env files but not referenced by configs)
low line 276

Access to .env file

SourceSKILL.md
276// Find vars in .env files but not referenced by configs
low line 306

Access to .env file

SourceSKILL.md
306" These variables are defined in .env files but not used by any config:\n",
medium line 355

Access to .env file

SourceSKILL.md
355Use the `env:validate` and `env:validate:prod` scripts to validate all your configs (`config.ts` files in `src/lib/*/`) against your `.env` files.
medium line 361

Access to .env file

SourceSKILL.md
3611. Loads `.env` files using Next.js's `loadEnvConfig` (respects the same load order as Next.js)
medium line 365

Access to .env file

SourceSKILL.md
3655. Warns about variables defined in `.env` files but not used by any config
low line 375

Access to .env file

SourceSKILL.md
375✓ .env.local
low line 376

Access to .env file

SourceSKILL.md
376✓ .env.development
low line 390

Access to .env file

SourceSKILL.md
390Did you correctly set all required environment variables in your .env* file?
low line 408

Access to .env file

SourceSKILL.md
408✓ .env.local
low line 409

Access to .env file

SourceSKILL.md
409✓ .env.development
low line 421

Access to .env file

SourceSKILL.md
421These variables are defined in .env files but not used by any config:
low line 424

Access to .env file

SourceSKILL.md
424defined in: .env.local
medium line 77

Hex-encoded characters

SourceSKILL.md
77const green = (s: string) => `\x1b[32m${s}\x1b[0m`;
medium line 78

Hex-encoded characters

SourceSKILL.md
78const yellow = (s: string) => `\x1b[33m${s}\x1b[0m`;
medium line 79

Hex-encoded characters

SourceSKILL.md
79const red = (s: string) => `\x1b[31m${s}\x1b[0m`;
medium line 80

Hex-encoded characters

SourceSKILL.md
80const dim = (s: string) => `\x1b[2m${s}\x1b[0m`;
medium line 81

Hex-encoded characters

SourceSKILL.md
81const bold = (s: string) => `\x1b[1m${s}\x1b[0m`;
low line 17

External URL reference

SourceSKILL.md
17- URL: https://fullstackrecipes.com/recipes/env-validation
low line 48

External URL reference

SourceSKILL.md
48bunx --bun shadcn@latest add https://fullstackrecipes.com/r/validate-env.json
Scanned on Feb 9, 2026
View Security Dashboard
Installation guide →