mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-12-01 13:34:23 +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)
|
groups := rule.Regex.FindStringSubmatch(secret)
|
||||||
if len(groups) <= rule.SecretGroup || len(groups) == 0 {
|
if len(groups) <= rule.SecretGroup || len(groups) == 0 {
|
||||||
// Config validation should prevent this
|
// Config validation should prevent this
|
||||||
break
|
continue
|
||||||
}
|
}
|
||||||
secret = groups[rule.SecretGroup]
|
secret = groups[rule.SecretGroup]
|
||||||
finding.Secret = secret
|
finding.Secret = secret
|
||||||
@@ -174,7 +174,7 @@ func (d *Detector) detectRule(fragment Fragment, rule *config.Rule) []report.Fin
|
|||||||
finding.Entropy = float32(entropy)
|
finding.Entropy = float32(entropy)
|
||||||
if rule.EntropySet() && entropy <= rule.Entropy {
|
if rule.EntropySet() && entropy <= rule.Entropy {
|
||||||
// entropy is too low, skip this finding
|
// entropy is too low, skip this finding
|
||||||
return findings
|
continue
|
||||||
}
|
}
|
||||||
findings = append(findings, finding)
|
findings = append(findings, finding)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user