Qix- / better-exceptions

Pretty and useful exceptions in Python, automatically.
MIT License
4.59k stars 202 forks source link

How to hide sensibles data like passwords, tokens, ... #119

Closed max13fr closed 2 years ago

max13fr commented 2 years ago

Hello,

First, thanks for your really useful package !

I would like to hide secrets data like password, tokens, private_key, ... Do you have any solution ?

I think the best approch is to check the argument name in case of simple structure (str, int, ...) and argument content in case of dict for example, then override the sensitive data by a raw string. Do you know what function I can override ?

I know it would not be perfect, but if we could avoid the majority of the leaking it's already a huge step.

Thanks in advance, Max

Qix- commented 2 years ago

Yeah, don't use this package if you're working with sensitive information. It's not meant to be used in production. There is no other alternative here - anything would be a hack at best, insecure at worst.