Skip to content

Commit

Permalink
fixing razorpay (#1852)
Browse files Browse the repository at this point in the history
Co-authored-by: counter <[email protected]>
  • Loading branch information
dxa4481 and counter authored Oct 2, 2023
1 parent 24748b3 commit b232ec8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/detectors/razorpay/razorpay.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ var _ detectors.Detector = (*Scanner)(nil)
var (
client = common.SaneHttpClient()

keyPat = regexp.MustCompile(`(?i)\brzp_live_\w{10,20}\b`)
secretPat = regexp.MustCompile(detectors.PrefixRegex([]string{"razor|secret|rzp|key"}) + `([A-Za-z0-9]{20,50})`)
keyPat = regexp.MustCompile(`(?i)\brzp_live_[A-Za-z0-9]{14}\b`)
secretPat = regexp.MustCompile(`\b[A-Za-z0-9]{24}\b`)
)

// Keywords are used for efficiently pre-filtering chunks.
// Use identifiers in the secret preferably, or the provider name.
func (s Scanner) Keywords() []string {
return []string{"rzp_"}
return []string{"rzp_live_"}
}

// FromData will find and optionally verify RazorPay secrets in a given set of bytes.
Expand Down

0 comments on commit b232ec8

Please sign in to comment.