trufflehog icon indicating copy to clipboard operation
trufflehog copied to clipboard

Allow running multiple custom config files via `--config` flag

Open bugbaba opened this issue 2 years ago • 2 comments

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Hello Team :)

Description

While trying out the new custom regex feature, I noticed that currently, it's only accepting one config file which restricts to only use one custom check at a time. It would be better to allow multiple config files and run them in one go.

Or the other not so great approach could be that when the custom config is passed the default checks aren't being run so that users can loop against multiple config files.

Problem to be Addressed

Allow running multiple custom config files.

Description of the Preferred Solution

The --config flag can be passed multiple times or take a directory as input similar to nuclei.

-- Regards, @bugbaba

bugbaba avatar Jan 07 '23 16:01 bugbaba

Hey, thanks for trying out the new feature!

it's only accepting one config file which restricts to only use one custom check at a time

For the time being, you should be able to put multiple configurations under detectors: like so:

detectors:
- name: first detector
  keywords: ["keyword"]
  regex:
    foo: bar
- name: second detector
  keywords: ["keyword"]
  regex:
    bar: baz

mcastorina avatar Jan 10 '23 20:01 mcastorina

Thanks it works. Though Detector Type: in the output should use the name defined in the yaml file instead of CustomRegex.

image

bugbaba avatar Jan 11 '23 04:01 bugbaba

Screenshot 2024-02-16 at 3 37 17 PM

This issue has been fixed (testing using sample custom config example in the readme)

zricethezav avatar Feb 16 '24 21:02 zricethezav