Repository navigation
fix!: reject unresolved and invalid runtime secrets - #312
Merged
Merged
Conversation
joshrotenberg
marked this pull request as ready for review
October 19, 2026 03:34
This was referenced Oct 19, 2026
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.
Closes #272.
An unset
${VAR}could previously remain a usable literal credential, and--checkstill reported success. Runtime resolution now rejects missing, empty, non-Unicode, malformed/embedded, and recursively unresolved references. It stages substitutions, validates bearer credential content, then revalidates the full resolved configuration so token collisions and invalid headers fail before use. Resolution failures expose a redacted, downcastableEnvResolutionError; any failure retains the original configuration.CLI startup and
--check,Proxy::from_config/builder construction, management config validation/update, and reload require successful resolution. Reload validates the entire revision before backend mutation. Management writes retain the original reference-bearing body rather than resolved secrets. Parsing/loading templates remains supported; literal empty backend env/header values remain allowed.API change:
resolve_env_varsnow returnsResult<()>and callers must handle it. README, API/architecture documentation, and all three executable library examples are updated. No permissive runtime mode is added.Validation: all six AGENTS.md checks passed, including strict fmt/Clippy/rustdoc, 326 unit tests, 146 integration tests with real Redis, and 24 doctests. Six CLI/library/management/reload regressions also pass without default features, and the no-default all-target build passes. Tests cover every supported missing-secret field, empty/invalid/non-Unicode values, resolved scoped-token collisions, admin/data-token collisions, invalid headers, error redaction, staged rollback, reference-preserving writes, and a real MCP call through the retained backend after an invalid file-watcher revision.
Manual review of the pushed diff at
1b44d79f7adb82585f5165d6ec030ea3cb3b3feccompleted with no remaining findings. Dependency pins are unchanged. Releases remain held.