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

How to ignore executables and link libraries when detect

Open BoOuyang-TigerGraph opened this issue 4 years ago • 1 comments

Hi all, I am using detect secrets to scan the environment when the program is running, rather than the source code of the program. In order to improve the scanning speed, I don't want to scan the binary executable of the program. How can I set it?

best regards

BoOuyang-TigerGraph avatar Nov 17 '21 01:11 BoOuyang-TigerGraph

Hello. You can use the --exclude-files filter. This can be done via the CLI using the --exclude-files argument which accepts a regex. Or you can use the same filter in the .secrets.baseline file under the following filter with your custom file path regex:

{
      "path": "detect_secrets.filters.regex.should_exclude_file",
      "pattern": [
        "test*"
      ]
}

jpdakran avatar Sep 28 '22 20:09 jpdakran

We're going to close this issue as it hasn't received any update in a very long time. Feel free to re-open it if you think it's still relevant.

lorenzodb1 avatar May 16 '24 17:05 lorenzodb1