add automated config drift detection - #801
Open
canicefavour wants to merge 3 commits into
Open
canicefavour wants to merge 3 commits into
canicefavour wants to merge 3 commits into
Conversation
|
@canicefavour Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Implemented an automated configuration audit tool to detect documented environment variables that are no longer consumed by the application codebase.
Implementation
Added a lightweight configuration audit CLI under scripts/ to analyze documented configuration sources such as .env.example and configuration documentation.
Implemented extraction of documented environment variable names along with their source file and line information.
Added source-code scanning to identify actual usage of documented variables across the application.
Covered common environment-variable access patterns, including direct environment lookups, bracket notation, destructured environment objects, and configuration mappings.
Added reporting for documented variables with no detected application references.
Added an allowlist/exemption mechanism for variables intentionally consumed outside the application codebase.
Documented allowlisted variables and their exemption reasons to reduce false positives.
Integrated the audit into the project command workflow so it can be run consistently during local development and CI.
Implemented exit-code enforcement so unreferenced, non-allowlisted configuration variables cause the check to fail.
Added validation demonstrating that intentionally unused configuration variables are detected correctly.
Tested the audit against the existing repository configuration and accounted for known external/runtime configuration dependencies.
Result
The project now has a reproducible configuration drift check that helps keep environment documentation synchronized with actual application usage, while providing controlled exemptions for legitimate externally consumed variables.
Closes #722