detect-secrets icon indicating copy to clipboard operation
detect-secrets copied to clipboard

Support for Configuration File

Open bdellegrazie opened this issue 2 years ago • 1 comments

  • I'm submitting a ...

    • [X] feature request
  • What is the current behavior? Detect secrets only accepts command line options for configuration

  • What is the expected behavior? I'd like detect secrets to be able to take a configuration file where the common options can be set for use both by the command line and in a pre-commit hook. This makes it easier / simpler to consistently use filter lists and get the same behaviour in a pre-commit hook and by the command line.

  • What is the motivation / use case for changing the behavior? Simpler command line usage in concert with pre-commit hook usage. It's certainly possible to do this with a shell script wrapper but that changes the invocation in pre-commit. It's pretty common for tools of this nature to support a configuration file (e.g. yamllint, eslint etc.) for exactly this reason

  • Please tell us about your environment:

    • detect-secrets Version: latest 1.4.0
    • Python Version: 3.9.9 / 3.10.6 / 3.11.0
    • OS Version: Ubuntu 22.04, MacOS latest
    • File type (if applicable): N/A

bdellegrazie avatar Jan 10 '23 08:01 bdellegrazie

Hi @bdellegrazie, thank you for submitting this feature request!

@jpdakran and I have discussed this feature in the past and we believe it would be a great addition to detect-secrets. We added this on our to-do list, but since such a change would probably require a major release, it might take some time before it'll get implemented and released. We'll make sure to keep you posted on it, though.

lorenzodb1 avatar Apr 03 '23 14:04 lorenzodb1