mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-28 20:24:22 +01:00
24 lines
330 B
Go
24 lines
330 B
Go
package config
|
|
|
|
import (
|
|
"regexp"
|
|
)
|
|
|
|
type Rule struct {
|
|
Description string
|
|
RuleID string
|
|
Entropy float64
|
|
SecretGroup int
|
|
Regex *regexp.Regexp
|
|
Path *regexp.Regexp
|
|
Tags []string
|
|
Allowlist Allowlist
|
|
}
|
|
|
|
func (r *Rule) EntropySet() bool {
|
|
if r.Entropy == 0.0 {
|
|
return false
|
|
}
|
|
return true
|
|
}
|