mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 20:54:22 +01:00
Add new jira api token pattern (#1601)
* add new jira api token pattern * Apply suggestions from code review Co-authored-by: Richard Gomez <32133502+rgmz@users.noreply.github.com> * apply comments from PR * Apply suggestions from code review Co-authored-by: Richard Gomez <32133502+rgmz@users.noreply.github.com> * apply comments from PR --------- Co-authored-by: Richard Gomez <32133502+rgmz@users.noreply.github.com>
This commit is contained in:
1 parent
48ea14bd47
commit
4181ad647a
3 files changed
+24
-4
No files matched your search
@@ -50,6 +50,16 @@ func GenerateSemiGenericRegex(identifiers []string, secretRegex string, isCaseIn
|
||||
return regexp.MustCompile(sb.String())
|
||||
}
|
||||
|
||||
func MergeRegexps(regexps ...*regexp.Regexp) *regexp.Regexp {
|
||||
patterns := make([]string, len(regexps))
|
||||
|
||||
for i, r := range regexps {
|
||||
patterns[i] = r.String()
|
||||
}
|
||||
|
||||
return regexp.MustCompile(strings.Join(patterns, "|"))
|
||||
}
|
||||
|
||||
func writeIdentifiers(sb *strings.Builder, identifiers []string) {
|
||||
sb.WriteString(identifierPrefix)
|
||||
sb.WriteString(strings.Join(identifiers, "|"))
|
||||
|
||||
Reference in new issue
Block a user