Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
fixed helpscout detector regex and verifier (#2056)
Ankush Goelab896890b407
diff --git a/pkg/detectors/helpscout/helpscout.go b/pkg/detectors/helpscout/helpscout.goindex becc8caa9..ed139de33 100644--- a/pkg/detectors/helpscout/helpscout.go+++ b/pkg/detectors/helpscout/helpscout.go@@ -2,7 +2,6 @@ package helpscoutimport ("context"- "fmt""net/http""regexp""strings"@@ -21,7 +20,7 @@ var (client = common.SaneHttpClient()// Make sure that your group is surrounded in boundary characters such as below to reduce false positives.- keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"helpscout"}) + `\b([A-Za-z0-9]{56})\b`)+ keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"helpscout"}) + `\b([a-z0-9]{40})\b`))// Keywords are used for efficiently pre-filtering chunks.@@ -52,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif err != nil {continue}- req.Header.Add("Authorization", fmt.Sprintf("Basic %s", resMatch))+ req.SetBasicAuth(resMatch, "X")res, err := client.Do(req)if err == nil {defer res.Body.Close()