mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-12-02 05:54:21 +01:00
more bug
This commit is contained in:
1 parent
165df09348
commit
6fed917106
1 file changed
+2
-2
+2
-2
@@ -163,7 +163,7 @@ func (d *Detector) detectRule(fragment Fragment, rule *config.Rule) []report.Fin
|
||||
groups := rule.Regex.FindStringSubmatch(secret)
|
||||
if len(groups) <= rule.SecretGroup || len(groups) == 0 {
|
||||
// Config validation should prevent this
|
||||
break
|
||||
continue
|
||||
}
|
||||
secret = groups[rule.SecretGroup]
|
||||
finding.Secret = secret
|
||||
@@ -174,7 +174,7 @@ func (d *Detector) detectRule(fragment Fragment, rule *config.Rule) []report.Fin
|
||||
finding.Entropy = float32(entropy)
|
||||
if rule.EntropySet() && entropy <= rule.Entropy {
|
||||
// entropy is too low, skip this finding
|
||||
return findings
|
||||
continue
|
||||
}
|
||||
findings = append(findings, finding)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user