Skip to content

Commit 3645a6e

Browse files
Browserstack regex (#808)
* Update browserstack.go * Update browserstack.go
1 parent e3107ad commit 3645a6e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/detectors/browserstack/browserstack.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ var (
2020
client = common.SaneHttpClient()
2121

2222
// Make sure that your group is surrounded in boundary characters such as below to reduce false positives.
23-
keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"browserstack"}) + `\b([0-9a-zA-Z]{20})\b`)
24-
userPat = regexp.MustCompile(detectors.PrefixRegex([]string{"browserstack"}) + `\b([0-9a-zA-Z]{3,10}_[0-9a-zA-Z]{6})\b`)
23+
keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"browserstack","key","automate","local"}) + `\b([0-9a-zA-Z]{20})\b`)
24+
userPat = regexp.MustCompile(detectors.PrefixRegex([]string{"browserstack","user","automate","local"}) + `\b(^[a-zA-Z\d]+([._-]?[a-zA-Z\d]+)*[a-zA-Z\d]+$)\b`)
2525
)
2626

2727
// Keywords are used for efficiently pre-filtering chunks.

0 commit comments

Comments
 (0)