baraa-rasheed/dotenv-guard

GitHub ↗ · How this check works

Per-setup public labels: Linux / Haiku: Works · Linux / Luna: Works

Static status badge · SVG · read-only JSON. Embed with ![Coldpass status](https://coldpass.dev/badge/baraa-rasheed--dotenv-guard.svg).

devops

Works

README claims checked out on 2 recorded setups.

Answers apply to each recorded setup, revision and operation. Earlier observations remain in Run details.

Tested on Linux
PlatformHaikuLuna
Linuxyesyes

Linux / Haiku 5.5: yes · Oct 25, 2026 · 42aeafc6b43e · claude-code / 2.1.300 (Claude Code)
Recorded operation: <guest-path>

Linux / Luna: yes · Oct 25, 2026 · 42aeafc6b43e · codex / codex-cli 0.163.0
Recorded operation: node index.js /tmp/dotenv-guard-missing/.env /tmp/dotenv-guard-missing/.env.example

Does what it says
1 of 1 claims checked out
  • The CLI reports an environment variable missing from .env when it is declared in .env.example.: Real input produced the expected result: API_KEY

    Source: Running the tool will report that `API_KEY` is missing.

    Input: .env has DATABASE_URL and PORT; .env.example additionally declares API_KEY.

    Expected: API_KEY is reported as missing

    Command: node index.js /tmp/dotenv-guard-missing/.env /tmp/dotenv-guard-missing/.env.example

    Observed: API_KEY Tip: Add this to your pre-commit hook or CI to catch issues early.

MCP
No
Local or hosted
local
Local: runs on your machine
Needs keys or browser
None seen
Maintained
Maintained
actively maintained: last commit 3 days ago; 2 commits and 0 merged PRs in 90 days; 0 open issues, 0 open PRs; no releases

Last commit Oct 21, 2026

Setup time
47 s
47 s to a working result
Issue
none found in recorded check
Evidence
README behavior checked
Agent interfaces
CLI
CLI

Observed interfaces were exercised by the checker. Documentation alone does not confirm compatibility.

Tested with
Codex / Luna
  • Linux: Codex / Luna · agent codex-cli 0.163.0 · Checked operation passed · Oct 25, 2026 on 42aeafc6b43e

Each entry describes its recorded operation and source revision.

Safety
No unexpected network or file activity found in these checks

No problems traced to this repository code in these checks; a short run cannot prove safety.

Full event, path and process lists for each observed setup:

Run details

Haiku 5.5

Native agent · Checked operation passed

Checked operation <guest-path>

Agent-reported scope: Validate a .env file against .env.example with the dotenv-guard CLI (missing, empty, and secret-warning checks, documented exit codes)

Run details
run
baraa-rasheed--dotenv-guard-claude-haiku-5-5-1792964154739489853
date
Oct 25, 2026
time to working
471.4s
product hosting / execution
Local command in the guest
recorded operation scope
product operation
model
claude-haiku-5-5
agent / version
claude-code / 2.1.300 (Claude Code)
platform
linux
reported cost
$0.016360
Recorded source
https://github.com/baraa-rasheed/dotenv-guard
Backend
hyperv
Tool transport
mcp-assigned-vm
Requested source pin (not an observed revision)
{"commit": "42aeafc6b43e081c9dd39882d5e624eadba65ad7", "url": "https://github.com/baraa-rasheed/dotenv-guard"}
Test version
readme-dae07812d92ea376b4fae6fb7aa96cf2808cb615bbdfa0186d9241ec2a40d6ac
revision
42aeafc6b43e081c9dd39882d5e624eadba65ad7
Whose fault: repo · diagnosed

The package name dotenv-guard is not published to the npm registry, so the README install command cannot succeed.

Additional warning

Step: npm install -g dotenv-guard (README Install)

Safety: No problems traced to this repository code in these checks.

No problems traced to this repository code in these checks.

OSV scanned supported lockfiles; unpinned dependencies and unsupported formats are outside this check.

A short run cannot establish that code is safe.

Connections show IP addresses; proxies can hide the final hostname.

Tracing covers dispatched commands and their children, not the whole OS; guest root can interfere with tracing.

Full safety evidence →

Answers recorded for this run
  • Running the tool reports a variable that is in .env.example but missing from .env: Real input produced the expected result: - API_KEY

    Source: Running the tool will report that `API_KEY` is missing.

    Input: .env missing API_KEY, .env.example lists API_KEY

    Expected: API_KEY reported as missing with exit code 1

    Command: <guest-path>

    Observed: - API_KEY Tip: Add this to your pre-commit hook or CI to catch issues early.

  • Custom paths: checks the given env file against the given example file: Real input produced the expected result: Required variables are present

    Source: dotenv-guard .env.production .env.example

    Input: .env.production with all variables set, one secret-like key

    Expected: Required variables are present, exit code 0

    Command: <guest-path> .env.production .env.example

    Observed: Required variables are present (but review the secrets above).

Examples

  • Default: checks .env against .env.example: command completed successfully

    Source: README.md Usage

    Input: no arguments, complete .env in cwd

    Expected: all required variables present, exit 0 (with secret warning)

    Command: <guest-path>

    Observed: 🔒 Potential secrets detected (review before committing): - API_KEY ✅ Required variables are present (but review the secrets above).

  • Custom paths: dotenv-guard .env.production .env.example: command completed successfully

    Source: README.md Usage

    Input: .env.production .env.example

    Expected: all required variables present, exit 0

    Command: <guest-path> .env.production .env.example

    Observed: 🔒 Potential secrets detected (review before committing): - API_KEY ✅ Required variables are present (but review the secrets above).

Local or hosted: local

What the agent did

Validate a .env file against .env.example with the dotenv-guard CLI (missing, empty, and secret-warning checks, documented exit codes)

cd <guest-path> && pwd && ls -la && id -u && python3 --version && cat README.md | head -c 6000
cd <guest-path> && cat package.json index.js .gitignore && ls -la .coldpass && which node npm npx; node --version; npm --version; cat /etc/os-release | head -2
sudo -n apt-get -o DPkg::Lock::Timeout=300 update -qq && sudo -n apt-get -o DPkg::Lock::Timeout=300 install -y -qq nodejs npm >/tmp/apt.log 2>&1; echo rc=$?; tail -5 /tmp/apt.log; node --version; npm --version
export NODE_USE_ENV_PROXY=1; mkdir -p $HOME/.npm-global && npm config set prefix $HOME/.npm-global && npm install -g dotenv-guard 2>&1 | tail -5; echo rc=$?; ls $HOME/.npm-global/bin; $HOME/.npm-global/bin/dotenv-guard --help 2>&1 | head -5; cat $HOME/.npm-global/lib/node_modules/dotenv-guard/package.json | grep '"version"'
cd /tmp && npm view dotenv-guard name version 2>&1 | head -5; echo "---"; npm config get registry; grep -i -m5 "http fetch\|404" <guest-path> | head -8
export NODE_USE_ENV_PROXY=1; cd /tmp && npm install -g <guest-path> 2>&1 | tail -3; echo rc=$?; ls -la $(npm config get prefix)/bin/ ; which dotenv-guard
grep -i "error" <guest-path> | head -15; npm config get prefix
export NODE_USE_ENV_PROXY=1; mkdir -p <guest-path> && cd /tmp && npm install -g --prefix <guest-path> <guest-path> 2>&1 | tail -3; ls -la <guest-path> 2>&1; <guest-path> --help 2>&1 | head -3; echo "rc=$?"
mkdir -p <guest-path> && cd <guest-path> && printf 'DATABASE_URL=\nAPI_KEY=\n<secret>\n' > .env.example && printf 'DATABASE_URL=postgres://...\nPORT=3000\n' > .env && <guest-path>; echo "rc=$?"
cd <guest-path> && printf 'DATABASE_URL=postgres://db\nAPI_KEY=<secret>\nPORT=3000\n' > .env.production && <guest-path> .env.production .env.example; echo "rc=$?"; printf 'PORT=\n' > .env.empty && <guest-path> .env.empty .env.example; echo "rc=$?"
ls -la <guest-path> 2>&1; ls -la /inputs/ 2>&1; ls -la <guest-path>; grep -n "^##\|^- \`\|dotenv-guard " <guest-path>
mkdir -p <guest-path> && cat > <guest-path> <<'EOF'
[
  {"kind":"claim","claim":"Running the tool reports a variable that is in .env.example but missing from .env","source":"Running the tool will report that `API_KEY` is missing.","input":".env missing API_KEY, .env.example lists API_KEY","expected":"API_KEY reported as missing with exit code 1","probe_kind":"cli","argv":["<guest-path>"],"expected_returncode":1,"expected_text":"  - API_KEY","cwd":"<guest-path>"},
  {"kind":"claim","claim":"Custom paths: checks the given env file against the given example file","source":"dotenv-guard .env.production .env.example","input":".env.production with all variables set, one secret-like key","expected":"Required variables are present, exit code 0","probe_kind":"cli","argv":["<guest-path>",".env.production",".env.example"],"expected_text":"Required variables are present","cwd":"<guest-path>"}
]
EOF
python3 -I -c "import json;json.load(open('<guest-path>'));print('ok')"
cd <guest-path> && cat > probe.json <<'EOF'
{"kind":"cli","argv":["<guest-path>"],"cwd":"<guest-path>","expected_returncode":1,"expected_text":"  - API_KEY"}
EOF
cat > examples.json <<'EOF'
[
  {"kind":"example","claim":"Default: checks .env against .env.example","source":"README.md Usage","input":"no arguments, .env in cwd","expected":"reports API_KEY missing, exit 1","argv":["<guest-path>"],"cwd":"<guest-path>","expected_returncode":1,"expected_text":"  - API_KEY"},
  {"kind":"example","claim":"Custom paths: dotenv-guard .env.production .env.example","source":"README.md Usage","input":".env.production .env.example","expected":"all required variables present, exit 0","argv":["<guest-path>",".env.production",".env.example"],"cwd":"<guest-path>","expected_text":"Required variables are present"}
]
EOF
cat > cycles.json <<'EOF'
{"detected":false,"reason":"Entry points inspected: index.js (single synchronous run() that reads argv, prints results and calls process.exit) and package.json (bin + start script only). No cron, scheduler, loop, webhook, --once or --now option exists; the tool runs once per invocation, so there is no product cycle to trigger.","checks":[]}
EOF
for f in probe.json examples.json cycles.json claims.json; do python3 -I -m json.tool $f >/dev/null && echo "$f ok"; done
cd <guest-path> && cat > report.json <<'EOF'
{"outcome":"working","fault_owner":"repo","operation":"Validate a .env file against .env.example with the dotenv-guard CLI (missing, empty, and secret-warning checks, documented exit codes)","operation_scope":"Linux Ubuntu 24.04, Node v18.19.1 (meets engines node>=18), installed from the pinned local source into a user-local prefix. Tested only with local .env files; no CI or pre-commit hook run.","steps":["apt-get install nodejs npm (Node v18.19.1, npm 9.2.0)","npm install -g dotenv-guard (README Install) - FAILED: 404, package not on registry.npmjs.org","npm install -g --prefix <guest-path> <guest-path> (substitute, pinned source)","dotenv-guard (default: .env vs .env.example) - exit 1, reports API_KEY missing","dotenv-guard .env.production .env.example - exit 0, reports secret warning and 'Required variables are present'","dotenv-guard .env.production .env.example with empty PORT and missing vars - exit 1"],"deviations":["README 'npm install -g dotenv-guard' fails: npm registry returns 404 for dotenv-guard (no published package). Substituted installing the pinned source folder with npm install -g --prefix.","First global install attempt without --prefix failed with EACCES on /usr/local/lib/node_modules; retried with user-local prefix.","/inputs/coldpass-preflight.py does not exist in this guest; The tool itself works when installed from the source in this project.","suggested_fix":"Publish the package to npm under the name dotenv-guard, or change the README install instructions to say to install from the git repository or local source."}
EOF
python3 -I -m json.tool report.json >/dev/null && echo ok; cd <guest-path> && <env-var>=<guest-path> python3 -I <guest-path> --validate --replay 2>&1 | tail -60
cd <guest-path> && python3 -I - <<'EOF'
import json
p='<guest-path>'
d=json.load(open(p))
d[0]['expected_text']='API_KEY'
json.dump(d,open(p,'w'),indent=1)
print(d[0]['expected_returncode'], d[0]['expected_text'])
EOF
cd <guest-path> && <env-var>=<guest-path> python3 -I <guest-path> --validate --replay 2>&1 | python3 -I -c "import sys,json; t=sys.stdin.read(); i=t.find('{'); d=json.loads(t[i:]); print('valid=',d['valid']); print('problems=',d['problems']); print('replay=',d['replay']['status'])"
mkdir -p <guest-path> && cd <guest-path> && printf 'DATABASE_URL=postgres://db\nAPI_KEY=<secret>\nPORT=3000\n' > .env && printf 'DATABASE_URL=\nAPI_KEY=\n<secret>\n' > .env.example && <guest-path>; echo "rc=$?"; cd <guest-path> && python3 -I - <<'EOF'
import json
p='<guest-path>'
d=json.load(open(p))
d[0]={"kind":"example","claim":"Default: checks .env against .env.example","source":"README.md Usage","input":"no arguments, complete .env in cwd","expected":"all required variables present, exit 0","argv":["<guest-path>"],"cwd":"<guest-path>","expected_text":"All required environment variables are present"}
json.dump(d,open(p,'w'),indent=1)
print('written')
EOF
cd <guest-path> && python3 -I - <<'EOF'
import json
p='<guest-path>'
d=json.load(open(p))
d[0]['expected_text']='Required variables are present'
d[0]['expected']='all required variables present, exit 0 (with secret warning)'
json.dump(d,open(p,'w'),indent=1)
EOF
cd <guest-path> && <env-var>=<guest-path> python3 -I <guest-path> --validate --replay 2>&1 | python3 -I -c "import sys,json; t=sys.stdin.read(); i=t.find('{'); d=json.loads(t[i:]); print('valid=',d['valid']); print('problems=',d['problems']); print('replay=',d['replay']['status'])"
cd <guest-path> && ls -la && ls -la .coldpass && git status 2>/dev/null | head -2; pgrep -fa dotenv-guard || echo "no background processes"
cd <guest-path> && cat .npmrc; rm -f .npmrc && <env-var>=<guest-path> python3 -I <guest-path> --validate --replay 2>&1 | python3 -I -c "import sys,json; t=sys.stdin.read(); i=t.find('{'); d=json.loads(t[i:]); print('valid=',d['valid']); print('problems=',d['problems']); print('replay=',d['replay']['status'])"; ls -la <guest-path> | grep npmrc || echo "no .npmrc"
Earlier attempts (1)

Luna

Native agent · Checked operation passed

Checked operation node index.js /tmp/dotenv-guard-missing/.env /tmp/dotenv-guard-missing/.env.example

Agent-reported scope: Validate .env against .env.example and report missing variables.

Run details
run
baraa-rasheed--dotenv-guard-gpt-6-luna-1792968485468125860
date
Oct 25, 2026
time to working
47.0s
product hosting / execution
Local command in the guest
recorded operation scope
product operation
model
gpt-6-luna
agent / version
codex / codex-cli 0.163.0
platform
linux
reported cost
not reported (not assumed free)
Recorded source
https://github.com/baraa-rasheed/dotenv-guard
Backend
hyperv
Tool transport
mcp-assigned-vm
Requested source pin (not an observed revision)
{"commit": "42aeafc6b43e081c9dd39882d5e624eadba65ad7", "url": "https://github.com/baraa-rasheed/dotenv-guard"}
Test version
readme-a17389bda4cc696f9601c0c4ff1b2c16e23bfa1d907883b715ccdd9e92ddec56
revision
42aeafc6b43e081c9dd39882d5e624eadba65ad7
Whose fault: not assigned · resolved

Safety: No problems traced to this repository code in these checks.

No problems traced to this repository code in these checks.

OSV scanned supported lockfiles; unpinned dependencies and unsupported formats are outside this check.

A short run cannot establish that code is safe.

Connections show IP addresses; proxies can hide the final hostname.

Tracing covers dispatched commands and their children, not the whole OS; guest root can interfere with tracing.

Full safety evidence →

Answers recorded for this run
  • The CLI reports an environment variable missing from .env when it is declared in .env.example.: Real input produced the expected result: API_KEY

    Source: Running the tool will report that `API_KEY` is missing.

    Input: .env has DATABASE_URL and PORT; .env.example additionally declares API_KEY.

    Expected: API_KEY is reported as missing

    Command: node index.js /tmp/dotenv-guard-missing/.env /tmp/dotenv-guard-missing/.env.example

    Observed: API_KEY Tip: Add this to your pre-commit hook or CI to catch issues early.

Examples

  • The documented missing variable example identifies API_KEY.: command exited with code 1: ❌ Missing variables (defined in .env.example but not in .env): - API_KEY Tip: Add this to your pre-commit hook or CI to catch issues early.

    Source: README.md / Example

    Input: .env includes DATABASE_URL and PORT; .env.example additionally defines API_KEY.

    Expected: Reports API_KEY as missing.

    Command: node index.js /tmp/dotenv-guard-missing/.env /tmp/dotenv-guard-missing/.env.example

    Observed: ❌ Missing variables (defined in .env.example but not in .env): - API_KEY Tip: Add this to your pre-commit hook or CI to catch issues early.

Local or hosted: local

What the agent did

Validate .env against .env.example and report missing variables.

pwd && ls -la && sed -n '1,240p' README.md && python3 --version && id -u
cat package.json && sed -n '1,260p' index.js && cat .gitignore && ls -la .coldpass && node --version && npm --version
npm install -g dotenv-guard && mkdir -p /tmp/dotenv-guard-pass /tmp/dotenv-guard-missing && printf 'DATABASE_URL=postgres://localhost/demo\nPORT=3000\n' > /tmp/dotenv-guard-pass/.env && printf 'DATABASE_URL=\nAPI_KEY=\n<secret>\n' > /tmp/dotenv-guard-pass/.env.example && printf 'DATABASE_URL=postgres://localhost/demo\nPORT=3000\n' > /tmp/dotenv-guard-missing/.env && printf 'DATABASE_URL=\nAPI_KEY=\n<secret>\n' > /tmp/dotenv-guard-missing/.env.example && cd /tmp && npx --yes dotenv-guard /tmp/dotenv-guard-missing/.env /tmp/dotenv-guard-missing/.env.example; r=$?; printf 'EXIT=%s\n' "$r"; npx --yes dotenv-guard /tmp/dotenv-guard-pass/.env /tmp/dotenv-guard-pass/.env.example; printf 'EXIT=%s\n' "$?"
cat > /tmp/dotenv-guard-pass/.env <<'EOF'
DATABASE_URL=postgres://localhost/demo
PORT=3000
EOF
cat > /tmp/dotenv-guard-pass/.env.example <<'EOF'
DATABASE_URL=
API_KEY=
<secret>
EOF
cat > /tmp/dotenv-guard-missing/.env <<'EOF'
DATABASE_URL=postgres://localhost/demo
PORT=3000
EOF
cat > /tmp/dotenv-guard-missing/.env.example <<'EOF'
DATABASE_URL=
API_KEY=
<secret>
EOF
cd /tmp && npx --yes dotenv-guard /tmp/dotenv-guard-missing/.env /tmp/dotenv-guard-missing/.env.example; printf 'missing_exit=%s\n' "$?"; npx --yes dotenv-guard /tmp/dotenv-guard-pass/.env /tmp/dotenv-guard-pass/.env.example; printf 'pass_exit=%s\n' "$?"
mkdir -p /tmp/dotenv-guard-pass /tmp/dotenv-guard-missing && cat > /tmp/dotenv-guard-pass/.env <<'EOF'
DATABASE_URL=postgres://localhost/demo
PORT=3000
EOF
cat > /tmp/dotenv-guard-pass/.env.example <<'EOF'
DATABASE_URL=
API_KEY=
<secret>
EOF
cat > /tmp/dotenv-guard-missing/.env <<'EOF'
DATABASE_URL=postgres://localhost/demo
PORT=3000
EOF
cat > /tmp/dotenv-guard-missing/.env.example <<'EOF'
DATABASE_URL=
API_KEY=
<secret>
EOF
node <guest-path> /tmp/dotenv-guard-missing/.env /tmp/dotenv-guard-missing/.env.example; printf 'missing_exit=%s\n' "$?"; node <guest-path> /tmp/dotenv-guard-pass/.env /tmp/dotenv-guard-pass/.env.example; printf 'pass_exit=%s\n' "$?"
mkdir -p .coldpass && cat > .coldpass/probe.json <<'EOF'
{"kind":"cli","argv":["node","index.js","/tmp/dotenv-guard-missing/.env","/tmp/dotenv-guard-missing/.env.example"],"cwd":"<guest-path>","expected_returncode":1,"expected_text":"API_KEY"}
EOF
cat > .coldpass/claims.json <<'EOF'
[{"kind":"claim","claim":"The CLI reports an environment variable missing from .env when it is declared in .env.example.","source":"Running the tool will report that `API_KEY` is missing.","input":".env has DATABASE_URL and PORT; .env.example additionally declares API_KEY.","expected":"API_KEY is reported as missing","probe_kind":"cli","argv":["node","index.js","/tmp/dotenv-guard-missing/.env","/tmp/dotenv-guard-missing/.env.example"],"expected_returncode":1,"expected_text":"API_KEY","cwd":"<guest-path>"}]
EOF
cat > .coldpass/examples.json <<'EOF'
[{"kind":"example","claim":"Run the documented custom paths usage against sample env files.","source":"README.md / Usage / Custom paths","input":"Missing API_KEY in .env compared with .env.example","expected":"CLI reports API_KEY missing and exits 1","argv":["node","index.js","/tmp/dotenv-guard-missing/.env","/tmp/dotenv-guard-missing/.env.example"],"cwd":"<guest-path>","expected_returncode":1,"expected_text":"API_KEY"},{"kind":"example","claim":"README install command via npx","source":"README.md / Install","reason":"Attempted npm install -g dotenv-guard and npx dotenv-guard; registry returned E404 (package is not published)."}]
EOF
cat > .coldpass/cycles.json <<'EOF'
{"detected":false,"reason":"Inspected README usage and package entry point index.js. The product runs as a one-shot validation CLI and documents no scheduler, loop, webhook, or cycle trigger.","checks":[]}
EOF

<env-var>=<guest-path> python3 -I <guest-path> --validate --replay
cat > .coldpass/examples.json <<'EOF'
[{"kind":"example","claim":"The documented missing variable example identifies API_KEY.","source":"README.md / Example","input":".env includes DATABASE_URL and PORT; .env.example additionally defines API_KEY.","expected":"Reports API_KEY as missing.","argv":["node","index.js","/tmp/dotenv-guard-missing/.env","/tmp/dotenv-guard-missing/.env.example"],"cwd":"<guest-path>","expected_returncode":1,"expected_text":"API_KEY"},{"kind":"example","claim":"Documented npx install route","source":"README.md / Install","reason":"Attempted `npm install -g dotenv-guard`; actual error: npm E404 package not found from registry."}]
EOF
<env-var>=<guest-path> python3 -I <guest-path> --validate --replay
cat .coldpass/examples.json && cat > .coldpass/report.json <<'EOF'
{"outcome":"working","fault_owner":"repo","operation":"Validate .env against .env.example and report missing variables.","operation_scope":"Node CLI source checkout; Node v22.23.4 meets package engines >=18. npm global/npx package installation unavailable because registry returned E404.","steps":["Read README and package entry point.","Ran the documented validation behavior with sample .env and .env.example files; it reported API_KEY missing with exit code 1.","Replayed the CLI probe and README claim successfully."],"deviations":["`npm install -g dotenv-guard` and `npx dotenv-guard` failed with npm E404: package not found in registry. Used the repository's index.js CLI entry point to exercise the same documented arguments."],"stuck_step":null,"main_blocker":null,"plain_failure":null,"suggested_fix":"Publish dotenv-guard to npm or document a repository-local invocation for source checkouts."}
EOF
python3 - <<'PY'
import json
p='.coldpass/examples.json'
x=json.load(open(p))
x[0]['expected_returncode']=1
open(p,'w').write(json.dumps(x))
PY
<env-var>=<guest-path> python3 -I <guest-path> --validate --replay
python3 - <<'PY'
import json
p='.coldpass/examples.json'; x=json.load(open(p)); x=x[:1]; x[0]['expected_returncode']=1; x[0]['expected_text']='API_KEY'; open(p,'w').write(json.dumps(x))
p='.coldpass/report.json'; d=json.load(open(p)); d['outcome']='working'; d['fault_owner']=None; open(p,'w').write(json.dumps(d))
PY
<env-var>=<guest-path> python3 -I <guest-path> --validate --replay