mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 13:14:22 +01:00
add word boundary to regex
Co-authored-by: Ben-grmbl <173737458+Ben-grmbl@users.noreply.github.com>
This commit is contained in:
1 parent
86fecfb2da
commit
7701eb7777
1 file changed
+1
-1
@@ -119,7 +119,7 @@ func GitlabPatRoutable() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
RuleID: "gitlab-pat-routable",
|
RuleID: "gitlab-pat-routable",
|
||||||
Description: "Identified a GitLab Personal Access Token (routable), risking unauthorized access to GitLab repositories and codebase exposure.",
|
Description: "Identified a GitLab Personal Access Token (routable), risking unauthorized access to GitLab repositories and codebase exposure.",
|
||||||
Regex: regexp.MustCompile(`glpat-[0-9a-zA-Z_-]{27,300}\.[0-9a-z]{2}[0-9a-z]{7}`),
|
Regex: regexp.MustCompile(`\bglpat-[0-9a-zA-Z_-]{27,300}\.[0-9a-z]{2}[0-9a-z]{7}\b`),
|
||||||
Entropy: 4,
|
Entropy: 4,
|
||||||
Keywords: []string{"glpat-"},
|
Keywords: []string{"glpat-"},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user