wemake-python-styleguide
wemake-python-styleguide copied to clipboard
Check for ssh/amazon keys, diffs and other patterns in string variables
Rule request
Thesis
There are several tools from which we can copy several checks to enforce better security:
- https://github.com/landscapeio/dodgy/blob/master/dodgy/checks.py
- https://github.com/Yelp/detect-secrets/tree/master/detect_secrets/plugins
There are several simple regexes to copy. And then we can add this check to our tool.
Plan:
- A single violation for all of these checks
- A collection of regexes that check string / bytes / formatted strings definitions
- Lots of tests!
Reasoning
Storing any secrets in strings is a bad idea. Use proper secrets management tool like https://github.com/sobolevn/git-secret
I'll add this rule
Thanks a lot!