Repository navigation
feat: enforce env-only endpoint configuration - #1943
Merged
Merged
Conversation
gerchowl
force-pushed
the
feature/1931-env-only-lint
branch
2 times, most recently
from
October 27, 2026 10:07
f45b6e4 to
7d94244
Compare
gerchowl
force-pushed
the
feature/1931-env-only-lint
branch
from
October 27, 2026 10:30
7d94244 to
c8eb7c8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Enforce ADR §10's env-only configuration rules with default-on hooks limited to shell, dotenv, Python, YAML, TOML and JSON. Literal endpoints and AWS credentials fail with file/line diagnostics that omit values; documentation files, variable/command/template references, empty values, reserved hosts and explicit same-line pragmas pass.
Type of Change
feat-- New featurefix-- Bug fixtest-- Adding or updating testsModifiers
!)Changes Made
Add the vig-utils CLI, Nix consumer/check definitions and both portable configurations. Language tags select source files; a companion filename filter includes
.envand.env.*files that pre-commit does not tag. Shell/dotenv use a physical-line assignment scanner shared with the parse-failure fallback: assignment words at statement boundaries are checked, quoted echo arguments stay inert, and pragmas apply to the finding's actual line. Template expressions are references in every format and in fallback scanning. YAML compose environment lists are checked. Other parse/encoding failures emit one notice and scan line-by-line. Document pragma/path exceptions and upgrade behavior in the package README and migration guide.Changelog Entry
Added
devkit and consumer hooks.
Testing
uv run --with pytest-xdist pytest tests/test_hardcoded_endpoints.py -n 4 --basetemp=$HOME/.cache/devkit-pytest/1931: RED exit 1 (42 failures), GREEN exit 0 (119 passed). Failing tests were committed before implementation. Full/container/Nix-eval suites run in CI per task instructions.Manual Testing Details
The focused suite proves correct physical line numbers (including final-line findings), correct and adjacent pragma behavior, assignment positions after separators and
env, template references across all supported types, and literals elsewhere in templated files.install.sh,scripts/init.sh,guardrails.shanddiffpack.shscan with no findings or notices. Temporary hook/scaffold probes also verified Markdown exclusion, dotenv/shebang selection, clean consumer scans and planted endpoint detection.Checklist
CHANGELOG.mdin the[Unreleased]sectionAdditional Notes
Independent S5 scope; no other #1908 sub-issues included.
Refs: #1931