Skip to content

Redact credentials when displaying URLs#13333

Merged
jtfmumm merged 6 commits intomainfrom
jtfm/redact-urls
May 12, 2025
Merged

Redact credentials when displaying URLs#13333
jtfmumm merged 6 commits intomainfrom
jtfm/redact-urls

Conversation

@jtfmumm
Copy link
Contributor

@jtfmumm jtfmumm commented May 7, 2025

This PR redacts credentials in displayed URLs.

It mostly relies on a redacted_url function (and where possible IndexUrl::redacted). This is a quick way to prevent leaked credentials but it's prone to programmer error when adding new trace statements. A better follow-on would use a RedactedUrl type with the appropriate Display implementation. This would allow us to still extract credentials from the URL while displaying it securely. On the plus side, the sites where the redacted_url function are used serve as easy signposts for where to use the new type in a future PR.

Closes #1714.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Secrets in URLs are displayed in plaintext but should be redacted

3 participants