Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
Doubled timeout, as MongoDB secrets are repeatedly hitting this and failing to verify (#5222)
Jordan Tunstill961030671f38
diff --git a/pkg/detectors/mongodb/mongodb.go b/pkg/detectors/mongodb/mongodb.goindex 0aee27c5c..052749a08 100644--- a/pkg/detectors/mongodb/mongodb.go+++ b/pkg/detectors/mongodb/mongodb.go@@ -27,7 +27,7 @@ var _ detectors.Detector = (*Scanner)(nil)var _ detectors.CustomFalsePositiveChecker = (*Scanner)(nil)var (- defaultTimeout = 5 * time.Second+ defaultTimeout = 10 * time.Second// Make sure that your group is surrounded in boundary characters such as below to reduce false positives.connStrPat = regexp.MustCompile(`\b(mongodb(?:\+srv)?://(?P<username>\S{3,50}):(?P<password>\S{3,88})@(?P<host>[-.%\w]+(?::\d{1,5})?(?:,[-.%\w]+(?::\d{1,5})?)*)(?:/(?P<authdb>[\w-]+)?(?P<options>\?\w+=[\w@/.$-]+(?:&(?:amp;)?\w+=[\w@/.$-]+)*)?)?)(?:\b|$)`)// TODO: Add support for sharded cluster, replica set and Atlas Deployment.