Repository navigation
fix(sdk): match the URL scheme case-insensitively when redacting credentials - #6380
Merged
Merged
Conversation
Closed
75 of 86 tasks
VascoSch92
enabled auto-merge (squash)
November 4, 2026 09:50
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.
HUMAN:
Fixed the credential-redaction gap from #6348. I reviewed the diff and the test; an uppercase scheme must not leak a token into logs.
AGENT:
Why
redact_url_credentialsmatched the scheme case-sensitively (^(https?://)), while the in-text variantredact_url_credentials_in_textalready compiles withIGNORECASE. A URL writtenHTTPS://oauth2:SECRET@host/repo.gittherefore passed through unredacted, sending its credentials into logs and error messages.Summary
test_redact_url_credentials_uppercase_schemefrom theworktree-test-edge-casesbranch (commit f2fcf6e) without itsxfail(strict=True)marker, per the [Bug]: Edge-case tests expose ~70 bugs across the SDK, agent server, tools and workspaces #6348 menu's acceptance criteria.Issue Number
Part of #6348 (menu sub-item: "redact_url_credentials matches the scheme case-sensitively (the _in_text variant is IGNORECASE), so ...")
How to Test
Before this change the URL comes back with
SECRETintact; after, it isHTTPS://****@github.com/o/r.git.tests/sdk/git/test_url_redaction.pyplustests/sdk/utils/test_redact.pyis 96 passed.ruff check/formaton the touched files are clean.Type
Notes
The
preserve_placeholdersbehaviour is unchanged:${VAR}userinfo still passes through when requested.