Skip to content

Commit 1e16a29

Browse files
authored
feat(mongodb): increase timeout to 5 seconds (#3620)
1 parent 6a77b73 commit 1e16a29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/detectors/mongodb/mongodb.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var _ detectors.Detector = (*Scanner)(nil)
2727
var _ detectors.CustomFalsePositiveChecker = (*Scanner)(nil)
2828

2929
var (
30-
defaultTimeout = 2 * time.Second
30+
defaultTimeout = 5 * time.Second
3131
// Make sure that your group is surrounded in boundary characters such as below to reduce false positives.
3232
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|$)`)
3333
// TODO: Add support for sharded cluster, replica set and Atlas Deployment.

0 commit comments

Comments
 (0)