Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
add lazy quantifier to prefixregex (#2466)
Zachary Rice834163acf534
diff --git a/pkg/detectors/detectors.go b/pkg/detectors/detectors.goindex ba50c9fbc..c316af87d 100644--- a/pkg/detectors/detectors.go+++ b/pkg/detectors/detectors.go@@ -159,7 +159,7 @@ func CleanResults(results []Result) []Result {func PrefixRegex(keywords []string) string {pre := `(?i)(?:`middle := strings.Join(keywords, "|")- post := `)(?:.|[\n\r]){0,40}`+ post := `)(?:.|[\n\r]){0,40}?`return pre + middle + post}