All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Note: versions 0.1.1–0.1.4 shipped (see pyproject.toml) without corresponding entries here. Those changes (project rename to env-auditor, CRLF injection fix in
sanitize_raw,output_formatvalidation,.gitattributes) are not reconstructed retroactively to avoid documenting them inaccurately. This gap is disclosed rather than backfilled with guessed details.
[tool.env-auditor]inpyproject.tomlwas silently ignored on Python 3.10 withouttomliinstalled. The fallback TOML parser flattened all[section]tables into one shared namespace, so the section could never be found. The fallback parser is now section-aware.--config FILEread the parent directory of the given file and auto-discovered.env-auditorrc/env-auditor.toml/pyproject.tomlthere, ignoring the actual file passed. It now reads exactly the file given.required_keyswas parsed from config but never enforced anywhere, missing required keys now correctly cause exit code 1 and appear in both text and JSON output.- Docker
ENV KEY1=a KEY2=b KEY3=c(recommended single-line multi-assignment style) only detectedKEY1. Now detects all keys on the line. Scoped strictly toENV/ARGlines so it does not also match shell-localKEY=valueassignments onRUN/LABEL/CMDlines. --exclude some/path/fooalso silently excluded every other directory namedfooanywhere in the tree (matched by basename, not full path).- List-typed config values given the wrong type (e.g.
ignore_keys = true) were silently ignored instead of warning. - The human-readable and JSON reports could display
Result: PASS/"result": "pass"while the process exited with code 1, whenever the only failure was stale variables under--strict— the renderers computed their own incomplete pass/fail flag that never accounted for--strict. Pass/fail is now computed once and shared between the exit code and both output formats. --strictcombined with--ignore-stalecould exit 1 with no visible explanation at all (the stale section causing the failure was hidden by--ignore-stale, and nothing else in the report indicated why). Both output formats now include a note when this happens.mypy --strict(as run in CI) now passes with zero errors, down from 14.- The CLI crashed with
UnicodeEncodeErroronprint(output)any time stdout wasn't a UTF-8-native console — piped output, output redirected to a file, or captured by a CI runner, which is the default for non-console output on Windows (commonly codepagecp1252, which cannot encode the✓ ✗ ⚠ ─characters used throughout the report).main()now forces UTF-8 onsys.stdout/sys.stderrbefore printing anything. - Any extensionless file (
Makefile,LICENSE, bareREADME, etc.) was incorrectly scanned with Docker'sENV/ARGpatterns, because Docker'sLanguagePatternregistered itself underEXTENSION_MAP[""]. Detection is now filename-only (Dockerfile,Dockerfile.*), matching how it's already dispatched inscanner._get_patterns. [tool.env-auditor](or the[tool]table above it) being a non-table TOML value — valid TOML, e.g.[tool]\nenv-auditor = "oops"— crashed with an uncaughtAttributeErrorinstead of falling back to defaults with a warning like every other malformed-config path already does.
- CI's mypy step is no longer
continue-on-error: truenow that it's clean. load_configandload_config_from_fileshared ~40 lines of duplicated size-check/parse/error-handling logic; extracted into_read_config_raw.
EnvCheckConfigalias (leftover from the env-check → env-auditor rename). Unused anywhere in the codebase; the rename it bridged is long complete. If you were importing it directly from a pinned old version, useEnvAuditorConfiginstead.
- Scan source files for env var references across JavaScript/TypeScript, Python, Go, Shell, Docker, and Ruby
- Parse
.env.exampleand other dotenv-format files - Report undocumented variables (in code, missing from env file)
- Report stale variables (in env file, not found in code)
- Report variables with no default value (empty in env file)
- Flag dynamic references that cannot be statically audited
--strictmode: exit 1 on stale variables too--ignore-staleand--ignore-missingflags--format jsonfor machine-readable output--excludeflag for additional directories to skip--no-colorflag andNO_COLOR/FORCE_COLORenv var support- Config file support via
.env-auditorrc,env-auditor.toml, or[tool.env-auditor]inpyproject.toml ignore_keysconfig option to suppress specific variable namesrequired_keysconfig option to enforce documentation of specific variables--configflag to specify an explicit config file path- ReDoS protection: lines over 2000 characters are skipped
- Symlink protection: symlinks are never followed during directory walking
- File size limit: files over 1MB are skipped with a warning
- Path traversal protection on
--excludearguments - Sensitive value protection: actual
.envvalues are never stored or printed - Zero runtime dependencies — pure Python stdlib
- Full test suite with 116 tests across all modules
- GitHub Actions CI on Ubuntu, Windows, and macOS across Python 3.10, 3.11, and 3.12