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

Feature Request: API for detecting secrets for sources other than files #713

Open JLLeitschuh opened 1 year ago

JLLeitschuh commented 1 year ago

The current API and implementation is heavily reliant upon the expectation that this project will be used to scan a filesystem. However, it may be useful to find secrets that have in some string that may only exist in memory.

It would be great if you could scan a given string you have in memory and determine if that string contains a secret.

This would allow this library to be used to detect secrets in context outside of just a filesystem, but more generally as a secret detection library.

issabayevmk commented 4 months ago

Hi @lorenzodb1. Can you please check my pull request https://github.com/Yelp/detect-secrets/pull/836 which introduces API for calling detect-secrets from python scripts. It has following features: