Skip to content

Commit

Permalink
Add match boundary to okta regular expressions (#1531)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcastorina authored Jul 24, 2023
1 parent fab8044 commit 93c561f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/detectors/okta/okta.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ type Scanner struct{}
var _ detectors.Detector = (*Scanner)(nil)

var (
domainPat = regexp.MustCompile(`[a-z0-9-]{1,40}\.okta(?:preview|-emea){0,1}\.com`)
tokenPat = regexp.MustCompile(`00[a-zA-Z0-9_-]{40}`)
domainPat = regexp.MustCompile(`\b[a-z0-9-]{1,40}\.okta(?:preview|-emea){0,1}\.com\b`)
tokenPat = regexp.MustCompile(`\b00[a-zA-Z0-9_-]{40}\b`)
// TODO: Oauth client secrets
)

Expand Down

0 comments on commit 93c561f

Please sign in to comment.