globality-corp / flake8-logging-format

Flake8 extension to validate (lack of) logging format strings
Apache License 2.0
134 stars 21 forks source link

Feature request: add rule for log strings that are variables #21

Open grokcode opened 4 years ago

grokcode commented 4 years ago

There is a potential for sensitive data to be logged without flake8-logging-format catching it.

msg = f'Should not be logged {user.password}'
logger.info(msg)

I think this could be handled with a new rule that logging statements should not use a variable for their first argument.