Yelp / detect-secrets

An enterprise friendly way of detecting and preventing secrets in code.
Apache License 2.0
3.59k stars 449 forks source link

Secret followed by type hint are not detected #780

Open mosc9575 opened 6 months ago

mosc9575 commented 6 months ago

The current algorithm is not able to detect secrets with type hint. E.g. my_password: str = "bar" is not detected.

def my_very_secret_function(my_password: str = "bar"):
    pass

Detect secrets version: 1.4.0 Python version : 3.10.13 | packaged by conda-forge | (main, Oct 26 2023, 18:07:37) [GCC 12.3.0] IPython version : 8.14.0 Tornado version : 6.3.3 Operating system : Linux-4.19.0-21-amd64-x86_64-with-glibc2.35