diff --git a/pkg/detectors/paypaloauth/paypaloauth.go b/pkg/detectors/paypaloauth/paypaloauth.go index d8a0f502..e76f7657 100644 --- a/pkg/detectors/paypaloauth/paypaloauth.go +++ b/pkg/detectors/paypaloauth/paypaloauth.go @@ -22,8 +22,8 @@ var ( client = common.SaneHttpClient() // Make sure that your group is surrounded in boundary characters such as below to reduce false positives. - idPat = regexp.MustCompile(`\b([A-Za-z0-9_\.]{7}-[A-Za-z0-9_\.]{72})\b`) - keyPat = regexp.MustCompile(`\b([A-Za-z0-9_\.]{69}-[A-Za-z0-9_\.]{10})\b`) + idPat = regexp.MustCompile(`\b([A-Za-z0-9_\.]{7}-[A-Za-z0-9_\.]{72}|[A-Za-z0-9_\.]{5}-[A-Za-z0-9_\.]{34})\b`) + keyPat = regexp.MustCompile(`\b([A-Za-z0-9_\.\-]{40,80})\b`) ) // Keywords are used for efficiently pre-filtering chunks. diff --git a/pkg/detectors/paypaloauth/paypaloauth_test.go b/pkg/detectors/paypaloauth/paypaloauth_test.go index 55ed1e08..f4d5e320 100644 --- a/pkg/detectors/paypaloauth/paypaloauth_test.go +++ b/pkg/detectors/paypaloauth/paypaloauth_test.go @@ -52,6 +52,10 @@ func TestPaypalOauth_FromChunk(t *testing.T) { DetectorType: detectorspb.DetectorType_PaypalOauth, Verified: true, }, + { + DetectorType: detectorspb.DetectorType_PaypalOauth, + Verified: false, + }, }, wantErr: false, }, @@ -68,6 +72,10 @@ func TestPaypalOauth_FromChunk(t *testing.T) { DetectorType: detectorspb.DetectorType_PaypalOauth, Verified: false, }, + { + DetectorType: detectorspb.DetectorType_PaypalOauth, + Verified: false, + }, }, wantErr: false, },