Download the PHP package jcadima/vaultcheck without Composer
On this page you can find all versions of the php package jcadima/vaultcheck. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package vaultcheck
VaultCheck
A PHP CLI tool that audits environment variable and secrets hygiene across your project. Think of it as a spell-checker for your .env files it catches security problems before they become incidents.
Requirements
- PHP 8.2+
gitbinary (for G001–G008 git history checks)
Installation
Via Composer (recommended):
Find the Composer global bin directory
You'll get a path like:
Make vaultcheck available in your terminal
You need to add this directory to your PATH so your shell can find vaultcheck anywhere.
Add this line at the end of your shell profile: ~/.zshrc or ~/.bashrc, replacing yourusername with your actual username
Apply the changes
VPS / server alternative — symlink to /usr/local/bin (no shell profile changes needed):
This makes vaultcheck available to all users and works in cron jobs, scripts, and CI pipelines without any PATH configuration.
Verify the install:
Via Docker Compose (local build):
From source:
Usage
vaultcheck audit : Run a full security audit
By default, only CRITICAL and HIGH findings are shown — the genuine red flags that need immediate action. Lower-severity findings are still detected and a count is printed at the bottom. Use
--min-severityto reveal them when you're ready to dig deeper.
Valid values for --min-severity: CRITICAL, HIGH (default), MEDIUM, LOW, INFO.
vaultcheck keys : List all environment variables and their status
| Status | Meaning |
|---|---|
DEFINED |
Has a value and is referenced in code |
EMPTY |
In .env but has no value |
EXAMPLE_ONLY |
Only in .env.example, not in .env |
UNUSED |
In .env but never called in PHP code |
MISSING_DEFAULT |
Called via env('KEY') without a fallback |
vaultcheck snapshot - Save a baseline
Saves to .vaultcheck/snapshot.json. Secret values are never stored — only SHA-256 hashes.
vaultcheck drift : Detect what changed since the snapshot
vaultcheck fix : Auto-fix safe issues
| Issue fixed | Action |
|---|---|
P001 — world-readable .env |
chmod 600 .env |
P002 — world-writable .env |
chmod 600 .env |
P003 — group-writable .env |
chmod 640 .env |
| E010 — Windows CRLF line endings | Convert \r\n → \n |
| E011 — duplicate keys | Remove duplicates, keep first |
CI/CD Integration
Add VaultCheck to your pipeline to block deployments if secrets hygiene regresses:
The --strict flag causes the process to exit with code 1 if any MEDIUM or higher finding exists, failing the pipeline step.
Check Reference
Environment (E001–E015)
| ID | Severity | What it catches |
|---|---|---|
| E001 | HIGH | .env file is missing |
| E002 | MEDIUM | .env.example is missing |
| E003 | MEDIUM | Key in .env but missing from .env.example |
| E004 | LOW | Key in .env.example but absent from .env |
| E005 | HIGH | Empty value in production |
| E006 | MEDIUM | Placeholder value (changeme, your-key-here, etc.) |
| E007 | HIGH | APP_KEY missing, empty, or malformed |
| E008 | CRITICAL | APP_DEBUG=true in production |
| E009 | HIGH | DB_HOST set to localhost in production |
| E010 | LOW | Windows CRLF line endings |
| E011 | MEDIUM | Duplicate key in .env |
| E012 | HIGH | Real-looking secret value in .env.example |
| E013 | LOW | No log level configured |
| E014 | MEDIUM | Development driver (file, sync, array) in production |
| E015 | HIGH | Backup .env file found (.env.bak, .env.old, etc.) |
Codebase (C001–C005)
| ID | Severity | What it catches |
|---|---|---|
| C001 | LOW | Env var defined in .env but never referenced in code |
| C002 | HIGH / MEDIUM / LOW | Code calls env('KEY') for a key not defined in .env. Severity depends on call origin: HIGH when application code (e.g. app/) has no fallback default; MEDIUM when application code has a fallback default; LOW when only config/ files reference it (optional framework integrations). |
| C003 | MEDIUM | env('KEY') called without a fallback default in application code. Calls originating only from config/ files are suppressed — Laravel framework configs intentionally omit defaults for optional integrations. |
| C004 | MEDIUM | env() called outside a config/ file (breaks config:cache) |
| C005 | LOW | Casing mismatch between .env key and env() call |
Permissions (P001–P004)
| ID | Severity | What it catches |
|---|---|---|
| P001 | CRITICAL | .env is world-readable |
| P002 | CRITICAL | .env is world-writable |
| P003 | MEDIUM | .env is group-writable |
| P004 | CRITICAL | .env inside public/, web/, or other web-accessible directory |
Consistency (X001–X005)
| ID | Severity | What it catches |
|---|---|---|
| X001 | HIGH | DB_PASSWORD identical across environment files |
| X002 | CRITICAL | APP_KEY shared between environments |
| X003 | HIGH | Sensitive key has the same value in production and non-production |
| X004 | MEDIUM | APP_ENV value doesn't match what the filename implies |
| X005 | LOW | Key in .env.staging / .env.testing not in .env.example |
Strength (S001–S006)
| ID | Severity | What it catches |
|---|---|---|
| S001 | MEDIUM | Secret shorter than 16 characters |
| S002 | LOW | Secret is all lowercase (low entropy) |
| S003 | HIGH | Secret matches a known-weak password |
| S004 | MEDIUM | APP_KEY set but missing the base64: prefix |
| S005 | HIGH | JWT_SECRET shorter than 32 characters |
| S006 | HIGH | DB_PASSWORD is the same as DB_USERNAME |
Git History (G001–G008)
| ID | Severity | What it catches |
|---|---|---|
| G001 | CRITICAL | .env was ever committed to git history |
| G002 | CRITICAL | Known service credential (Stripe, AWS, GitHub, etc.) found in a commit |
| G003 | HIGH | High-entropy token found in a commit (likely secret, unknown format) |
| G004 | HIGH | .env.bak or .env.backup was ever committed |
| G005 | HIGH | Hard-coded credential found in config/ directory history |
| G006 | CRITICAL | .env not listed in .gitignore |
| G007 | HIGH | .env committed before .gitignore was set up |
| G008 | CRITICAL | Current .env value found in git history — leaked and not rotated |
License
MIT
All versions of vaultcheck with dependencies
symfony/console Version ^7.0
symfony/process Version ^7.0
symfony/filesystem Version ^7.0
symfony/finder Version ^7.0