From d96b7f84688dec577ce9b59cb45a5b2c7ffb6839 Mon Sep 17 00:00:00 2001 From: Pulkit Aggarwal <112526570+pulkitanz@users.noreply.github.com> Date: Wed, 7 Dec 2022 10:36:55 +1100 Subject: [PATCH] Update Adding_Detectors_external.md (#957) --- hack/docs/Adding_Detectors_external.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hack/docs/Adding_Detectors_external.md b/hack/docs/Adding_Detectors_external.md index c1782efb8..8457463da 100644 --- a/hack/docs/Adding_Detectors_external.md +++ b/hack/docs/Adding_Detectors_external.md @@ -49,8 +49,12 @@ If you think that something should be included outside of these guidelines, plea ```bash go run hack/generate/generate.go detector ``` +3. Add Secret Scanner -3. Complete the secret detector. + Add the secret scanner to the `pkg/engine/defaults.go` file like `github.com/trufflesecurity/trufflehog/v3/pkg/detectors/` and + `.Scanner{},` + +4. Complete the secret detector. The previous step templated a boilerplate + some example code as a package in the `pkg/detectors` folder for you to work on. The secret detector can be completed with these general steps: @@ -104,4 +108,4 @@ Now, the detector test should attempt to load the given env key from that file. ### Testing a detector ```bash go test ./pkg/detectors/ -tags=detectors - ``` \ No newline at end of file + ```