Repository navigation
fix(documents): redact credentials in settings debug - #185
Merged
Merged
Conversation
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 changed
DocumentConversionSettingsDebug output now redacts present Cloudflare tokens, including compact/pretty formatting, clones and the original settings afterbuild(). Absent tokens remainNone; other settings remain visible.The public
Option<String>field, build/clone behavior and backend feature independence remain intact. No dependency or CI changes. Public hardening docs, the tool contract, TM-LEAK-007 and changelog explain the guarantee and its limits.Why
Derived Debug formatted the original settings credential even though the separately constructed converter used
SecretString. Addresses the representation gap incommit:a2704abae78081919df0555d41941d95.This is a conditional library diagnostic concern. The report does not establish a default CLI/MCP/Python logging sink or unauthorized production diagnostic reader. Direct field access and arbitrary downstream logging remain caller-controlled.
Before / After
Tiny inert public-API formatting contract on base
3ea92653:Same contract after repair, across default, no-default, Cloudflare-only and
docs-allconfigurations:Offline public-API smoke after
build()and clone:Only dummy settings used; no live Cloudflare request or credential inspection. Contract also verifies absent/empty tokens and noncredential visibility.
Validation: unchanged workspace tests (including the two ordinary public-network CLI tests), strict clippy, warning-free docs, release build, release CLI help, formatter, both knowledge linters and eight repository-script tests passed. Scoped source/security/design review completed.
Risk
Checklist