Skip to content

Find, verify, and analyze leaked credentials

Add match boundary to okta regular expressions (#1531)

Miccah93c561f324f5
diff --git a/pkg/detectors/okta/okta.go b/pkg/detectors/okta/okta.go
index 479ca73d4..074acbbaf 100644
--- a/pkg/detectors/okta/okta.go
+++ b/pkg/detectors/okta/okta.go
@@ -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
)