Skip to content
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

Mask password in logs #837

Merged
merged 1 commit into from
Nov 13, 2024
Merged

Mask password in logs #837

merged 1 commit into from
Nov 13, 2024

Conversation

gamagoat
Copy link
Contributor

I am opening this PR to illustrate an issue.

Passwords should not be written in plaintext to logs, even in debug mode. By masking the password, we can keep it safer and still provide ourselves a way to confirm the value is what we expect.

Some examples of what this will look like in logs:

password -> appearance in logs

- secretpass -> s***s
- pass123 -> p***3
- 123 -> 1***3
- pw -> pw
- p -> p

A minimum password length of 3 would make this even better.

@schollz
Copy link
Owner

schollz commented Nov 12, 2024

looks good, happy to accept this as a PR, let me know when its ready to merge

@gamagoat gamagoat marked this pull request as ready for review November 13, 2024 00:39
@gamagoat
Copy link
Contributor Author

looks good, happy to accept this as a PR, let me know when its ready to merge

I can remove the TODO comment first if you'd like, otherwise it's ready on my end.

@schollz
Copy link
Owner

schollz commented Nov 13, 2024

sure

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.

3 participants