Skip to content

Commit

Permalink
Browserstack regex (#808)
Browse files Browse the repository at this point in the history
* Update browserstack.go

* Update browserstack.go
  • Loading branch information
rahuljaisinghani authored Sep 25, 2022
1 parent e3107ad commit 3645a6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/detectors/browserstack/browserstack.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ var (
client = common.SaneHttpClient()

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

// Keywords are used for efficiently pre-filtering chunks.
Expand Down

0 comments on commit 3645a6e

Please sign in to comment.