fix: never print passwords in bootstrap conflict errors; unpin ca-cer… - #255
Merged
Merged
Conversation
…tificates Two container-launch hygiene fixes: 1. check_conflict formatted both the CLI and config values into its error. At the --extenddb-pass call site (storage-postgres bootstrapper) that printed BOTH passwords in plaintext to stderr on mismatch. In a container stderr is the log stream and commonly shipped to aggregators, so a config drift would hand live credentials to anyone with log access. Added check_conflict_redacted (names the flag, never the values) and switched the password call site to it. Host/port/user call sites keep the verbose variant deliberately: the values aid diagnosis and are not secrets. Regression tests assert the flag is named and neither value appears. 2. The Dockerfile pinned ca-certificates to the exact Debian version 20230311+deb12u1. Debian removes old package versions from mirrors on rotation (current is 20250419~deb12u1), so the image build breaks the day that happens. Unpinned: the runtime base is already pinned by digest, so apt resolves the version consistent with that digest, and nothing in the binary reads the system trust store (rustls throughout). Gates: fmt clean, clippy clean on both touched crates, storage bootstrapper tests 22 passed including the 2 new redaction tests, storage-postgres lib 14/14, 0 filtered.
LeeroyHannigan
requested review from
amrith,
c33howard,
jcshepherd,
pdf-amzn and
yesyayen
as code owners
August 12, 2026 14:13
jcshepherd
approved these changes
Aug 13, 2026
7 tasks
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.
What
Two container-launch hygiene fixes, no behavior change on any success path. First, bootstrap password-conflict errors no longer print secrets:
check_conflictformats both the CLI and config values into its error message, and at the--extenddb-passcall site in the Postgres bootstrapper that printed BOTH passwords in plaintext to stderr on a mismatch. Addedcheck_conflict_redacted(names the flag, never the values) and switched the password call site to it; host, port, and username call sites deliberately keep the verbose variant since those values aid diagnosis and are not secrets. Second, the Dockerfile no longer pinsca-certificatesto an exact Debian package version.Why
In a container, stderr is the log stream and commonly shipped to aggregators, so a config drift on the app password would hand live credentials to anyone with log read access. That must not ship in a public image. The
ca-certificates=20230311+deb12u1pin is a build-reliability time bomb: Debian removes old package versions from its mirrors on rotation (current is20250419~deb12u1), so the image build breaks the day that happens, possibly mid-release. Unpinning is safe: the runtime base is already pinned by digest, so apt resolves the version consistent with that digest, and nothing in the binary reads the system trust store (rustls throughout). Both were flagged during the container release preparation; landing them before the release tag is cut avoids shipping either in the first public image.Closes # (no standing issue; pre-release hardening from the container release review)
Testing done
test_check_conflict_redacted_never_leaks_either_valueasserts the error names the flag and contains neither secret;test_check_conflict_redacted_ok_pathscovers the match and no-CLI-arg cases.cargo test --workspace --locked: exit 0, 771 passed / 0 failed across 25 suites, 0 filtered out.cargo fmt --all -- --check: exit 0.cargo clippyon both touched crates (extenddb-storage,extenddb-storage-postgres), all targets: clean.check_conflictcall sites.Checklist
cargo test --workspace)cargo fmt --check)cargo clippy -- -W clippy::pedantic)Storagetrait, auth model, on-diskformat, or public CLI surface, an RFC has been accepted or is linked
below. Otherwise, an ADR captures the decision (link below).
ADR / RFC: n/a (error-message hygiene and a Dockerfile package pin; no contract surface touched. The only observable change is that the password-mismatch error no longer echoes the values.)
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache License 2.0 and I agree to the Developer Certificate of
Origin (DCO). See CONTRIBUTING.md for details.