Repository navigation
fix: redact any credentials from https?:// URLs - #1155
Merged
Merged
Conversation
Signed-off-by: Mradul Singh <msingh@dealmeridian.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | ✅ 0 (≤ 20 complexity) |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
1 of 2 tasks
jkowalleck
approved these changes
Nov 26, 2026
https?:// URLs
https?:// URLshttps?:// URLs
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.
Description
redact_auth_from_url()only matcheduser:password@, so a token without a colon stayed in URLs, PURLs and descriptions.In
http://andhttps://URLs the whole userinfo is dropped now. This includestoken:@,:token@and passwords with an@, which were not (or only partly) dropped before. Other schemes work as before, sossh://git@...is kept.As with
user:password@already,${ENV_VAR}placeholders in the userinfo are dropped too.Tests are in
tests/unit/test_utils_secret.py; 8 of the 19 cases fail without the change. The requirements, poetry and pipenv integration tests pass on Python 3.12 with no snapshot changes.Resolves or fixes issue: #1150
AI Tool Disclosure
Claude CodeClaude Opus 5.5Fix an open, unclaimed "help wanted" issue following the repo's contribution rules, with tests that fail before and pass afterAffirmation