mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 13:14:22 +01:00
replace std library regex engine with go-re2 (#1669)
This commit is contained in:
1 parent
906085fba6
commit
a91c6717a0
44 files changed
+92
-77
No files matched your search
@@ -2,7 +2,8 @@ package rules
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
|
||||
regexp "github.com/wasilibs/go-re2"
|
||||
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
|
||||
@@ -42,7 +43,7 @@ func KubernetesSecret() *config.Rule {
|
||||
regexp.MustCompile(`[\w.-]+:(?:[ \t]*(?:\||>[-+]?)\s+)?[ \t]*(?:\{\{[ \t\w"|$:=,.-]+}}|""|'')`),
|
||||
// TODO: Requires multiple allowlists to target match.
|
||||
// Avoid overreach between directives.
|
||||
//regexp.MustCompile(`(kind:(.|\s)+\n---\n(.|\s)+\bdata:|data:(.|\s)+\n---\n(.|\s)+\bkind:)`),
|
||||
// regexp.MustCompile(`(kind:(.|\s)+\n---\n(.|\s)+\bdata:|data:(.|\s)+\n---\n(.|\s)+\bkind:)`),
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -250,9 +251,9 @@ type: Opaque
|
||||
// name: mysecret
|
||||
// creationPolicy: Owner
|
||||
//
|
||||
//---
|
||||
// ---
|
||||
//
|
||||
//kind: ConfigMap
|
||||
// kind: ConfigMap
|
||||
// data:
|
||||
// conversionStrategy: Default
|
||||
// decodingStrategy: None
|
||||
|
||||
Reference in new issue
Block a user