Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
Disable sentiment verifier and update teams webhook to avoid being stateful (#646)
Dustin Deckerc2426df4d692
diff --git a/pkg/detectors/microsoftteamswebhook/microsoftteamswebhook.go b/pkg/detectors/microsoftteamswebhook/microsoftteamswebhook.goindex 416b140ce..76ef21c74 100644--- a/pkg/detectors/microsoftteamswebhook/microsoftteamswebhook.go+++ b/pkg/detectors/microsoftteamswebhook/microsoftteamswebhook.go@@ -47,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultRaw: []byte(resMatch),}if verify {- payload := strings.NewReader(`{'text':'This is a verification message from TruffleHog. It means that there has been a live webhook credential found.'}`)+ payload := strings.NewReader(`{'text':''}`)req, err := http.NewRequestWithContext(ctx, "POST", resMatch, payload)if err != nil {continue@@ -58,7 +58,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultbody, err := io.ReadAll(res.Body)res.Body.Close()if err == nil {- if res.StatusCode >= 200 && string(body) == "1" {+ if res.StatusCode >= 200 && strings.Contains(string(body), "Text is required") {s1.Verified = true}}diff --git a/pkg/engine/defaults.go b/pkg/engine/defaults.goindex d97c0e593..c763c3185 100644--- a/pkg/engine/defaults.go+++ b/pkg/engine/defaults.go@@ -527,7 +527,6 @@ import ("github.com/trufflesecurity/trufflehog/v3/pkg/detectors/sendbirdorganizationapi""github.com/trufflesecurity/trufflehog/v3/pkg/detectors/sendgrid""github.com/trufflesecurity/trufflehog/v3/pkg/detectors/sendinbluev2"- "github.com/trufflesecurity/trufflehog/v3/pkg/detectors/sentiment""github.com/trufflesecurity/trufflehog/v3/pkg/detectors/sentrytoken""github.com/trufflesecurity/trufflehog/v3/pkg/detectors/serphouse""github.com/trufflesecurity/trufflehog/v3/pkg/detectors/serpstack"@@ -1184,7 +1183,7 @@ func DefaultDetectors() []detectors.Detector {blitapp.Scanner{},restpackhtmltopdfapi.Scanner{},webscraping.Scanner{},- sentiment.Scanner{},+ // sentiment.Scanner{},geoapify.Scanner{},dfuse.Scanner{},gitter.Scanner{},