1

I am building a project for deploying applications to servers using python scripts. I also use decorator to log inputs and outputs of functions. Since the logs will be available as Jenkins output, it is not an option to show passwords.

I am looking for a way to annotate/tag parameters so that decorator does not show them as plain text. If this is not possible, I am looking for alternatives.

I can make sure that I do not pass/return passwords in annotated functions, but considering future contributions from other developers I want to do this in a more easier to maintain way.

Kogesho
  • 143
  • 4
  • 1
    Take a look at [django `sensitive_variables`](https://docs.djangoproject.com/en/2.1/_modules/django/views/decorators/debug/#sensitive_variables) decorator as an example of how to implement one. Also, several alternative solutions offered in https://stackoverflow.com/questions/157938/hiding-a-password-in-a-python-script-insecure-obfuscation-only. – Ghasem Naddaf Oct 01 '18 at 22:58

0 Answers0