trufflehog icon indicating copy to clipboard operation
trufflehog copied to clipboard

Option to use custom regex with and without the already available detectors

Open LuD1161 opened this issue 3 years ago • 2 comments

Description

Currently trufflehog has it's share of over 600 detectors. Which is an exhaustive set in itself. Here, I am talking about scenarios where a developer/organisation would want to use this and add their custom regexes. Such as patterns of internal api keys or code bases etc.

Problem to be Addressed

Currently there's no option to add custom regexes, as far as I could check.

Description of the Preferred Solution

It would be good if we could pass in a file with regex pattern on each line.

LuD1161 avatar Jun 01 '22 05:06 LuD1161

I would love to work on this, if someone's not working on this already 😅

LuD1161 avatar Jun 01 '22 05:06 LuD1161

any update on this? I am trying something like this -

  • name: TruffleHog Secret Scan uses: trufflesecurity/[email protected] with: path: ./ base: ${{ env.BRANCH }} head: HEAD args: "--only-verified --entropy=false --regex --rules=regexes.json"

sjgupta19 avatar Jul 27 '22 20:07 sjgupta19

Hi @LuD1161 i'm going to close this issue as you should now be able to provide a custom regex along with verification as of V3.20.0

Some additional information can be found here

ahrav avatar Apr 11 '23 02:04 ahrav