From 93c561f324f57e563d47374e07a29ef49209f27e Mon Sep 17 00:00:00 2001 From: Miccah Date: Mon, 24 Jul 2023 10:52:50 -0500 Subject: [PATCH 1/2] Add match boundary to okta regular expressions (#1531) --- pkg/detectors/okta/okta.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/detectors/okta/okta.go b/pkg/detectors/okta/okta.go index 479ca73d487e..074acbbafc9c 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 ) From fd6c2815891f845f70c4fbcda1876854a3929a0b Mon Sep 17 00:00:00 2001 From: Dustin Decker Date: Mon, 24 Jul 2023 16:27:11 -0700 Subject: [PATCH 2/2] update couchbase dep (#1540) --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 2c3a77cfc6d2..d96fb919575f 100644 --- a/go.mod +++ b/go.mod @@ -94,7 +94,7 @@ require ( github.com/cloudflare/circl v1.3.3 // indirect github.com/connesc/cipherio v0.2.1 // indirect github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect - github.com/couchbase/gocbcore/v10 v10.2.3 // indirect + github.com/couchbase/gocbcore/v10 v10.2.5 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dimchansky/utfbom v1.1.1 // indirect github.com/docker/cli v23.0.5+incompatible // indirect diff --git a/go.sum b/go.sum index dc8fd458b058..a7dc66dbc4ed 100644 --- a/go.sum +++ b/go.sum @@ -121,6 +121,8 @@ github.com/couchbase/gocb/v2 v2.6.3 h1:5RsMo+RRfK0mVxHLAfpBz3/tHlgXZb1WBNItLk9Ab github.com/couchbase/gocb/v2 v2.6.3/go.mod h1:yF5F6BHTZ/ZowhEuZbySbXrlI4rHd1TIhm5azOaMbJU= github.com/couchbase/gocbcore/v10 v10.2.3 h1:PEkRSNSkKjUBXx82Ucr094+anoiCG5GleOOQZOHo6D4= github.com/couchbase/gocbcore/v10 v10.2.3/go.mod h1:lYQIIk+tzoMcwtwU5GzPbDdqEkwkH3isI2rkSpfL0oM= +github.com/couchbase/gocbcore/v10 v10.2.5 h1:3hdQMwevxW4EDlrxvQgjGP/BkalhTnMSGww7YIFd8jE= +github.com/couchbase/gocbcore/v10 v10.2.5/go.mod h1:lYQIIk+tzoMcwtwU5GzPbDdqEkwkH3isI2rkSpfL0oM= github.com/couchbaselabs/gocaves/client v0.0.0-20230307083111-cc3960c624b1/go.mod h1:AVekAZwIY2stsJOMWLAS/0uA/+qdp7pjO8EHnl61QkY= github.com/couchbaselabs/gocaves/client v0.0.0-20230404095311-05e3ba4f0259 h1:2TXy68EGEzIMHOx9UvczR5ApVecwCfQZ0LjkmwMI6g4= github.com/couchbaselabs/gocaves/client v0.0.0-20230404095311-05e3ba4f0259/go.mod h1:AVekAZwIY2stsJOMWLAS/0uA/+qdp7pjO8EHnl61QkY=