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

mysql_password (and probably lots of others) is displayed all over the logs when using a single -v #1148

Open
nazarewk opened this issue Jul 15, 2024 · 1 comment
Assignees
Labels
bug Label for all kind of bugs. facts Issues with facts.

Comments

@nazarewk
Copy link

Describe the bug

I'm new to pyinfra, trying to rewrite MySQL user management from Ansible, when I try to add some verbosity to understand what is going on (-v flag) I am seeing mysql_password in plain text all over the logs.

mysql is probably not the only place that doesn't sanitize secretd like this.

To Reproduce

Connect to password-protected MySQL database with -v flag.

Expected behavior

I would expect all possibly sensitive information to be masked out from logging, unless (or even when) I use the maximum verbosity. It cloud go as far as using separate flag like --debug-secret to unmask those.

Meta

in pyinfra 2.9.2

@Fizzadar mentioned on Matrix chat:

I see yep, when used as a fact argument, that's a miss in the hiding there

@nazarewk nazarewk added the bug Label for all kind of bugs. label Jul 15, 2024
@Fizzadar Fizzadar added the facts Issues with facts. label Jul 21, 2024
@Fizzadar Fizzadar self-assigned this Jul 21, 2024
@Fizzadar
Copy link
Member

This is unfortunate. A lot of work went into the MaskString and various string command classes, unfortunately fact arguments are bypassing that entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Label for all kind of bugs. facts Issues with facts.
Projects
None yet
Development

No branches or pull requests

2 participants