-
Notifications
You must be signed in to change notification settings - Fork 5
Redact password in Debug prints + some housekeeping #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
LeoBorai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Iizuki thanks so much for openning this PR! Happy new year for you too!
- I would suggest moving CI/CD related changes to its own PR
- Adding a small check on the REDACTED text to be present so we make sure both:
- Password is not rendered
- The expected text its rendered
| let debugged = format!("{credentials:?}"); | ||
| let pretty = format!("{credentials:#?}"); | ||
|
|
||
| assert!(!debugged.contains(password)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have a check for REDACTED?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left it out intentionally so as not to be flaky wrt. changes in the text, but ya I can add it. Just means that the test will need to be updated if someone wants to change the text.
This reverts commit 187685a. It will be included in a separate pull request.
Hey, and happy 2026!
Here's the PR I promised before holidays.
Changes
Manual Debug impl
The main point of this PR. Replace the derived Debug implementation with a manual impl that redacts the password field.
Example output:
Misc housekeeping
Issue Refs
fixes: #12