Yelp / detect-secrets

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

scan_line method not detecting secrets in passed string #709

Open pbraband opened 1 year ago

pbraband commented 1 year ago
Fennerr commented 2 months ago

I had the same issue. Importing the default_settings, and then wrapping the scan_line inside of a with line fixed it for me:

from detect_secrets.settings import default_settings
...
with default_settings():
    secrets = list(scan_line(variable.value))