Catch missing environment variables before they hit production. SARIF reports, AWS SSM validation, and smart fallback detection — all in one CLI tool.
npm install ./path/to/file.tgz
A complete toolkit for environment variable hygiene — from local dev to production CI.
Generate machine-readable SARIF reports that plug directly into the GitHub Security tab — zero configuration needed.
Validate that every env var exists in Parameter Store or Secrets Manager before you deploy.
Parse export statements from shell scripts and include them in your scan automatically.
Automatically distinguishes between warnings (vars with fallbacks) and errors (vars that will crash). Prioritise what matters.
The --ci flag exits non-zero on errors, making it a drop-in gate for any pipeline.
Surface every env var reference — including known runtime vars — for full visibility when you need it.
Free nails the basics. Pro is for teams that need SARIF, AWS validation, and shell-script driven env sources.
| Capability | EnvGuard Free | EnvGuard Pro |
|---|---|---|
| Source availability | Fully open source under MIT | Distributed via npm with protected sources |
| Custom shell env files | Not supported (reads `.env` inputs only) | `envFiles` lets you import reusable `.sh` snippets like `set-env.sh` |
| SARIF output | — | `--format sarif` integrates with GitHub Security |
| AWS validation | — | `--aws`, `--aws-deep`, profiles, and prefixes for SSM + Secrets |
Stick with the free edition when you only need local `.env` analysis. Go Pro when you want CI-ready outputs, AWS guardrails, or the ability to load environment variables from curated shell scripts that the rest of your org already uses.
{
"envFiles": ["set-env.sh", "another-env.sh"]
}
$ envguard scan --env-files set-env.sh
Great for quickly checking the obvious env blocks inside serverless.yml.
DATABASE_URL.
Purpose-built for teams that rely on AWS infrastructure-as-code and want total coverage.
aurora.host) and confirms the actual key that will load in prod.
From install to insight in seconds.
One npm install and you're set — global or project-local.
Drop a .envguardrc.json in your project root or add options to package.json.
Run envguard scan. It statically analyses every file in your project.
Errors and warnings are reported — fix, ignore, or push straight to GitHub Security via SARIF.
EnvGuard Pro can install Git hooks that automatically run
envguard scan --ci
before each commit or push, catching environment variable issues before they reach your repository.
npx envguard scan --ci (plus any flags passed via --scan-args) automatically before the Git operation.--no-verify.uninstall-hook will only remove hooks that were created by EnvGuard. If a hook exists but was written by another tool, it will be left untouched.
EnvGuard doesn't just list every variable — it tells you which ones will crash and which ones are safely handled.
AWS_REGION filtered out by default.Don't guess. Confirm that every parameter and secret your app needs actually exists in AWS — before deploy day.
Validates top-level secrets and, with --aws-deep, checks nested JSON keys too.
Auto-discovers SSM paths from your serverless.yml or uses a prefix for fallback scanning.
Picks up AWS_REGION and profile settings automatically — or override via flags.
One flag. Machine-readable output that plugs directly into GitHub's Security tab for compliance tracking — no extra tooling required.
--format sarif --output results.sarifReal SARIF views from GitHub — click any image to zoom.
Pro is a closed-source extension of an open-source core. Here's exactly what that means.
The core scanner is fully open at github.com/szlaskidaniel/envguard. Audit it freely.
Zero data collection. No analytics, no phone-home. The only network calls are explicit AWS SDK operations when you opt in.
Published under the @danielszlaski npm scope with verified ownership.
Not comfortable? Audit network traffic or run it in a sandboxed environment. Full flexibility is yours.
Quick answers to common questions about EnvGuard Pro.
This tool is intended for professionals. Remember to back up your data before using it.
--aws / --aws-deep?Required IAM Permissions:
ssm:GetParameter — for SSM Parameter Store validation (--aws)secretsmanager:DescribeSecret — for Secrets Manager validation (--aws)secretsmanager:GetSecretValue — required for --aws-deep (reads the secret JSON to validate nested keys like host and port)Use --aws-deep to validate that the referenced nested keys actually exist within the secret JSON.
We do not store or log retrieved secret values — they are used only in-memory to check presence and report validation results.
EnvGuard Pro is distributed with obfuscated sources to protect intellectual property while keeping full functionality. The open-source core is available on GitHub.
No. There is no telemetry or data collection. The only network calls are explicit AWS SDK operations when you opt in via --aws / --aws-deep.
Use .envguardrc.json (or package.json) for config. CLI flags override configuration values.
Common overrides:
--strict to enable strict mode regardless of config--no-detect-fallbacks to treat missing vars as errors (ignore fallbacks)--env-files set-env.sh to add shell env sources without editing config{
"ignoreVars": ["MY_COMPANY_VAR", "PLATFORM_VAR"],
"strict": false,
"detectFallbacks": true,
"exclude": ["**/build/**", "**/tmp/**"],
"envFiles": ["set-env.sh", "another-env.sh"]
}
Fallback detection distinguishes between warnings (env vars used with fallbacks) and errors (env vars that will crash when missing). Disable it with --no-detect-fallbacks or set detectFallbacks to false in config.
Use --ci to integrate EnvGuard Pro into CI/CD. It sets the exit code so your pipeline can fail fast.
What happens with --ci:
--aws)Examples:
envguard scan --cienvguard scan --ci --strict (fail on any issue including warnings)envguard scan --ci --aws (include AWS validation)envguard scan --ci --no-detect-fallbacks (treat fallbacks as errors)Yes. Use envFiles in .envguardrc.json or pass --env-files to include export-based variables from shell scripts like set-env.sh.
Run envguard scan --format sarif --output results.sarif and upload the SARIF to GitHub Security in your CI pipeline.
Install in seconds. Catch issues in minutes. Ship with the confidence that your environment is solid.