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:
Oscar BlancoandRichard Gomez authored and GitHub committed 2024-10-31 08:19:05 -05:00
1 parent 48ea14bd47
commit 4181ad647a
3 files changed
+24 -4

No files matched your search

+10
View File
@@ -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, "|"))