Skip to content

Find, verify, and analyze leaked credentials

Move detectors.IsKnownFalsePositive from the detectors and into the engine (#2643)

Dustin Decker14e44db2be95
diff --git a/main.go b/main.go
index d30a764a9..de91f4831 100644
--- a/main.go
+++ b/main.go
@@ -653,10 +653,10 @@ func parseResults(input *string) (map[string]struct{}, error) {
)
for _, value := range values {
switch value {
- case "verified", "unknown", "unverified":
+ case "verified", "unknown", "unverified", "filtered_unverified":
results[value] = struct{}{}
default:
- return nil, fmt.Errorf("invalid value '%s', valid values are 'verified,unknown,unverified'", value)
+ return nil, fmt.Errorf("invalid value '%s', valid values are 'verified,unknown,unverified,filtered_unverified'", value)
}
}
return results, nil
diff --git a/pkg/detectors/abbysale/abbysale.go b/pkg/detectors/abbysale/abbysale.go
index 0bea49261..047c89d08 100644
--- a/pkg/detectors/abbysale/abbysale.go
+++ b/pkg/detectors/abbysale/abbysale.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, resMatch)
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/abstract/abstract.go b/pkg/detectors/abstract/abstract.go
index b88883a7b..d6db71a9f 100644
--- a/pkg/detectors/abstract/abstract.go
+++ b/pkg/detectors/abstract/abstract.go
@@ -65,11 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, resMatch)
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/abuseipdb/abuseipdb.go b/pkg/detectors/abuseipdb/abuseipdb.go
index 83febcd13..238f59530 100644
--- a/pkg/detectors/abuseipdb/abuseipdb.go
+++ b/pkg/detectors/abuseipdb/abuseipdb.go
@@ -68,11 +68,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, resMatch)
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/accuweather/accuweather.go b/pkg/detectors/accuweather/accuweather.go
index e7ebadae6..7fdac2635 100644
--- a/pkg/detectors/accuweather/accuweather.go
+++ b/pkg/detectors/accuweather/accuweather.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, resMatch)
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/adafruitio/adafruitio.go b/pkg/detectors/adafruitio/adafruitio.go
index d38a579bc..612879b24 100644
--- a/pkg/detectors/adafruitio/adafruitio.go
+++ b/pkg/detectors/adafruitio/adafruitio.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, resMatch)
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/adobeio/adobeio.go b/pkg/detectors/adobeio/adobeio.go
index fae2111f7..1efe07cbb 100644
--- a/pkg/detectors/adobeio/adobeio.go
+++ b/pkg/detectors/adobeio/adobeio.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/adzuna/adzuna.go b/pkg/detectors/adzuna/adzuna.go
index eb13aad41..5fb06ba2d 100644
--- a/pkg/detectors/adzuna/adzuna.go
+++ b/pkg/detectors/adzuna/adzuna.go
@@ -73,11 +73,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, resMatch)
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
}
diff --git a/pkg/detectors/aeroworkflow/aeroworkflow.go b/pkg/detectors/aeroworkflow/aeroworkflow.go
index 780a78265..80375b8df 100644
--- a/pkg/detectors/aeroworkflow/aeroworkflow.go
+++ b/pkg/detectors/aeroworkflow/aeroworkflow.go
@@ -75,10 +75,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, resMatch)
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
results = append(results, s1)
}
diff --git a/pkg/detectors/agora/agora.go b/pkg/detectors/agora/agora.go
index ce1e101b8..fe7fb55c6 100644
--- a/pkg/detectors/agora/agora.go
+++ b/pkg/detectors/agora/agora.go
@@ -76,11 +76,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, resMatch)
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
}
diff --git a/pkg/detectors/aha/aha.go b/pkg/detectors/aha/aha.go
index 41aa29c0e..9126386c9 100644
--- a/pkg/detectors/aha/aha.go
+++ b/pkg/detectors/aha/aha.go
@@ -73,11 +73,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, resMatch)
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/airbrakeprojectkey/airbrakeprojectkey.go b/pkg/detectors/airbrakeprojectkey/airbrakeprojectkey.go
index 4fdd1bca7..1c98fd610 100644
--- a/pkg/detectors/airbrakeprojectkey/airbrakeprojectkey.go
+++ b/pkg/detectors/airbrakeprojectkey/airbrakeprojectkey.go
@@ -76,12 +76,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s1.Verified {
- if detectors.IsKnownFalsePositive(string(s1.Raw), detectors.DefaultFalsePositives, true) {
- continue
- }
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/airbrakeuserkey/airbrakeuserkey.go b/pkg/detectors/airbrakeuserkey/airbrakeuserkey.go
index fc9b13f35..5f1a916d1 100644
--- a/pkg/detectors/airbrakeuserkey/airbrakeuserkey.go
+++ b/pkg/detectors/airbrakeuserkey/airbrakeuserkey.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/airship/airship.go b/pkg/detectors/airship/airship.go
index 70c32d54b..8479fe75c 100644
--- a/pkg/detectors/airship/airship.go
+++ b/pkg/detectors/airship/airship.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/airtableapikey/airtableapikey.go b/pkg/detectors/airtableapikey/airtableapikey.go
index 1eaaf2032..01ca34972 100644
--- a/pkg/detectors/airtableapikey/airtableapikey.go
+++ b/pkg/detectors/airtableapikey/airtableapikey.go
@@ -92,10 +92,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.Verified = true
}
}
- } else {
- if detectors.IsKnownFalsePositive(keyRes, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/airvisual/airvisual.go b/pkg/detectors/airvisual/airvisual.go
index 72d09348f..ee2ac2978 100644
--- a/pkg/detectors/airvisual/airvisual.go
+++ b/pkg/detectors/airvisual/airvisual.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/aiven/aiven.go b/pkg/detectors/aiven/aiven.go
index 451ed8ad0..9f514c73b 100644
--- a/pkg/detectors/aiven/aiven.go
+++ b/pkg/detectors/aiven/aiven.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/alchemy/alchemy.go b/pkg/detectors/alchemy/alchemy.go
index eb8b12dda..be1e05826 100644
--- a/pkg/detectors/alchemy/alchemy.go
+++ b/pkg/detectors/alchemy/alchemy.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, match)
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(match, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/alconost/alconost.go b/pkg/detectors/alconost/alconost.go
index 99699c9f0..1a7faf98d 100644
--- a/pkg/detectors/alconost/alconost.go
+++ b/pkg/detectors/alconost/alconost.go
@@ -62,11 +62,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/alegra/alegra.go b/pkg/detectors/alegra/alegra.go
index 8ef7c0b9c..c23b5cb12 100644
--- a/pkg/detectors/alegra/alegra.go
+++ b/pkg/detectors/alegra/alegra.go
@@ -2,10 +2,11 @@ package alegra
import (
"context"
- regexp "github.com/wasilibs/go-re2"
"net/http"
"strings"
+ regexp "github.com/wasilibs/go-re2"
+
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
@@ -67,11 +68,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(tokenPatMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/aletheiaapi/aletheiaapi.go b/pkg/detectors/aletheiaapi/aletheiaapi.go
index c22eee4c8..1c83a01f6 100644
--- a/pkg/detectors/aletheiaapi/aletheiaapi.go
+++ b/pkg/detectors/aletheiaapi/aletheiaapi.go
@@ -2,11 +2,12 @@ package aletheiaapi
import (
"context"
- regexp "github.com/wasilibs/go-re2"
"net/http"
"strings"
"time"
+ regexp "github.com/wasilibs/go-re2"
+
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
@@ -60,11 +61,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/algoliaadminkey/algoliaadminkey.go b/pkg/detectors/algoliaadminkey/algoliaadminkey.go
index 49c15b3e3..ee0739ac9 100644
--- a/pkg/detectors/algoliaadminkey/algoliaadminkey.go
+++ b/pkg/detectors/algoliaadminkey/algoliaadminkey.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/alibaba/alibaba.go b/pkg/detectors/alibaba/alibaba.go
index 26570c647..0a5f5a035 100644
--- a/pkg/detectors/alibaba/alibaba.go
+++ b/pkg/detectors/alibaba/alibaba.go
@@ -116,10 +116,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, resMatch)
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
results = append(results, s1)
}
}
diff --git a/pkg/detectors/alienvault/alienvault.go b/pkg/detectors/alienvault/alienvault.go
index 61a38ced5..15e281c07 100644
--- a/pkg/detectors/alienvault/alienvault.go
+++ b/pkg/detectors/alienvault/alienvault.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/allsports/allsports.go b/pkg/detectors/allsports/allsports.go
index 2fef074fb..e71ebdeaf 100644
--- a/pkg/detectors/allsports/allsports.go
+++ b/pkg/detectors/allsports/allsports.go
@@ -4,10 +4,10 @@ import (
"context"
"io"
"net/http"
- // "log"
- regexp "github.com/wasilibs/go-re2"
"strings"
+ regexp "github.com/wasilibs/go-re2"
+
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
@@ -64,10 +64,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if strings.Contains(body, "success") {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/amadeus/amadeus.go b/pkg/detectors/amadeus/amadeus.go
index 561dba6fa..37893d126 100644
--- a/pkg/detectors/amadeus/amadeus.go
+++ b/pkg/detectors/amadeus/amadeus.go
@@ -73,11 +73,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
body := string(bodyBytes)
if (res.StatusCode >= 200 && res.StatusCode < 300) && strings.Contains(body, "access_token") {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/ambee/ambee.go b/pkg/detectors/ambee/ambee.go
index 1441e6eb4..3f2d498df 100644
--- a/pkg/detectors/ambee/ambee.go
+++ b/pkg/detectors/ambee/ambee.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/amplitudeapikey/amplitudeapikey.go b/pkg/detectors/amplitudeapikey/amplitudeapikey.go
index 9cfcb725d..c48cbc107 100644
--- a/pkg/detectors/amplitudeapikey/amplitudeapikey.go
+++ b/pkg/detectors/amplitudeapikey/amplitudeapikey.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/anthropic/anthropic.go b/pkg/detectors/anthropic/anthropic.go
index 100f35e71..a68cd90be 100644
--- a/pkg/detectors/anthropic/anthropic.go
+++ b/pkg/detectors/anthropic/anthropic.go
@@ -61,9 +61,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(err, resMatch)
}
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
results = append(results, s1)
}
diff --git a/pkg/detectors/anypoint/anypoint.go b/pkg/detectors/anypoint/anypoint.go
index 826a15f5e..f001a7bfe 100644
--- a/pkg/detectors/anypoint/anypoint.go
+++ b/pkg/detectors/anypoint/anypoint.go
@@ -67,11 +67,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/apacta/apacta.go b/pkg/detectors/apacta/apacta.go
index 7789c2044..9b43384f6 100644
--- a/pkg/detectors/apacta/apacta.go
+++ b/pkg/detectors/apacta/apacta.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/api2cart/api2cart.go b/pkg/detectors/api2cart/api2cart.go
index dd3080963..050614e03 100644
--- a/pkg/detectors/api2cart/api2cart.go
+++ b/pkg/detectors/api2cart/api2cart.go
@@ -67,11 +67,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if res.StatusCode >= 200 && res.StatusCode < 300 && result.ReturnCode == 0 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/apideck/apideck.go b/pkg/detectors/apideck/apideck.go
index 03a6eb10f..68f037e3d 100644
--- a/pkg/detectors/apideck/apideck.go
+++ b/pkg/detectors/apideck/apideck.go
@@ -68,11 +68,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/apiflash/apiflash.go b/pkg/detectors/apiflash/apiflash.go
index ed07a722a..9a6e1aee8 100644
--- a/pkg/detectors/apiflash/apiflash.go
+++ b/pkg/detectors/apiflash/apiflash.go
@@ -65,11 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/apifonica/apifonica.go b/pkg/detectors/apifonica/apifonica.go
index dbe1dcd55..bf770b3e3 100644
--- a/pkg/detectors/apifonica/apifonica.go
+++ b/pkg/detectors/apifonica/apifonica.go
@@ -68,11 +68,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/apify/apify.go b/pkg/detectors/apify/apify.go
index d75b19800..f612c217b 100644
--- a/pkg/detectors/apify/apify.go
+++ b/pkg/detectors/apify/apify.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/apilayer/apilayer.go b/pkg/detectors/apilayer/apilayer.go
index 144510bb7..07d673db3 100644
--- a/pkg/detectors/apilayer/apilayer.go
+++ b/pkg/detectors/apilayer/apilayer.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/apimatic/apimatic.go b/pkg/detectors/apimatic/apimatic.go
index ca37f0e2a..0e843c80f 100644
--- a/pkg/detectors/apimatic/apimatic.go
+++ b/pkg/detectors/apimatic/apimatic.go
@@ -70,11 +70,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(passPatMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/apiscience/apiscience.go b/pkg/detectors/apiscience/apiscience.go
index c7308f8e5..a813b36c7 100644
--- a/pkg/detectors/apiscience/apiscience.go
+++ b/pkg/detectors/apiscience/apiscience.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/apitemplate/apitemplate.go b/pkg/detectors/apitemplate/apitemplate.go
index 554f2fffb..8cc24b064 100644
--- a/pkg/detectors/apitemplate/apitemplate.go
+++ b/pkg/detectors/apitemplate/apitemplate.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/apollo/apollo.go b/pkg/detectors/apollo/apollo.go
index 30ff0f0b1..6e8dedcc3 100644
--- a/pkg/detectors/apollo/apollo.go
+++ b/pkg/detectors/apollo/apollo.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/appcues/appcues.go b/pkg/detectors/appcues/appcues.go
index 687e1f0f5..7e66993f8 100644
--- a/pkg/detectors/appcues/appcues.go
+++ b/pkg/detectors/appcues/appcues.go
@@ -76,11 +76,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/appfollow/appfollow.go b/pkg/detectors/appfollow/appfollow.go
index d0bf67166..37fc5a9ad 100644
--- a/pkg/detectors/appfollow/appfollow.go
+++ b/pkg/detectors/appfollow/appfollow.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/appointedd/appointedd.go b/pkg/detectors/appointedd/appointedd.go
index 6c6e3fe38..dedc59c93 100644
--- a/pkg/detectors/appointedd/appointedd.go
+++ b/pkg/detectors/appointedd/appointedd.go
@@ -63,10 +63,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if strings.Contains(body, "total") {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/appoptics/appoptics.go b/pkg/detectors/appoptics/appoptics.go
index 3b623ffbf..aed6875e0 100644
--- a/pkg/detectors/appoptics/appoptics.go
+++ b/pkg/detectors/appoptics/appoptics.go
@@ -81,11 +81,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/appsynergy/appsynergy.go b/pkg/detectors/appsynergy/appsynergy.go
index 210732e8a..4aaf50269 100644
--- a/pkg/detectors/appsynergy/appsynergy.go
+++ b/pkg/detectors/appsynergy/appsynergy.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/apptivo/apptivo.go b/pkg/detectors/apptivo/apptivo.go
index 5a4362c0b..2be5fe94d 100644
--- a/pkg/detectors/apptivo/apptivo.go
+++ b/pkg/detectors/apptivo/apptivo.go
@@ -76,11 +76,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/artifactory/artifactory.go b/pkg/detectors/artifactory/artifactory.go
index accdc385e..8b5236446 100644
--- a/pkg/detectors/artifactory/artifactory.go
+++ b/pkg/detectors/artifactory/artifactory.go
@@ -74,10 +74,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, resMatch)
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
results = append(results, s1)
}
diff --git a/pkg/detectors/artsy/artsy.go b/pkg/detectors/artsy/artsy.go
index d99a8a5c6..77ab08fa2 100644
--- a/pkg/detectors/artsy/artsy.go
+++ b/pkg/detectors/artsy/artsy.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/asanaoauth/asanaoauth.go b/pkg/detectors/asanaoauth/asanaoauth.go
index f6bb6dd17..ee7df3d2d 100644
--- a/pkg/detectors/asanaoauth/asanaoauth.go
+++ b/pkg/detectors/asanaoauth/asanaoauth.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/asanapersonalaccesstoken/asanapersonalaccesstoken.go b/pkg/detectors/asanapersonalaccesstoken/asanapersonalaccesstoken.go
index 0f220fbff..3e7342d47 100644
--- a/pkg/detectors/asanapersonalaccesstoken/asanapersonalaccesstoken.go
+++ b/pkg/detectors/asanapersonalaccesstoken/asanapersonalaccesstoken.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
-
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/assemblyai/assemblyai.go b/pkg/detectors/assemblyai/assemblyai.go
index 56715eea1..4788823e5 100644
--- a/pkg/detectors/assemblyai/assemblyai.go
+++ b/pkg/detectors/assemblyai/assemblyai.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/atera/atera.go b/pkg/detectors/atera/atera.go
index defa75d0d..d7f8d6257 100644
--- a/pkg/detectors/atera/atera.go
+++ b/pkg/detectors/atera/atera.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/audd/audd.go b/pkg/detectors/audd/audd.go
index a73673d79..58ecc17a8 100644
--- a/pkg/detectors/audd/audd.go
+++ b/pkg/detectors/audd/audd.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/auth0managementapitoken/auth0managementapitoken.go b/pkg/detectors/auth0managementapitoken/auth0managementapitoken.go
index 657033025..e4081d292 100644
--- a/pkg/detectors/auth0managementapitoken/auth0managementapitoken.go
+++ b/pkg/detectors/auth0managementapitoken/auth0managementapitoken.go
@@ -76,10 +76,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(managementApiTokenRes, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/auth0oauth/auth0oauth.go b/pkg/detectors/auth0oauth/auth0oauth.go
index 5694fb9f5..25ce7d035 100644
--- a/pkg/detectors/auth0oauth/auth0oauth.go
+++ b/pkg/detectors/auth0oauth/auth0oauth.go
@@ -100,12 +100,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if !strings.Contains(body, "access_denied") {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(clientIdRes, detectors.DefaultFalsePositives, true) {
- continue
- }
- }
-
+ }
}
}
diff --git a/pkg/detectors/autodesk/autodesk.go b/pkg/detectors/autodesk/autodesk.go
index f40c75f23..1c8dbffea 100644
--- a/pkg/detectors/autodesk/autodesk.go
+++ b/pkg/detectors/autodesk/autodesk.go
@@ -67,11 +67,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/autoklose/autoklose.go b/pkg/detectors/autoklose/autoklose.go
index cadbb030f..b538b7948 100644
--- a/pkg/detectors/autoklose/autoklose.go
+++ b/pkg/detectors/autoklose/autoklose.go
@@ -67,11 +67,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/autopilot/autopilot.go b/pkg/detectors/autopilot/autopilot.go
index fca023681..cc9132786 100644
--- a/pkg/detectors/autopilot/autopilot.go
+++ b/pkg/detectors/autopilot/autopilot.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/avazapersonalaccesstoken/avazapersonalaccesstoken.go b/pkg/detectors/avazapersonalaccesstoken/avazapersonalaccesstoken.go
index 60a8d77ce..c5213a0bc 100644
--- a/pkg/detectors/avazapersonalaccesstoken/avazapersonalaccesstoken.go
+++ b/pkg/detectors/avazapersonalaccesstoken/avazapersonalaccesstoken.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/aviationstack/aviationstack.go b/pkg/detectors/aviationstack/aviationstack.go
index bf4aabbe4..ddefb6b3d 100644
--- a/pkg/detectors/aviationstack/aviationstack.go
+++ b/pkg/detectors/aviationstack/aviationstack.go
@@ -60,11 +60,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/aws/aws.go b/pkg/detectors/aws/aws.go
index ee98ccfb3..110a06566 100644
--- a/pkg/detectors/aws/aws.go
+++ b/pkg/detectors/aws/aws.go
@@ -229,10 +229,6 @@ func (s scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
if !s1.Verified {
- // Unverified results that contain common test words are probably not secrets
- if detectors.IsKnownFalsePositive(resSecretMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
// Unverified results that look like hashes are probably not secrets
if falsePositiveSecretCheck.MatchString(resSecretMatch) {
continue
diff --git a/pkg/detectors/awssessionkeys/awssessionkey.go b/pkg/detectors/awssessionkeys/awssessionkey.go
index 8d68e548a..643626a25 100644
--- a/pkg/detectors/awssessionkeys/awssessionkey.go
+++ b/pkg/detectors/awssessionkeys/awssessionkey.go
@@ -7,11 +7,12 @@ import (
"encoding/hex"
"encoding/json"
"fmt"
- regexp "github.com/wasilibs/go-re2"
"net/http"
"strings"
"time"
+ regexp "github.com/wasilibs/go-re2"
+
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
@@ -143,10 +144,6 @@ func (s scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
if !s1.Verified {
- // Unverified results that contain common test words are probably not secrets
- if detectors.IsKnownFalsePositive(resSecretMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
// Unverified results that look like hashes are probably not secrets
if falsePositiveSecretCheck.MatchString(resSecretMatch) {
continue
diff --git a/pkg/detectors/axonaut/axonaut.go b/pkg/detectors/axonaut/axonaut.go
index 4b6424eeb..03e14683b 100644
--- a/pkg/detectors/axonaut/axonaut.go
+++ b/pkg/detectors/axonaut/axonaut.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/aylien/aylien.go b/pkg/detectors/aylien/aylien.go
index af413b8d1..cfe20a098 100644
--- a/pkg/detectors/aylien/aylien.go
+++ b/pkg/detectors/aylien/aylien.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/ayrshare/ayrshare.go b/pkg/detectors/ayrshare/ayrshare.go
index b5e2a2c8a..ca3be8864 100644
--- a/pkg/detectors/ayrshare/ayrshare.go
+++ b/pkg/detectors/ayrshare/ayrshare.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/azure/azure.go b/pkg/detectors/azure/azure.go
index c20a2f882..99ce2ddc3 100644
--- a/pkg/detectors/azure/azure.go
+++ b/pkg/detectors/azure/azure.go
@@ -74,15 +74,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s.Verified {
- if detectors.IsKnownFalsePositive(s.Redacted, detectors.DefaultFalsePositives, true) {
- continue
- }
- if detectors.IsKnownFalsePositive(string(s.Raw), detectors.DefaultFalsePositives, true) {
- continue
- }
- }
-
results = append(results, s)
}
}
diff --git a/pkg/detectors/azurebatch/azurebatch.go b/pkg/detectors/azurebatch/azurebatch.go
index 927052ae8..f04b907e3 100644
--- a/pkg/detectors/azurebatch/azurebatch.go
+++ b/pkg/detectors/azurebatch/azurebatch.go
@@ -95,11 +95,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(accountKey, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
if s1.Verified {
break
diff --git a/pkg/detectors/azurecontainerregistry/azurecontainerregistry.go b/pkg/detectors/azurecontainerregistry/azurecontainerregistry.go
index 78ee6f66e..b0651ab92 100644
--- a/pkg/detectors/azurecontainerregistry/azurecontainerregistry.go
+++ b/pkg/detectors/azurecontainerregistry/azurecontainerregistry.go
@@ -84,10 +84,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s1.Verified && detectors.IsKnownFalsePositive(password, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
if s1.Verified {
break
diff --git a/pkg/detectors/azuredevopspersonalaccesstoken/azuredevopspersonalaccesstoken.go b/pkg/detectors/azuredevopspersonalaccesstoken/azuredevopspersonalaccesstoken.go
index d6a3bb537..98e5bb98b 100644
--- a/pkg/detectors/azuredevopspersonalaccesstoken/azuredevopspersonalaccesstoken.go
+++ b/pkg/detectors/azuredevopspersonalaccesstoken/azuredevopspersonalaccesstoken.go
@@ -83,11 +83,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
}
diff --git a/pkg/detectors/azurefunctionkey/azurefunctionkey.go b/pkg/detectors/azurefunctionkey/azurefunctionkey.go
index 1f6f23519..dad5015a1 100644
--- a/pkg/detectors/azurefunctionkey/azurefunctionkey.go
+++ b/pkg/detectors/azurefunctionkey/azurefunctionkey.go
@@ -73,11 +73,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
}
diff --git a/pkg/detectors/azuresearchadminkey/azuresearchadminkey.go b/pkg/detectors/azuresearchadminkey/azuresearchadminkey.go
index d821ab844..6dd0673be 100644
--- a/pkg/detectors/azuresearchadminkey/azuresearchadminkey.go
+++ b/pkg/detectors/azuresearchadminkey/azuresearchadminkey.go
@@ -84,11 +84,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
}
diff --git a/pkg/detectors/azuresearchquerykey/azuresearchquerykey.go b/pkg/detectors/azuresearchquerykey/azuresearchquerykey.go
index dbb7a3962..e6781286c 100644
--- a/pkg/detectors/azuresearchquerykey/azuresearchquerykey.go
+++ b/pkg/detectors/azuresearchquerykey/azuresearchquerykey.go
@@ -82,11 +82,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
}
diff --git a/pkg/detectors/bannerbear/bannerbear.go b/pkg/detectors/bannerbear/bannerbear.go
index 3c4e9a66f..ba6c9e157 100644
--- a/pkg/detectors/bannerbear/bannerbear.go
+++ b/pkg/detectors/bannerbear/bannerbear.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/baremetrics/baremetrics.go b/pkg/detectors/baremetrics/baremetrics.go
index f30568096..c1e942904 100644
--- a/pkg/detectors/baremetrics/baremetrics.go
+++ b/pkg/detectors/baremetrics/baremetrics.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/beamer/beamer.go b/pkg/detectors/beamer/beamer.go
index f6b8d5fa5..bad69b3f8 100644
--- a/pkg/detectors/beamer/beamer.go
+++ b/pkg/detectors/beamer/beamer.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/beebole/beebole.go b/pkg/detectors/beebole/beebole.go
index 23936d10e..4d67e25bb 100644
--- a/pkg/detectors/beebole/beebole.go
+++ b/pkg/detectors/beebole/beebole.go
@@ -63,11 +63,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/besnappy/besnappy.go b/pkg/detectors/besnappy/besnappy.go
index 4ccedbc1b..6ad3fd57f 100644
--- a/pkg/detectors/besnappy/besnappy.go
+++ b/pkg/detectors/besnappy/besnappy.go
@@ -60,11 +60,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/besttime/besttime.go b/pkg/detectors/besttime/besttime.go
index 9afd781f7..a0b19118d 100644
--- a/pkg/detectors/besttime/besttime.go
+++ b/pkg/detectors/besttime/besttime.go
@@ -63,12 +63,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if strings.Contains(body, `"status": "OK"`) {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
-
}
}
diff --git a/pkg/detectors/betterstack/betterstack.go b/pkg/detectors/betterstack/betterstack.go
index c38b6b67a..3770dacd8 100644
--- a/pkg/detectors/betterstack/betterstack.go
+++ b/pkg/detectors/betterstack/betterstack.go
@@ -74,11 +74,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/billomat/billomat.go b/pkg/detectors/billomat/billomat.go
index 5dd10e87f..cf2eba3d3 100644
--- a/pkg/detectors/billomat/billomat.go
+++ b/pkg/detectors/billomat/billomat.go
@@ -67,11 +67,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/bitbar/bitbar.go b/pkg/detectors/bitbar/bitbar.go
index 1a93dded5..9eca13378 100644
--- a/pkg/detectors/bitbar/bitbar.go
+++ b/pkg/detectors/bitbar/bitbar.go
@@ -62,11 +62,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/bitcoinaverage/bitcoinaverage.go b/pkg/detectors/bitcoinaverage/bitcoinaverage.go
index 079f5a8bf..3e05dddf0 100644
--- a/pkg/detectors/bitcoinaverage/bitcoinaverage.go
+++ b/pkg/detectors/bitcoinaverage/bitcoinaverage.go
@@ -69,11 +69,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if resp.Success {
s1.Verified = true
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/bitfinex/bitfinex.go b/pkg/detectors/bitfinex/bitfinex.go
index 1c1145ffb..11d33230e 100644
--- a/pkg/detectors/bitfinex/bitfinex.go
+++ b/pkg/detectors/bitfinex/bitfinex.go
@@ -77,10 +77,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if err != nil {
if strings.HasPrefix(err.Error(), "POST https://") { // eg POST https://api-pub.bitfinex.com/v2/auth/r/orders/hist: 500 apikey: digest invalid (10100)
isValid = false
- } else {
- if detectors.IsKnownFalsePositive(apiKeyRes, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
diff --git a/pkg/detectors/bitlyaccesstoken/bitlyaccesstoken.go b/pkg/detectors/bitlyaccesstoken/bitlyaccesstoken.go
index 136ce30e0..7b72d899e 100644
--- a/pkg/detectors/bitlyaccesstoken/bitlyaccesstoken.go
+++ b/pkg/detectors/bitlyaccesstoken/bitlyaccesstoken.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/bitmex/bitmex.go b/pkg/detectors/bitmex/bitmex.go
index a2fa65a6b..01adc8d33 100644
--- a/pkg/detectors/bitmex/bitmex.go
+++ b/pkg/detectors/bitmex/bitmex.go
@@ -82,15 +82,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
- if detectors.IsKnownFalsePositive(resSecretMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/blazemeter/blazemeter.go b/pkg/detectors/blazemeter/blazemeter.go
index 8245e2b8f..615b7b5f5 100644
--- a/pkg/detectors/blazemeter/blazemeter.go
+++ b/pkg/detectors/blazemeter/blazemeter.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/blitapp/blitapp.go b/pkg/detectors/blitapp/blitapp.go
index f390a2587..077c443a1 100644
--- a/pkg/detectors/blitapp/blitapp.go
+++ b/pkg/detectors/blitapp/blitapp.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/blocknative/blocknative.go b/pkg/detectors/blocknative/blocknative.go
index 3da23aa8b..d65b44672 100644
--- a/pkg/detectors/blocknative/blocknative.go
+++ b/pkg/detectors/blocknative/blocknative.go
@@ -63,11 +63,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
body := string(bodyBytes)
if !strings.Contains(body, "valid") {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/blogger/blogger.go b/pkg/detectors/blogger/blogger.go
index 2f3db1dfe..a3c46155b 100644
--- a/pkg/detectors/blogger/blogger.go
+++ b/pkg/detectors/blogger/blogger.go
@@ -55,11 +55,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/bombbomb/bombbomb.go b/pkg/detectors/bombbomb/bombbomb.go
index cfee96adf..612e39855 100644
--- a/pkg/detectors/bombbomb/bombbomb.go
+++ b/pkg/detectors/bombbomb/bombbomb.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/boostnote/boostnote.go b/pkg/detectors/boostnote/boostnote.go
index b3a026f05..a6fd6363b 100644
--- a/pkg/detectors/boostnote/boostnote.go
+++ b/pkg/detectors/boostnote/boostnote.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/borgbase/borgbase.go b/pkg/detectors/borgbase/borgbase.go
index eeb90c3cb..ee81d3148 100644
--- a/pkg/detectors/borgbase/borgbase.go
+++ b/pkg/detectors/borgbase/borgbase.go
@@ -72,11 +72,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/braintreepayments/braintreepayments.go b/pkg/detectors/braintreepayments/braintreepayments.go
index ffbb433c6..b156783b9 100644
--- a/pkg/detectors/braintreepayments/braintreepayments.go
+++ b/pkg/detectors/braintreepayments/braintreepayments.go
@@ -71,11 +71,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, resMatch)
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
}
diff --git a/pkg/detectors/brandfetch/brandfetch.go b/pkg/detectors/brandfetch/brandfetch.go
index fbcfb5705..7ad508641 100644
--- a/pkg/detectors/brandfetch/brandfetch.go
+++ b/pkg/detectors/brandfetch/brandfetch.go
@@ -61,11 +61,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/browserstack/browserstack.go b/pkg/detectors/browserstack/browserstack.go
index 7d31d0ebe..d3f5e1930 100644
--- a/pkg/detectors/browserstack/browserstack.go
+++ b/pkg/detectors/browserstack/browserstack.go
@@ -84,10 +84,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, resMatch)
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
results = append(results, s1)
}
}
diff --git a/pkg/detectors/browshot/browshot.go b/pkg/detectors/browshot/browshot.go
index b58595a66..f57d67819 100644
--- a/pkg/detectors/browshot/browshot.go
+++ b/pkg/detectors/browshot/browshot.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/bscscan/bscscan.go b/pkg/detectors/bscscan/bscscan.go
index 83bc89b0a..9051b4de0 100644
--- a/pkg/detectors/bscscan/bscscan.go
+++ b/pkg/detectors/bscscan/bscscan.go
@@ -63,11 +63,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if !strings.Contains(body, "NOTOK") {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sur>
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/buddyns/buddyns.go b/pkg/detectors/buddyns/buddyns.go
index c3ff73ff9..df61159b6 100644
--- a/pkg/detectors/buddyns/buddyns.go
+++ b/pkg/detectors/buddyns/buddyns.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/budibase/budibase.go b/pkg/detectors/budibase/budibase.go
index d5d7edb30..50b3fc194 100644
--- a/pkg/detectors/budibase/budibase.go
+++ b/pkg/detectors/budibase/budibase.go
@@ -81,11 +81,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/bugherd/bugherd.go b/pkg/detectors/bugherd/bugherd.go
index 94b5e302a..cf81e1328 100644
--- a/pkg/detectors/bugherd/bugherd.go
+++ b/pkg/detectors/bugherd/bugherd.go
@@ -62,11 +62,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/bugsnag/bugsnag.go b/pkg/detectors/bugsnag/bugsnag.go
index 4d1fba369..11e2f63c1 100644
--- a/pkg/detectors/bugsnag/bugsnag.go
+++ b/pkg/detectors/bugsnag/bugsnag.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/buildkite/buildkite.go b/pkg/detectors/buildkite/buildkite.go
index a8f0c3a9b..92bd1a5a7 100644
--- a/pkg/detectors/buildkite/buildkite.go
+++ b/pkg/detectors/buildkite/buildkite.go
@@ -61,11 +61,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/buildkitev2/buildkite.go b/pkg/detectors/buildkitev2/buildkite.go
index 4c97e7b7e..54b98106e 100644
--- a/pkg/detectors/buildkitev2/buildkite.go
+++ b/pkg/detectors/buildkitev2/buildkite.go
@@ -61,11 +61,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/bulbul/bulbul.go b/pkg/detectors/bulbul/bulbul.go
index 2a2d6c809..a3fc6c92c 100644
--- a/pkg/detectors/bulbul/bulbul.go
+++ b/pkg/detectors/bulbul/bulbul.go
@@ -71,11 +71,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/bulksms/bulksms.go b/pkg/detectors/bulksms/bulksms.go
index 7240b1da3..632fd40b9 100644
--- a/pkg/detectors/bulksms/bulksms.go
+++ b/pkg/detectors/bulksms/bulksms.go
@@ -69,11 +69,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/buttercms/buttercms.go b/pkg/detectors/buttercms/buttercms.go
index abd813fb3..4910eec60 100644
--- a/pkg/detectors/buttercms/buttercms.go
+++ b/pkg/detectors/buttercms/buttercms.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/caflou/caflou.go b/pkg/detectors/caflou/caflou.go
index ccd28ccb4..c831d56f5 100644
--- a/pkg/detectors/caflou/caflou.go
+++ b/pkg/detectors/caflou/caflou.go
@@ -61,11 +61,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/calendarific/calendarific.go b/pkg/detectors/calendarific/calendarific.go
index 774685bb0..7930c68ee 100644
--- a/pkg/detectors/calendarific/calendarific.go
+++ b/pkg/detectors/calendarific/calendarific.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/calendlyapikey/calendlyapikey.go b/pkg/detectors/calendlyapikey/calendlyapikey.go
index 730c24f9c..e74e288b6 100644
--- a/pkg/detectors/calendlyapikey/calendlyapikey.go
+++ b/pkg/detectors/calendlyapikey/calendlyapikey.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/calorieninja/calorieninja.go b/pkg/detectors/calorieninja/calorieninja.go
index d6bc61c10..7019d224a 100644
--- a/pkg/detectors/calorieninja/calorieninja.go
+++ b/pkg/detectors/calorieninja/calorieninja.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/campayn/campayn.go b/pkg/detectors/campayn/campayn.go
index 1f66cc3bb..4f6838bd6 100644
--- a/pkg/detectors/campayn/campayn.go
+++ b/pkg/detectors/campayn/campayn.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/cannyio/cannyio.go b/pkg/detectors/cannyio/cannyio.go
index 8abc2ea02..0a5631e87 100644
--- a/pkg/detectors/cannyio/cannyio.go
+++ b/pkg/detectors/cannyio/cannyio.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/capsulecrm/capsulecrm.go b/pkg/detectors/capsulecrm/capsulecrm.go
index 4a2a14b21..ca631f4dd 100644
--- a/pkg/detectors/capsulecrm/capsulecrm.go
+++ b/pkg/detectors/capsulecrm/capsulecrm.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/captaindata/captaindata.go b/pkg/detectors/captaindata/captaindata.go
index d43012534..82b0b2abb 100644
--- a/pkg/detectors/captaindata/captaindata.go
+++ b/pkg/detectors/captaindata/captaindata.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/carboninterface/carboninterface.go b/pkg/detectors/carboninterface/carboninterface.go
index cd70bc5bc..0b0b69c5d 100644
--- a/pkg/detectors/carboninterface/carboninterface.go
+++ b/pkg/detectors/carboninterface/carboninterface.go
@@ -60,11 +60,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/cashboard/cashboard.go b/pkg/detectors/cashboard/cashboard.go
index bc48620f8..5bdb9e0aa 100644
--- a/pkg/detectors/cashboard/cashboard.go
+++ b/pkg/detectors/cashboard/cashboard.go
@@ -71,11 +71,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/caspio/caspio.go b/pkg/detectors/caspio/caspio.go
index c5d115e01..6b9d82508 100644
--- a/pkg/detectors/caspio/caspio.go
+++ b/pkg/detectors/caspio/caspio.go
@@ -78,11 +78,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/censys/censys.go b/pkg/detectors/censys/censys.go
index 766184f9b..e07ec0cce 100644
--- a/pkg/detectors/censys/censys.go
+++ b/pkg/detectors/censys/censys.go
@@ -65,11 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(tokenPatMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/centralstationcrm/centralstationcrm.go b/pkg/detectors/centralstationcrm/centralstationcrm.go
index 4d033163a..72b3f78ca 100644
--- a/pkg/detectors/centralstationcrm/centralstationcrm.go
+++ b/pkg/detectors/centralstationcrm/centralstationcrm.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/cexio/cexio.go b/pkg/detectors/cexio/cexio.go
index bb4ec51e7..5821ae8a6 100644
--- a/pkg/detectors/cexio/cexio.go
+++ b/pkg/detectors/cexio/cexio.go
@@ -105,19 +105,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if res.StatusCode >= 200 && res.StatusCode < 300 && validResponse {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resUserIdMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
- if detectors.IsKnownFalsePositive(resKeyMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
- if detectors.IsKnownFalsePositive(resSecretMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/chartmogul/chartmogul.go b/pkg/detectors/chartmogul/chartmogul.go
index fd65f52cd..20e313f12 100644
--- a/pkg/detectors/chartmogul/chartmogul.go
+++ b/pkg/detectors/chartmogul/chartmogul.go
@@ -61,11 +61,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/chatbot/chatbot.go b/pkg/detectors/chatbot/chatbot.go
index fb3ceeb93..c71f80ca9 100644
--- a/pkg/detectors/chatbot/chatbot.go
+++ b/pkg/detectors/chatbot/chatbot.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/chatfule/chatfule.go b/pkg/detectors/chatfule/chatfule.go
index 15d18b01e..b11760998 100644
--- a/pkg/detectors/chatfule/chatfule.go
+++ b/pkg/detectors/chatfule/chatfule.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/checio/checio.go b/pkg/detectors/checio/checio.go
index 0b3a1823b..082d1c98f 100644
--- a/pkg/detectors/checio/checio.go
+++ b/pkg/detectors/checio/checio.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/checklyhq/checklyhq.go b/pkg/detectors/checklyhq/checklyhq.go
index e36e73537..370c348ca 100644
--- a/pkg/detectors/checklyhq/checklyhq.go
+++ b/pkg/detectors/checklyhq/checklyhq.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/checkout/checkout.go b/pkg/detectors/checkout/checkout.go
index daa4eef90..35b11b31d 100644
--- a/pkg/detectors/checkout/checkout.go
+++ b/pkg/detectors/checkout/checkout.go
@@ -68,11 +68,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/checkvist/checkvist.go b/pkg/detectors/checkvist/checkvist.go
index 8affe43e5..3ea18a5c8 100644
--- a/pkg/detectors/checkvist/checkvist.go
+++ b/pkg/detectors/checkvist/checkvist.go
@@ -72,11 +72,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/cicero/cicero.go b/pkg/detectors/cicero/cicero.go
index 8461aab26..7f7393415 100644
--- a/pkg/detectors/cicero/cicero.go
+++ b/pkg/detectors/cicero/cicero.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/circleci/circleci.go b/pkg/detectors/circleci/circleci.go
index 22ab9cdce..936b8e0ba 100644
--- a/pkg/detectors/circleci/circleci.go
+++ b/pkg/detectors/circleci/circleci.go
@@ -59,12 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s.Verified {
- if detectors.IsKnownFalsePositive(string(s.Raw), detectors.DefaultFalsePositives, true) {
- continue
- }
- }
-
results = append(results, s)
}
diff --git a/pkg/detectors/clarifai/clarifai.go b/pkg/detectors/clarifai/clarifai.go
index d019d8744..b9885a409 100644
--- a/pkg/detectors/clarifai/clarifai.go
+++ b/pkg/detectors/clarifai/clarifai.go
@@ -73,10 +73,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/clearbit/clearbit.go b/pkg/detectors/clearbit/clearbit.go
index 376f96cb0..469ba200e 100644
--- a/pkg/detectors/clearbit/clearbit.go
+++ b/pkg/detectors/clearbit/clearbit.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/clickhelp/clickhelp.go b/pkg/detectors/clickhelp/clickhelp.go
index 6a92ae929..42267d49d 100644
--- a/pkg/detectors/clickhelp/clickhelp.go
+++ b/pkg/detectors/clickhelp/clickhelp.go
@@ -78,11 +78,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resServer, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/clicksendsms/clicksendsms.go b/pkg/detectors/clicksendsms/clicksendsms.go
index 365eaa154..d8574775e 100644
--- a/pkg/detectors/clicksendsms/clicksendsms.go
+++ b/pkg/detectors/clicksendsms/clicksendsms.go
@@ -68,11 +68,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/clickuppersonaltoken/clickuppersonaltoken.go b/pkg/detectors/clickuppersonaltoken/clickuppersonaltoken.go
index 156ee5f31..d8058fbd3 100644
--- a/pkg/detectors/clickuppersonaltoken/clickuppersonaltoken.go
+++ b/pkg/detectors/clickuppersonaltoken/clickuppersonaltoken.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/cliengo/cliengo.go b/pkg/detectors/cliengo/cliengo.go
index 2b43d6c27..6713786c7 100644
--- a/pkg/detectors/cliengo/cliengo.go
+++ b/pkg/detectors/cliengo/cliengo.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/clinchpad/clinchpad.go b/pkg/detectors/clinchpad/clinchpad.go
index a92b89537..e1b927a69 100644
--- a/pkg/detectors/clinchpad/clinchpad.go
+++ b/pkg/detectors/clinchpad/clinchpad.go
@@ -61,11 +61,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/clockify/clockify.go b/pkg/detectors/clockify/clockify.go
index 75a9bdb6d..92acf73ec 100644
--- a/pkg/detectors/clockify/clockify.go
+++ b/pkg/detectors/clockify/clockify.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/clockworksms/clockworksms.go b/pkg/detectors/clockworksms/clockworksms.go
index c3a494607..e48e1a8be 100644
--- a/pkg/detectors/clockworksms/clockworksms.go
+++ b/pkg/detectors/clockworksms/clockworksms.go
@@ -67,11 +67,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/closecrm/close.go b/pkg/detectors/closecrm/close.go
index ee6c0ffda..1bdb8ea4a 100644
--- a/pkg/detectors/closecrm/close.go
+++ b/pkg/detectors/closecrm/close.go
@@ -62,11 +62,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/cloudconvert/cloudconvert.go b/pkg/detectors/cloudconvert/cloudconvert.go
index 21121d7d0..8ffadc9fb 100644
--- a/pkg/detectors/cloudconvert/cloudconvert.go
+++ b/pkg/detectors/cloudconvert/cloudconvert.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/cloudelements/cloudelements.go b/pkg/detectors/cloudelements/cloudelements.go
index e9f3dc960..3ba8c1e1c 100644
--- a/pkg/detectors/cloudelements/cloudelements.go
+++ b/pkg/detectors/cloudelements/cloudelements.go
@@ -68,11 +68,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/cloudflareapitoken/cloudflareapitoken.go b/pkg/detectors/cloudflareapitoken/cloudflareapitoken.go
index 8eb2cb3d9..51d9ca50e 100644
--- a/pkg/detectors/cloudflareapitoken/cloudflareapitoken.go
+++ b/pkg/detectors/cloudflareapitoken/cloudflareapitoken.go
@@ -58,10 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/cloudflarecakey/cloudflarecakey.go b/pkg/detectors/cloudflarecakey/cloudflarecakey.go
index bfd70ef56..ce8703ac3 100644
--- a/pkg/detectors/cloudflarecakey/cloudflarecakey.go
+++ b/pkg/detectors/cloudflarecakey/cloudflarecakey.go
@@ -2,15 +2,13 @@ package cloudflarecakey
import (
"context"
- // "fmt"
- // "log"
- regexp "github.com/wasilibs/go-re2"
"net/http"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
+ regexp "github.com/wasilibs/go-re2"
)
type Scanner struct{}
@@ -42,10 +40,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
resMatch := strings.TrimSpace(match[1])
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_CloudflareCaKey,
Raw: []byte(resMatch),
diff --git a/pkg/detectors/cloudflareglobalapikey/cloudflareglobalapikey.go b/pkg/detectors/cloudflareglobalapikey/cloudflareglobalapikey.go
index b0d6b46bd..e2e12e5e2 100644
--- a/pkg/detectors/cloudflareglobalapikey/cloudflareglobalapikey.go
+++ b/pkg/detectors/cloudflareglobalapikey/cloudflareglobalapikey.go
@@ -2,10 +2,11 @@ package cloudflareglobalapikey
import (
"context"
- regexp "github.com/wasilibs/go-re2"
"net/http"
"strings"
+ regexp "github.com/wasilibs/go-re2"
+
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
@@ -52,10 +53,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
emailRes := strings.TrimSpace(emailMatch[1])
- if detectors.IsKnownFalsePositive(apiKeyRes, detectors.DefaultFalsePositives, true) { // wait- (apiKeyRes, email) might be false positive does not mean (apiKeyRes, another_email) is ?
- continue
- }
-
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_CloudflareGlobalApiKey,
Redacted: emailRes,
diff --git a/pkg/detectors/cloudimage/cloudimage.go b/pkg/detectors/cloudimage/cloudimage.go
index 7d48687f4..71e7dc2ab 100644
--- a/pkg/detectors/cloudimage/cloudimage.go
+++ b/pkg/detectors/cloudimage/cloudimage.go
@@ -63,11 +63,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/cloudmersive/cloudmersive.go b/pkg/detectors/cloudmersive/cloudmersive.go
index 6bfd4bc32..4a2d5e0b5 100644
--- a/pkg/detectors/cloudmersive/cloudmersive.go
+++ b/pkg/detectors/cloudmersive/cloudmersive.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/cloudplan/cloudplan.go b/pkg/detectors/cloudplan/cloudplan.go
index 95db96e3a..30ac902b4 100644
--- a/pkg/detectors/cloudplan/cloudplan.go
+++ b/pkg/detectors/cloudplan/cloudplan.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/cloudsmith/cloudsmith.go b/pkg/detectors/cloudsmith/cloudsmith.go
index efe2a0f9b..953f65840 100644
--- a/pkg/detectors/cloudsmith/cloudsmith.go
+++ b/pkg/detectors/cloudsmith/cloudsmith.go
@@ -70,12 +70,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if r.Authenticated {
s1.Verified = true
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
- }
+ }
}
}
diff --git a/pkg/detectors/cloverly/cloverly.go b/pkg/detectors/cloverly/cloverly.go
index 72ecab95c..8793d84e8 100644
--- a/pkg/detectors/cloverly/cloverly.go
+++ b/pkg/detectors/cloverly/cloverly.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/cloze/cloze.go b/pkg/detectors/cloze/cloze.go
index 2fe6f62b0..de157bc5e 100644
--- a/pkg/detectors/cloze/cloze.go
+++ b/pkg/detectors/cloze/cloze.go
@@ -70,12 +70,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
}
}
}
diff --git a/pkg/detectors/clustdoc/clustdoc.go b/pkg/detectors/clustdoc/clustdoc.go
index 8f9195cb4..0ec9ab16a 100644
--- a/pkg/detectors/clustdoc/clustdoc.go
+++ b/pkg/detectors/clustdoc/clustdoc.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/coda/coda.go b/pkg/detectors/coda/coda.go
index 1ea12bcfc..2b0fa8983 100644
--- a/pkg/detectors/coda/coda.go
+++ b/pkg/detectors/coda/coda.go
@@ -74,11 +74,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/codacy/codacy.go b/pkg/detectors/codacy/codacy.go
index 4a2e7a469..13326f540 100644
--- a/pkg/detectors/codacy/codacy.go
+++ b/pkg/detectors/codacy/codacy.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/codeclimate/codeclimate.go b/pkg/detectors/codeclimate/codeclimate.go
index d29c4d9e9..52f1f739b 100644
--- a/pkg/detectors/codeclimate/codeclimate.go
+++ b/pkg/detectors/codeclimate/codeclimate.go
@@ -73,11 +73,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if r.Data.Id != "" {
s1.Verified = true
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/codemagic/codemagic.go b/pkg/detectors/codemagic/codemagic.go
index 494ec04a9..4ab971d0b 100644
--- a/pkg/detectors/codemagic/codemagic.go
+++ b/pkg/detectors/codemagic/codemagic.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/codequiry/codequiry.go b/pkg/detectors/codequiry/codequiry.go
index c41587da7..a16a9ef3e 100644
--- a/pkg/detectors/codequiry/codequiry.go
+++ b/pkg/detectors/codequiry/codequiry.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/coinapi/coinapi.go b/pkg/detectors/coinapi/coinapi.go
index 8d192aec7..52eaa9313 100644
--- a/pkg/detectors/coinapi/coinapi.go
+++ b/pkg/detectors/coinapi/coinapi.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/coinbase/coinbase.go b/pkg/detectors/coinbase/coinbase.go
index d84482f55..bc93208a6 100644
--- a/pkg/detectors/coinbase/coinbase.go
+++ b/pkg/detectors/coinbase/coinbase.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/coinlayer/coinlayer.go b/pkg/detectors/coinlayer/coinlayer.go
index e8316f3a5..0fa4cd0d1 100644
--- a/pkg/detectors/coinlayer/coinlayer.go
+++ b/pkg/detectors/coinlayer/coinlayer.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/coinlib/coinlib.go b/pkg/detectors/coinlib/coinlib.go
index 820f1aeb6..383fc419b 100644
--- a/pkg/detectors/coinlib/coinlib.go
+++ b/pkg/detectors/coinlib/coinlib.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/collect2/collect2.go b/pkg/detectors/collect2/collect2.go
index 6091e981c..8ad52883b 100644
--- a/pkg/detectors/collect2/collect2.go
+++ b/pkg/detectors/collect2/collect2.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/column/column.go b/pkg/detectors/column/column.go
index 061e83daa..b8bf106b2 100644
--- a/pkg/detectors/column/column.go
+++ b/pkg/detectors/column/column.go
@@ -63,10 +63,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.Verified = true
} else {
s1.Verified = false
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- // if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- // continue
- // }
}
}
}
diff --git a/pkg/detectors/commercejs/commercejs.go b/pkg/detectors/commercejs/commercejs.go
index edeb67af2..c77bc80ae 100644
--- a/pkg/detectors/commercejs/commercejs.go
+++ b/pkg/detectors/commercejs/commercejs.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/commodities/commodities.go b/pkg/detectors/commodities/commodities.go
index 1b3e597c9..126215fe0 100644
--- a/pkg/detectors/commodities/commodities.go
+++ b/pkg/detectors/commodities/commodities.go
@@ -69,11 +69,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/companyhub/companyhub.go b/pkg/detectors/companyhub/companyhub.go
index 97ce50a76..d79e32704 100644
--- a/pkg/detectors/companyhub/companyhub.go
+++ b/pkg/detectors/companyhub/companyhub.go
@@ -68,11 +68,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/confluent/confluent.go b/pkg/detectors/confluent/confluent.go
index ac460bd86..b6a07eb82 100644
--- a/pkg/detectors/confluent/confluent.go
+++ b/pkg/detectors/confluent/confluent.go
@@ -70,11 +70,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resSecret, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/contentfulpersonalaccesstoken/contentfulpersonalaccesstoken.go b/pkg/detectors/contentfulpersonalaccesstoken/contentfulpersonalaccesstoken.go
index 8f12c530d..b75ace2b4 100644
--- a/pkg/detectors/contentfulpersonalaccesstoken/contentfulpersonalaccesstoken.go
+++ b/pkg/detectors/contentfulpersonalaccesstoken/contentfulpersonalaccesstoken.go
@@ -56,10 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(keyRes, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/conversiontools/conversiontools.go b/pkg/detectors/conversiontools/conversiontools.go
index 87420df39..27b42823a 100644
--- a/pkg/detectors/conversiontools/conversiontools.go
+++ b/pkg/detectors/conversiontools/conversiontools.go
@@ -60,11 +60,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/convertapi/convertapi.go b/pkg/detectors/convertapi/convertapi.go
index 1ead72a3b..8e443bfff 100644
--- a/pkg/detectors/convertapi/convertapi.go
+++ b/pkg/detectors/convertapi/convertapi.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/convertkit/convertkit.go b/pkg/detectors/convertkit/convertkit.go
index f22a89e20..3417dabe5 100644
--- a/pkg/detectors/convertkit/convertkit.go
+++ b/pkg/detectors/convertkit/convertkit.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/convier/convier.go b/pkg/detectors/convier/convier.go
index e8dbb3b20..bd28e1b8a 100644
--- a/pkg/detectors/convier/convier.go
+++ b/pkg/detectors/convier/convier.go
@@ -72,11 +72,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/copper/copper.go b/pkg/detectors/copper/copper.go
index daa047f58..6d1dc61cc 100644
--- a/pkg/detectors/copper/copper.go
+++ b/pkg/detectors/copper/copper.go
@@ -73,11 +73,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/couchbase/couchbase.go b/pkg/detectors/couchbase/couchbase.go
index f224b3dc1..3f18bdf47 100644
--- a/pkg/detectors/couchbase/couchbase.go
+++ b/pkg/detectors/couchbase/couchbase.go
@@ -130,11 +130,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if pingEndpoint.State == gocb.PingStateOk {
s1.Verified = true
break
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resPasswordMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/countrylayer/countrylayer.go b/pkg/detectors/countrylayer/countrylayer.go
index 56efad482..36a872b0d 100644
--- a/pkg/detectors/countrylayer/countrylayer.go
+++ b/pkg/detectors/countrylayer/countrylayer.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/coveralls/coveralls.go b/pkg/detectors/coveralls/coveralls.go
index 05125b594..164c47af5 100644
--- a/pkg/detectors/coveralls/coveralls.go
+++ b/pkg/detectors/coveralls/coveralls.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/craftmypdf/craftmypdf.go b/pkg/detectors/craftmypdf/craftmypdf.go
index 578ef865c..36482c023 100644
--- a/pkg/detectors/craftmypdf/craftmypdf.go
+++ b/pkg/detectors/craftmypdf/craftmypdf.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/crowdin/crowdin.go b/pkg/detectors/crowdin/crowdin.go
index 57725aa05..8a13a3b6c 100644
--- a/pkg/detectors/crowdin/crowdin.go
+++ b/pkg/detectors/crowdin/crowdin.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/cryptocompare/cryptocompare.go b/pkg/detectors/cryptocompare/cryptocompare.go
index 594fa661e..262e62346 100644
--- a/pkg/detectors/cryptocompare/cryptocompare.go
+++ b/pkg/detectors/cryptocompare/cryptocompare.go
@@ -67,11 +67,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/currencycloud/currencycloud.go b/pkg/detectors/currencycloud/currencycloud.go
index 15f08f9cc..63617a191 100644
--- a/pkg/detectors/currencycloud/currencycloud.go
+++ b/pkg/detectors/currencycloud/currencycloud.go
@@ -77,10 +77,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.Verified = true
s1.ExtraData = map[string]string{"environment": fmt.Sprintf("https://%s.currencycloud.com", env)}
break
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/currencyfreaks/currencyfreaks.go b/pkg/detectors/currencyfreaks/currencyfreaks.go
index 7a3fead42..4465a51ba 100644
--- a/pkg/detectors/currencyfreaks/currencyfreaks.go
+++ b/pkg/detectors/currencyfreaks/currencyfreaks.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/currencylayer/currencylayer.go b/pkg/detectors/currencylayer/currencylayer.go
index bf2ea0b50..a8a1a1ded 100644
--- a/pkg/detectors/currencylayer/currencylayer.go
+++ b/pkg/detectors/currencylayer/currencylayer.go
@@ -67,11 +67,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/currencyscoop/currencyscoop.go b/pkg/detectors/currencyscoop/currencyscoop.go
index 1ca905877..1ae261514 100644
--- a/pkg/detectors/currencyscoop/currencyscoop.go
+++ b/pkg/detectors/currencyscoop/currencyscoop.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/currentsapi/currentsapi.go b/pkg/detectors/currentsapi/currentsapi.go
index ae19160ae..093d6c351 100644
--- a/pkg/detectors/currentsapi/currentsapi.go
+++ b/pkg/detectors/currentsapi/currentsapi.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/customerguru/customerguru.go b/pkg/detectors/customerguru/customerguru.go
index d27825643..8d339794f 100644
--- a/pkg/detectors/customerguru/customerguru.go
+++ b/pkg/detectors/customerguru/customerguru.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/customerio/customerio.go b/pkg/detectors/customerio/customerio.go
index 450ac8a70..4dc8036b4 100644
--- a/pkg/detectors/customerio/customerio.go
+++ b/pkg/detectors/customerio/customerio.go
@@ -72,11 +72,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/d7network/d7network.go b/pkg/detectors/d7network/d7network.go
index 722ab4981..2cdfa8c40 100644
--- a/pkg/detectors/d7network/d7network.go
+++ b/pkg/detectors/d7network/d7network.go
@@ -54,11 +54,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/dailyco/dailyco.go b/pkg/detectors/dailyco/dailyco.go
index 83cb3aebc..54bd589dd 100644
--- a/pkg/detectors/dailyco/dailyco.go
+++ b/pkg/detectors/dailyco/dailyco.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/dandelion/dandelion.go b/pkg/detectors/dandelion/dandelion.go
index 88ca74f4a..32878c5dc 100644
--- a/pkg/detectors/dandelion/dandelion.go
+++ b/pkg/detectors/dandelion/dandelion.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/dareboost/dareboost.go b/pkg/detectors/dareboost/dareboost.go
index 353cabb0a..02fdf791e 100644
--- a/pkg/detectors/dareboost/dareboost.go
+++ b/pkg/detectors/dareboost/dareboost.go
@@ -72,11 +72,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/databox/databox.go b/pkg/detectors/databox/databox.go
index 5cc563771..e6e250e82 100644
--- a/pkg/detectors/databox/databox.go
+++ b/pkg/detectors/databox/databox.go
@@ -71,11 +71,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/databrickstoken/databrickstoken.go b/pkg/detectors/databrickstoken/databrickstoken.go
index a50c667b2..724f72cf6 100644
--- a/pkg/detectors/databrickstoken/databrickstoken.go
+++ b/pkg/detectors/databrickstoken/databrickstoken.go
@@ -77,9 +77,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(err, resMatch)
}
}
- if !s1.Verified && detectors.IsKnownFalsePositive(string(s1.Raw), detectors.DefaultFalsePositives, true) {
- continue
- }
results = append(results, s1)
}
diff --git a/pkg/detectors/datadogtoken/datadogtoken.go b/pkg/detectors/datadogtoken/datadogtoken.go
index 9fc7f3a5e..af2c8f0cf 100644
--- a/pkg/detectors/datadogtoken/datadogtoken.go
+++ b/pkg/detectors/datadogtoken/datadogtoken.go
@@ -78,11 +78,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resApiMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
@@ -115,11 +110,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resApiMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/datagov/datagov.go b/pkg/detectors/datagov/datagov.go
index 10bb08919..eb927a30f 100644
--- a/pkg/detectors/datagov/datagov.go
+++ b/pkg/detectors/datagov/datagov.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/debounce/debounce.go b/pkg/detectors/debounce/debounce.go
index 18100138c..dffcbaf7f 100644
--- a/pkg/detectors/debounce/debounce.go
+++ b/pkg/detectors/debounce/debounce.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/deepai/deepai.go b/pkg/detectors/deepai/deepai.go
index 39ba01597..335e77847 100644
--- a/pkg/detectors/deepai/deepai.go
+++ b/pkg/detectors/deepai/deepai.go
@@ -72,11 +72,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/deepgram/deepgram.go b/pkg/detectors/deepgram/deepgram.go
index f7e3e5c7d..b0f42c852 100644
--- a/pkg/detectors/deepgram/deepgram.go
+++ b/pkg/detectors/deepgram/deepgram.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/delighted/delighted.go b/pkg/detectors/delighted/delighted.go
index 9a1444ba0..bcc491267 100644
--- a/pkg/detectors/delighted/delighted.go
+++ b/pkg/detectors/delighted/delighted.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/demio/demio.go b/pkg/detectors/demio/demio.go
index e686ed77e..e1b4a7046 100644
--- a/pkg/detectors/demio/demio.go
+++ b/pkg/detectors/demio/demio.go
@@ -64,11 +64,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/deno/denodeploy.go b/pkg/detectors/deno/denodeploy.go
index 689d5e07e..f8c1a5982 100644
--- a/pkg/detectors/deno/denodeploy.go
+++ b/pkg/detectors/deno/denodeploy.go
@@ -92,11 +92,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(token, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/deputy/deputy.go b/pkg/detectors/deputy/deputy.go
index 996c695a9..e0d23f4d9 100644
--- a/pkg/detectors/deputy/deputy.go
+++ b/pkg/detectors/deputy/deputy.go
@@ -67,11 +67,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/detectify/detectify.go b/pkg/detectors/detectify/detectify.go
index 23c25ca2a..07258812c 100644
--- a/pkg/detectors/detectify/detectify.go
+++ b/pkg/detectors/detectify/detectify.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/detectlanguage/detectlanguage.go b/pkg/detectors/detectlanguage/detectlanguage.go
index 06880fea6..214c75743 100644
--- a/pkg/detectors/detectlanguage/detectlanguage.go
+++ b/pkg/detectors/detectlanguage/detectlanguage.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/dfuse/dfuse.go b/pkg/detectors/dfuse/dfuse.go
index e19b8ced7..08777a70f 100644
--- a/pkg/detectors/dfuse/dfuse.go
+++ b/pkg/detectors/dfuse/dfuse.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/diffbot/diffbot.go b/pkg/detectors/diffbot/diffbot.go
index 8fda47e5c..9d3914ae2 100644
--- a/pkg/detectors/diffbot/diffbot.go
+++ b/pkg/detectors/diffbot/diffbot.go
@@ -69,11 +69,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/diggernaut/diggernaut.go b/pkg/detectors/diggernaut/diggernaut.go
index ae025a1e1..221cd5c25 100644
--- a/pkg/detectors/diggernaut/diggernaut.go
+++ b/pkg/detectors/diggernaut/diggernaut.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/digitaloceantoken/digitaloceantoken.go b/pkg/detectors/digitaloceantoken/digitaloceantoken.go
index e5faca4b5..e866c71d9 100644
--- a/pkg/detectors/digitaloceantoken/digitaloceantoken.go
+++ b/pkg/detectors/digitaloceantoken/digitaloceantoken.go
@@ -57,10 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/digitaloceanv2/digitaloceanv2.go b/pkg/detectors/digitaloceanv2/digitaloceanv2.go
index 152f938ab..81e3610c0 100644
--- a/pkg/detectors/digitaloceanv2/digitaloceanv2.go
+++ b/pkg/detectors/digitaloceanv2/digitaloceanv2.go
@@ -70,11 +70,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if res.StatusCode >= 200 && res.StatusCode < 300 && validResponse {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
@@ -89,11 +84,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/discordbottoken/discordbottoken.go b/pkg/detectors/discordbottoken/discordbottoken.go
index 1e85c5865..bee617a07 100644
--- a/pkg/detectors/discordbottoken/discordbottoken.go
+++ b/pkg/detectors/discordbottoken/discordbottoken.go
@@ -65,11 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
}
}
}
diff --git a/pkg/detectors/disqus/disqus.go b/pkg/detectors/disqus/disqus.go
index 70cda3e90..e8635f3b0 100644
--- a/pkg/detectors/disqus/disqus.go
+++ b/pkg/detectors/disqus/disqus.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/ditto/ditto.go b/pkg/detectors/ditto/ditto.go
index afdad473b..c2def8852 100644
--- a/pkg/detectors/ditto/ditto.go
+++ b/pkg/detectors/ditto/ditto.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/dnscheck/dnscheck.go b/pkg/detectors/dnscheck/dnscheck.go
index ed1161dfd..bd744c76a 100644
--- a/pkg/detectors/dnscheck/dnscheck.go
+++ b/pkg/detectors/dnscheck/dnscheck.go
@@ -65,11 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/docparser/docparser.go b/pkg/detectors/docparser/docparser.go
index bb8fc2860..96cb6dc05 100644
--- a/pkg/detectors/docparser/docparser.go
+++ b/pkg/detectors/docparser/docparser.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/documo/documo.go b/pkg/detectors/documo/documo.go
index 3f98cca08..d24fd223a 100644
--- a/pkg/detectors/documo/documo.go
+++ b/pkg/detectors/documo/documo.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/docusign/docusign.go b/pkg/detectors/docusign/docusign.go
index 78c4774e8..b748490b8 100644
--- a/pkg/detectors/docusign/docusign.go
+++ b/pkg/detectors/docusign/docusign.go
@@ -91,11 +91,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if err == nil {
if res.StatusCode >= 200 && res.StatusCode < 300 && verifiedBodyResponse {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resIDMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/doppler/doppler.go b/pkg/detectors/doppler/doppler.go
index 20de7114f..3bca3506e 100644
--- a/pkg/detectors/doppler/doppler.go
+++ b/pkg/detectors/doppler/doppler.go
@@ -88,11 +88,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if r.Workplace.Name != "" {
s1.ExtraData["workplace"] = r.Workplace.Name
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/dotmailer/dotmailer.go b/pkg/detectors/dotmailer/dotmailer.go
index 205cea1aa..b85d71897 100644
--- a/pkg/detectors/dotmailer/dotmailer.go
+++ b/pkg/detectors/dotmailer/dotmailer.go
@@ -2,11 +2,12 @@ package dotmailer
import (
"context"
- regexp "github.com/wasilibs/go-re2"
"net/http"
"strings"
"time"
+ regexp "github.com/wasilibs/go-re2"
+
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
@@ -54,6 +55,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_Dotmailer,
Raw: []byte(resMatch),
+ RawV2: []byte(resMatch + resPassMatch),
}
if verify {
timeout := 10 * time.Second
@@ -68,11 +70,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resPassMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/dovico/dovico.go b/pkg/detectors/dovico/dovico.go
index 766c76db3..555f4a7c1 100644
--- a/pkg/detectors/dovico/dovico.go
+++ b/pkg/detectors/dovico/dovico.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/dronahq/dronahq.go b/pkg/detectors/dronahq/dronahq.go
index 0665aa4ed..b2c813bca 100644
--- a/pkg/detectors/dronahq/dronahq.go
+++ b/pkg/detectors/dronahq/dronahq.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/droneci/droneci.go b/pkg/detectors/droneci/droneci.go
index 3cd976c30..99fb8ece7 100644
--- a/pkg/detectors/droneci/droneci.go
+++ b/pkg/detectors/droneci/droneci.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/dropbox/dropbox.go b/pkg/detectors/dropbox/dropbox.go
index 6bdd2a0b3..e7f593fc1 100644
--- a/pkg/detectors/dropbox/dropbox.go
+++ b/pkg/detectors/dropbox/dropbox.go
@@ -64,10 +64,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s.Verified && detectors.IsKnownFalsePositive(string(s.Raw), detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s)
}
diff --git a/pkg/detectors/duply/duply.go b/pkg/detectors/duply/duply.go
index 3ffd81a94..3b2d94ccc 100644
--- a/pkg/detectors/duply/duply.go
+++ b/pkg/detectors/duply/duply.go
@@ -70,11 +70,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/dwolla/dwolla.go b/pkg/detectors/dwolla/dwolla.go
index d67c74f1d..41aa420ff 100644
--- a/pkg/detectors/dwolla/dwolla.go
+++ b/pkg/detectors/dwolla/dwolla.go
@@ -76,11 +76,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(idMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/dynalist/dynalist.go b/pkg/detectors/dynalist/dynalist.go
index 7a2203774..03af2edc1 100644
--- a/pkg/detectors/dynalist/dynalist.go
+++ b/pkg/detectors/dynalist/dynalist.go
@@ -68,11 +68,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/dyspatch/dyspatch.go b/pkg/detectors/dyspatch/dyspatch.go
index 5547d2f44..b51ea7449 100644
--- a/pkg/detectors/dyspatch/dyspatch.go
+++ b/pkg/detectors/dyspatch/dyspatch.go
@@ -67,12 +67,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if validResponse {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
-
}
}
diff --git a/pkg/detectors/eagleeyenetworks/eagleeyenetworks.go b/pkg/detectors/eagleeyenetworks/eagleeyenetworks.go
index 47d1f5677..576030c2f 100644
--- a/pkg/detectors/eagleeyenetworks/eagleeyenetworks.go
+++ b/pkg/detectors/eagleeyenetworks/eagleeyenetworks.go
@@ -67,11 +67,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/easyinsight/easyinsight.go b/pkg/detectors/easyinsight/easyinsight.go
index 12ba7de62..dfab594f3 100644
--- a/pkg/detectors/easyinsight/easyinsight.go
+++ b/pkg/detectors/easyinsight/easyinsight.go
@@ -72,11 +72,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/ecostruxureit/ecostruxureit.go b/pkg/detectors/ecostruxureit/ecostruxureit.go
index 2fa477667..c3d3b9e54 100644
--- a/pkg/detectors/ecostruxureit/ecostruxureit.go
+++ b/pkg/detectors/ecostruxureit/ecostruxureit.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/edamam/edamam.go b/pkg/detectors/edamam/edamam.go
index f1a30ad16..9ed2f5bd3 100644
--- a/pkg/detectors/edamam/edamam.go
+++ b/pkg/detectors/edamam/edamam.go
@@ -65,11 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/edenai/edenai.go b/pkg/detectors/edenai/edenai.go
index 471514dfd..2d1a2d5c7 100644
--- a/pkg/detectors/edenai/edenai.go
+++ b/pkg/detectors/edenai/edenai.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/eightxeight/eightxeight.go b/pkg/detectors/eightxeight/eightxeight.go
index 628942c4b..d2eee9c84 100644
--- a/pkg/detectors/eightxeight/eightxeight.go
+++ b/pkg/detectors/eightxeight/eightxeight.go
@@ -73,11 +73,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/elasticemail/elasticemail.go b/pkg/detectors/elasticemail/elasticemail.go
index 436cd94e7..1a287cef0 100644
--- a/pkg/detectors/elasticemail/elasticemail.go
+++ b/pkg/detectors/elasticemail/elasticemail.go
@@ -69,10 +69,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
return results, nil
diff --git a/pkg/detectors/enablex/enablex.go b/pkg/detectors/enablex/enablex.go
index 13c8c2409..ab431987b 100644
--- a/pkg/detectors/enablex/enablex.go
+++ b/pkg/detectors/enablex/enablex.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(tokenPatMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/enigma/enigma.go b/pkg/detectors/enigma/enigma.go
index 729b44f48..c58463cb0 100644
--- a/pkg/detectors/enigma/enigma.go
+++ b/pkg/detectors/enigma/enigma.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/envoyapikey/envoyapikey.go b/pkg/detectors/envoyapikey/envoyapikey.go
index b34d3493d..9279344ae 100644
--- a/pkg/detectors/envoyapikey/envoyapikey.go
+++ b/pkg/detectors/envoyapikey/envoyapikey.go
@@ -64,11 +64,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if !strings.Contains(string(body), `"status":401`) {
s1.Verified = true
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/etherscan/etherscan.go b/pkg/detectors/etherscan/etherscan.go
index 585d5bf69..11e375fa9 100644
--- a/pkg/detectors/etherscan/etherscan.go
+++ b/pkg/detectors/etherscan/etherscan.go
@@ -63,12 +63,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if strings.Contains(body, `"OK"`) {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
- }
+ }
}
}
diff --git a/pkg/detectors/ethplorer/ethplorer.go b/pkg/detectors/ethplorer/ethplorer.go
index 3c101d5b6..5731ae246 100644
--- a/pkg/detectors/ethplorer/ethplorer.go
+++ b/pkg/detectors/ethplorer/ethplorer.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/eventbrite/eventbrite.go b/pkg/detectors/eventbrite/eventbrite.go
index d81fe7e44..dfbfbdd67 100644
--- a/pkg/detectors/eventbrite/eventbrite.go
+++ b/pkg/detectors/eventbrite/eventbrite.go
@@ -73,11 +73,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/everhour/everhour.go b/pkg/detectors/everhour/everhour.go
index 1bb2f1461..6e34783b5 100644
--- a/pkg/detectors/everhour/everhour.go
+++ b/pkg/detectors/everhour/everhour.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/exchangerateapi/exchangerateapi.go b/pkg/detectors/exchangerateapi/exchangerateapi.go
index b033c90af..759827858 100644
--- a/pkg/detectors/exchangerateapi/exchangerateapi.go
+++ b/pkg/detectors/exchangerateapi/exchangerateapi.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/exchangeratesapi/exchangeratesapi.go b/pkg/detectors/exchangeratesapi/exchangeratesapi.go
index 2316b94dc..8c3ae9565 100644
--- a/pkg/detectors/exchangeratesapi/exchangeratesapi.go
+++ b/pkg/detectors/exchangeratesapi/exchangeratesapi.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/exportsdk/exportsdk.go b/pkg/detectors/exportsdk/exportsdk.go
index 62ac8ddfa..71233c87b 100644
--- a/pkg/detectors/exportsdk/exportsdk.go
+++ b/pkg/detectors/exportsdk/exportsdk.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/extractorapi/extractorapi.go b/pkg/detectors/extractorapi/extractorapi.go
index 95e15c608..b00e37390 100644
--- a/pkg/detectors/extractorapi/extractorapi.go
+++ b/pkg/detectors/extractorapi/extractorapi.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/facebookoauth/facebookoauth.go b/pkg/detectors/facebookoauth/facebookoauth.go
index 194aa7d7f..fc727e98a 100644
--- a/pkg/detectors/facebookoauth/facebookoauth.go
+++ b/pkg/detectors/facebookoauth/facebookoauth.go
@@ -69,10 +69,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(apiIdRes, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/faceplusplus/faceplusplus.go b/pkg/detectors/faceplusplus/faceplusplus.go
index 24914f083..cf17155cb 100644
--- a/pkg/detectors/faceplusplus/faceplusplus.go
+++ b/pkg/detectors/faceplusplus/faceplusplus.go
@@ -66,12 +66,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
- }
+ }
}
}
diff --git a/pkg/detectors/falsepositives.go b/pkg/detectors/falsepositives.go
index a848267da..7559cfe1a 100644
--- a/pkg/detectors/falsepositives.go
+++ b/pkg/detectors/falsepositives.go
@@ -8,6 +8,9 @@ import (
"unicode/utf8"
ahocorasick "github.com/BobuSumisu/aho-corasick"
+ "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
+
+ "github.com/trufflesecurity/trufflehog/v3/pkg/context"
)
var DefaultFalsePositives = []FalsePositive{"example", "xxxxxx", "aaaaaa", "abcde", "00000", "sample", "www"}
@@ -106,19 +109,62 @@ func StringShannonEntropy(input string) float64 {
}
// FilterResultsWithEntropy filters out determinately unverified results that have a shannon entropy below the given value.
-func FilterResultsWithEntropy(results []Result, entropy float64) []Result {
+func FilterResultsWithEntropy(ctx context.Context, results []Result, entropy float64, shouldLog bool) []Result {
var filteredResults []Result
for _, result := range results {
if !result.Verified {
- if result.RawV2 != nil {
- if StringShannonEntropy(string(result.RawV2)) >= entropy {
+ if result.Raw != nil {
+ if StringShannonEntropy(string(result.Raw)) >= entropy {
filteredResults = append(filteredResults, result)
+ } else {
+ if shouldLog {
+ ctx.Logger().Info("Filtered out result with low entropy", "result", result)
+ }
}
} else {
- if StringShannonEntropy(string(result.Raw)) >= entropy {
+ filteredResults = append(filteredResults, result)
+ }
+ } else {
+ filteredResults = append(filteredResults, result)
+ }
+ }
+ return filteredResults
+}
+
+// FilterKnownFalsePositives filters out known false positives from the results.
+func FilterKnownFalsePositives(ctx context.Context, results []Result, falsePositives []FalsePositive, wordCheck bool, shouldLog bool) []Result {
+ var filteredResults []Result
+ for _, result := range results {
+ if !result.Verified {
+ switch result.DetectorType {
+ case detectorspb.DetectorType_CustomRegex:
+ filteredResults = append(filteredResults, result)
+ break
+ case detectorspb.DetectorType_GCP,
+ detectorspb.DetectorType_URI,
+ detectorspb.DetectorType_AzureBatch,
+ detectorspb.DetectorType_AzureContainerRegistry,
+ detectorspb.DetectorType_Shopify,
+ detectorspb.DetectorType_Postgres,
+ detectorspb.DetectorType_MongoDB,
+ detectorspb.DetectorType_JDBC:
+ filteredResults = append(filteredResults, result)
+ break
+ default:
+ if result.Raw != nil {
+ if !IsKnownFalsePositive(string(result.Raw), falsePositives, wordCheck) {
+ filteredResults = append(filteredResults, result)
+ } else {
+ if shouldLog {
+ ctx.Logger().Info("Filtered out known false positive", "result", result)
+ }
+ }
+ } else {
filteredResults = append(filteredResults, result)
}
}
+ } else {
+ filteredResults = append(filteredResults, result)
}
}
return filteredResults
diff --git a/pkg/detectors/fastforex/fastforex.go b/pkg/detectors/fastforex/fastforex.go
index 0c8b772f4..f4373dc2c 100644
--- a/pkg/detectors/fastforex/fastforex.go
+++ b/pkg/detectors/fastforex/fastforex.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/fastlypersonaltoken/fastlypersonaltoken.go b/pkg/detectors/fastlypersonaltoken/fastlypersonaltoken.go
index 27a6da02c..8981db540 100644
--- a/pkg/detectors/fastlypersonaltoken/fastlypersonaltoken.go
+++ b/pkg/detectors/fastlypersonaltoken/fastlypersonaltoken.go
@@ -83,10 +83,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
"locked": fmt.Sprintf("%t", userRes.Locked),
"two_factor_auth_enabled": fmt.Sprintf("%t", userRes.TwoFactorAuthEnabled),
}
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/feedier/feedier.go b/pkg/detectors/feedier/feedier.go
index 099caea94..01a58d975 100644
--- a/pkg/detectors/feedier/feedier.go
+++ b/pkg/detectors/feedier/feedier.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/fetchrss/fetchrss.go b/pkg/detectors/fetchrss/fetchrss.go
index 8c3b3690f..38b036dea 100644
--- a/pkg/detectors/fetchrss/fetchrss.go
+++ b/pkg/detectors/fetchrss/fetchrss.go
@@ -63,12 +63,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if !strings.Contains(body, "Not authorised") {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
-
}
}
diff --git a/pkg/detectors/fibery/fibery.go b/pkg/detectors/fibery/fibery.go
index ce23a1d1a..5f268343a 100644
--- a/pkg/detectors/fibery/fibery.go
+++ b/pkg/detectors/fibery/fibery.go
@@ -71,11 +71,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/figmapersonalaccesstoken/v1/figmapersonalaccesstoken.go b/pkg/detectors/figmapersonalaccesstoken/v1/figmapersonalaccesstoken.go
index 454b87ee2..4546e1705 100644
--- a/pkg/detectors/figmapersonalaccesstoken/v1/figmapersonalaccesstoken.go
+++ b/pkg/detectors/figmapersonalaccesstoken/v1/figmapersonalaccesstoken.go
@@ -80,9 +80,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
results = append(results, s1)
}
diff --git a/pkg/detectors/figmapersonalaccesstoken/v2/figmapersonalaccesstoken_v2.go b/pkg/detectors/figmapersonalaccesstoken/v2/figmapersonalaccesstoken_v2.go
index 1284d0f53..da23c49de 100644
--- a/pkg/detectors/figmapersonalaccesstoken/v2/figmapersonalaccesstoken_v2.go
+++ b/pkg/detectors/figmapersonalaccesstoken/v2/figmapersonalaccesstoken_v2.go
@@ -79,9 +79,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
results = append(results, s1)
}
diff --git a/pkg/detectors/fileio/fileio.go b/pkg/detectors/fileio/fileio.go
index 136a96762..5d1fae8c2 100644
--- a/pkg/detectors/fileio/fileio.go
+++ b/pkg/detectors/fileio/fileio.go
@@ -67,11 +67,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/finage/finage.go b/pkg/detectors/finage/finage.go
index fc43ec4a5..bd0dca0fa 100644
--- a/pkg/detectors/finage/finage.go
+++ b/pkg/detectors/finage/finage.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/financialmodelingprep/financialmodelingprep.go b/pkg/detectors/financialmodelingprep/financialmodelingprep.go
index 6f3d20194..5783c15a9 100644
--- a/pkg/detectors/financialmodelingprep/financialmodelingprep.go
+++ b/pkg/detectors/financialmodelingprep/financialmodelingprep.go
@@ -69,11 +69,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/findl/findl.go b/pkg/detectors/findl/findl.go
index 0f6150957..921c98596 100644
--- a/pkg/detectors/findl/findl.go
+++ b/pkg/detectors/findl/findl.go
@@ -60,11 +60,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/finnhub/finnhub.go b/pkg/detectors/finnhub/finnhub.go
index 442e908c6..3d5429733 100644
--- a/pkg/detectors/finnhub/finnhub.go
+++ b/pkg/detectors/finnhub/finnhub.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/fixerio/fixerio.go b/pkg/detectors/fixerio/fixerio.go
index 070a8ca2c..e2a77bbd3 100644
--- a/pkg/detectors/fixerio/fixerio.go
+++ b/pkg/detectors/fixerio/fixerio.go
@@ -71,10 +71,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if res.StatusCode >= 200 && res.StatusCode < 300 && validResponse {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
diff --git a/pkg/detectors/flatio/flatio.go b/pkg/detectors/flatio/flatio.go
index 20a39d0c1..4743b2996 100644
--- a/pkg/detectors/flatio/flatio.go
+++ b/pkg/detectors/flatio/flatio.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/fleetbase/fleetbase.go b/pkg/detectors/fleetbase/fleetbase.go
index fd5c4e385..05e7bb12b 100644
--- a/pkg/detectors/fleetbase/fleetbase.go
+++ b/pkg/detectors/fleetbase/fleetbase.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/flickr/flickr.go b/pkg/detectors/flickr/flickr.go
index 1df3abf16..5049678c1 100644
--- a/pkg/detectors/flickr/flickr.go
+++ b/pkg/detectors/flickr/flickr.go
@@ -64,11 +64,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
body := string(bodyBytes)
if (res.StatusCode >= 200 && res.StatusCode < 300) && strings.Contains(body, "owner=") {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/flightapi/flightapi.go b/pkg/detectors/flightapi/flightapi.go
index 049947ac7..90bb89d5e 100644
--- a/pkg/detectors/flightapi/flightapi.go
+++ b/pkg/detectors/flightapi/flightapi.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/flightlabs/flightlabs.go b/pkg/detectors/flightlabs/flightlabs.go
index 516c56fdc..230321d85 100644
--- a/pkg/detectors/flightlabs/flightlabs.go
+++ b/pkg/detectors/flightlabs/flightlabs.go
@@ -65,11 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 && validResponse {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/flightstats/flightstats.go b/pkg/detectors/flightstats/flightstats.go
index 9a898ec7e..0a28e06ef 100644
--- a/pkg/detectors/flightstats/flightstats.go
+++ b/pkg/detectors/flightstats/flightstats.go
@@ -73,11 +73,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
validResponse := (res.StatusCode >= 200 && res.StatusCode < 300 && strings.Contains(body, "id")) || (res.StatusCode == 403 && strings.Contains(body, "application is not active"))
if validResponse {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/float/float.go b/pkg/detectors/float/float.go
index fd5c09415..cb8a0ed90 100644
--- a/pkg/detectors/float/float.go
+++ b/pkg/detectors/float/float.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/flowflu/flowflu.go b/pkg/detectors/flowflu/flowflu.go
index 6848c9848..011631053 100644
--- a/pkg/detectors/flowflu/flowflu.go
+++ b/pkg/detectors/flowflu/flowflu.go
@@ -79,11 +79,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/flutterwave/flutterwave.go b/pkg/detectors/flutterwave/flutterwave.go
index aee9fcc19..32bc69e6d 100644
--- a/pkg/detectors/flutterwave/flutterwave.go
+++ b/pkg/detectors/flutterwave/flutterwave.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/fmfw/fmfw.go b/pkg/detectors/fmfw/fmfw.go
index 1ff4f3286..e6514b1c6 100644
--- a/pkg/detectors/fmfw/fmfw.go
+++ b/pkg/detectors/fmfw/fmfw.go
@@ -69,11 +69,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(tokenPatMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/formbucket/formbucket.go b/pkg/detectors/formbucket/formbucket.go
index 8ace8aca6..b3175d8c8 100644
--- a/pkg/detectors/formbucket/formbucket.go
+++ b/pkg/detectors/formbucket/formbucket.go
@@ -68,11 +68,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if errBody == nil {
if res.StatusCode >= 200 && res.StatusCode < 300 && validResponse {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/formcraft/formcraft.go b/pkg/detectors/formcraft/formcraft.go
index 5e417914f..1f09769d8 100644
--- a/pkg/detectors/formcraft/formcraft.go
+++ b/pkg/detectors/formcraft/formcraft.go
@@ -61,11 +61,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/formio/formio.go b/pkg/detectors/formio/formio.go
index 3c9aba537..b562dd3ed 100644
--- a/pkg/detectors/formio/formio.go
+++ b/pkg/detectors/formio/formio.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/formsite/formsite.go b/pkg/detectors/formsite/formsite.go
index 53cc44009..c8ef4dfa8 100644
--- a/pkg/detectors/formsite/formsite.go
+++ b/pkg/detectors/formsite/formsite.go
@@ -71,11 +71,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/foursquare/foursquare.go b/pkg/detectors/foursquare/foursquare.go
index 12c0a3e94..c5b424694 100644
--- a/pkg/detectors/foursquare/foursquare.go
+++ b/pkg/detectors/foursquare/foursquare.go
@@ -65,11 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/frameio/frameio.go b/pkg/detectors/frameio/frameio.go
index a257a5214..80bb3f174 100644
--- a/pkg/detectors/frameio/frameio.go
+++ b/pkg/detectors/frameio/frameio.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/freshbooks/freshbooks.go b/pkg/detectors/freshbooks/freshbooks.go
index e5a6b5311..0aabfa8cb 100644
--- a/pkg/detectors/freshbooks/freshbooks.go
+++ b/pkg/detectors/freshbooks/freshbooks.go
@@ -70,11 +70,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
body := string(bodyBytes)
if res.StatusCode >= 200 && res.StatusCode < 300 && strings.Contains(body, "Log In to FreshBooks") {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/freshdesk/freshdesk.go b/pkg/detectors/freshdesk/freshdesk.go
index f46f601d4..35971bfc9 100644
--- a/pkg/detectors/freshdesk/freshdesk.go
+++ b/pkg/detectors/freshdesk/freshdesk.go
@@ -69,11 +69,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/front/front.go b/pkg/detectors/front/front.go
index 40de6007d..515322b09 100644
--- a/pkg/detectors/front/front.go
+++ b/pkg/detectors/front/front.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/ftp/ftp.go b/pkg/detectors/ftp/ftp.go
index 58c0d01eb..4a76d2441 100644
--- a/pkg/detectors/ftp/ftp.go
+++ b/pkg/detectors/ftp/ftp.go
@@ -3,12 +3,13 @@ package ftp
import (
"context"
"errors"
- regexp "github.com/wasilibs/go-re2"
"net/textproto"
"net/url"
"strings"
"time"
+ regexp "github.com/wasilibs/go-re2"
+
"github.com/jlaffaye/ftp"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
diff --git a/pkg/detectors/fulcrum/fulcrum.go b/pkg/detectors/fulcrum/fulcrum.go
index 8503dfa4a..c99a2bcd8 100644
--- a/pkg/detectors/fulcrum/fulcrum.go
+++ b/pkg/detectors/fulcrum/fulcrum.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/fullstory/v1/fullstory.go b/pkg/detectors/fullstory/v1/fullstory.go
index fafea2f5d..d051af0b6 100644
--- a/pkg/detectors/fullstory/v1/fullstory.go
+++ b/pkg/detectors/fullstory/v1/fullstory.go
@@ -65,11 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/fullstory/v2/fullstory_v2.go b/pkg/detectors/fullstory/v2/fullstory_v2.go
index 05c07d12e..0b9184d62 100644
--- a/pkg/detectors/fullstory/v2/fullstory_v2.go
+++ b/pkg/detectors/fullstory/v2/fullstory_v2.go
@@ -65,11 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/fxmarket/fxmarket.go b/pkg/detectors/fxmarket/fxmarket.go
index 12713622b..598858545 100644
--- a/pkg/detectors/fxmarket/fxmarket.go
+++ b/pkg/detectors/fxmarket/fxmarket.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/geckoboard/geckoboard.go b/pkg/detectors/geckoboard/geckoboard.go
index 39caa8c6d..2bd56e33f 100644
--- a/pkg/detectors/geckoboard/geckoboard.go
+++ b/pkg/detectors/geckoboard/geckoboard.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/gemini/gemini.go b/pkg/detectors/gemini/gemini.go
index 668763e6a..b51d3c364 100644
--- a/pkg/detectors/gemini/gemini.go
+++ b/pkg/detectors/gemini/gemini.go
@@ -76,10 +76,6 @@ func (s Scanner) FromData(_ context.Context, verify bool, data []byte) (results
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resSecretMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/generic/generic.go b/pkg/detectors/generic/generic.go
index 9ef51da4c..4037a15aa 100644
--- a/pkg/detectors/generic/generic.go
+++ b/pkg/detectors/generic/generic.go
@@ -6,9 +6,10 @@ import (
"context"
"encoding/base64"
"fmt"
- regexp "github.com/wasilibs/go-re2"
"strings"
+ regexp "github.com/wasilibs/go-re2"
+
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
)
@@ -113,26 +114,6 @@ func hasReMatch(matchers []*regexp.Regexp, token string) bool {
return false
}
-// func hasDictWord(wordList []string, token string) bool {
-// lower := strings.ToLower(token)
-// for _, word := range wordList {
-// if strings.Contains(lower, word) {
-// return true
-// }
-// }
-// return false
-// }
-
-// func bytesToCleanWordList(data []byte) []string {
-// words := []string{}
-// for _, word := range strings.Split(string(data), "\n") {
-// if strings.TrimSpace(word) != "" {
-// words = append(words, strings.TrimSpace(strings.ToLower(word)))
-// }
-// }
-// return words
-// }
-
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Generic
}
diff --git a/pkg/detectors/gengo/gengo.go b/pkg/detectors/gengo/gengo.go
index e3c908b64..cea4083cf 100644
--- a/pkg/detectors/gengo/gengo.go
+++ b/pkg/detectors/gengo/gengo.go
@@ -87,15 +87,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if res.StatusCode >= 200 && res.StatusCode < 300 && response.OpStat == "ok" {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
- if detectors.IsKnownFalsePositive(resSecretMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/geoapify/geoapify.go b/pkg/detectors/geoapify/geoapify.go
index 8dc27f81e..83c1d3cbc 100644
--- a/pkg/detectors/geoapify/geoapify.go
+++ b/pkg/detectors/geoapify/geoapify.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/geocode/geocode.go b/pkg/detectors/geocode/geocode.go
index ee5dabbc4..8d4c5c068 100644
--- a/pkg/detectors/geocode/geocode.go
+++ b/pkg/detectors/geocode/geocode.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/geocodify/geocodify.go b/pkg/detectors/geocodify/geocodify.go
index ff01b7aef..4cdd71af7 100644
--- a/pkg/detectors/geocodify/geocodify.go
+++ b/pkg/detectors/geocodify/geocodify.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/geocodio/geocodio.go b/pkg/detectors/geocodio/geocodio.go
index 917847e4a..578997e22 100644
--- a/pkg/detectors/geocodio/geocodio.go
+++ b/pkg/detectors/geocodio/geocodio.go
@@ -65,11 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/geoipifi/geoipifi.go b/pkg/detectors/geoipifi/geoipifi.go
index 1ffebd086..868ea260c 100644
--- a/pkg/detectors/geoipifi/geoipifi.go
+++ b/pkg/detectors/geoipifi/geoipifi.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/getemail/getemail.go b/pkg/detectors/getemail/getemail.go
index 5a4c0bf23..3f0b22499 100644
--- a/pkg/detectors/getemail/getemail.go
+++ b/pkg/detectors/getemail/getemail.go
@@ -69,11 +69,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = true
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/getemails/getemails.go b/pkg/detectors/getemails/getemails.go
index ca40e0501..24d53a2cf 100644
--- a/pkg/detectors/getemails/getemails.go
+++ b/pkg/detectors/getemails/getemails.go
@@ -69,11 +69,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/getgeoapi/getgeoapi.go b/pkg/detectors/getgeoapi/getgeoapi.go
index eae4b465c..c3cd69ebf 100644
--- a/pkg/detectors/getgeoapi/getgeoapi.go
+++ b/pkg/detectors/getgeoapi/getgeoapi.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/getgist/getgist.go b/pkg/detectors/getgist/getgist.go
index b3a985217..77daa21df 100644
--- a/pkg/detectors/getgist/getgist.go
+++ b/pkg/detectors/getgist/getgist.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/getresponse/getresponse.go b/pkg/detectors/getresponse/getresponse.go
index f58b13444..ee0573a44 100644
--- a/pkg/detectors/getresponse/getresponse.go
+++ b/pkg/detectors/getresponse/getresponse.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/getsandbox/getsandbox.go b/pkg/detectors/getsandbox/getsandbox.go
index f2eeff849..d8a13446e 100644
--- a/pkg/detectors/getsandbox/getsandbox.go
+++ b/pkg/detectors/getsandbox/getsandbox.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/github/v1/github_old.go b/pkg/detectors/github/v1/github_old.go
index a8ac717e6..6f7b56d26 100644
--- a/pkg/detectors/github/v1/github_old.go
+++ b/pkg/detectors/github/v1/github_old.go
@@ -98,10 +98,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s1.Verified && detectors.IsKnownFalsePositive(token, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/github_oauth2/github_oauth2.go b/pkg/detectors/github_oauth2/github_oauth2.go
index ea70de7da..7a21053db 100644
--- a/pkg/detectors/github_oauth2/github_oauth2.go
+++ b/pkg/detectors/github_oauth2/github_oauth2.go
@@ -68,10 +68,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.Verified = true
}
- if !s1.Verified && detectors.IsKnownFalsePositive(string(s1.Raw), detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
}
diff --git a/pkg/detectors/githubapp/githubapp.go b/pkg/detectors/githubapp/githubapp.go
index ed27fdd92..8eb48d69f 100644
--- a/pkg/detectors/githubapp/githubapp.go
+++ b/pkg/detectors/githubapp/githubapp.go
@@ -2,8 +2,6 @@ package githubapp
import (
"context"
-
- // b64 "encoding/base64"
"fmt"
regexp "github.com/wasilibs/go-re2"
"net/http"
diff --git a/pkg/detectors/gitlab/v1/gitlab.go b/pkg/detectors/gitlab/v1/gitlab.go
index 703ef672c..c71836622 100644
--- a/pkg/detectors/gitlab/v1/gitlab.go
+++ b/pkg/detectors/gitlab/v1/gitlab.go
@@ -71,10 +71,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, resMatch)
}
- if !s1.Verified && detectors.IsKnownFalsePositive(string(s1.Raw), detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/gitlab/v2/gitlab_v2.go b/pkg/detectors/gitlab/v2/gitlab_v2.go
index 30ab43cc3..2cd0fd8d1 100644
--- a/pkg/detectors/gitlab/v2/gitlab_v2.go
+++ b/pkg/detectors/gitlab/v2/gitlab_v2.go
@@ -63,10 +63,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, resMatch)
}
- if !s1.Verified && detectors.IsKnownFalsePositive(string(s1.Raw), detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/gitter/gitter.go b/pkg/detectors/gitter/gitter.go
index 21c7d113a..a0924bf2c 100644
--- a/pkg/detectors/gitter/gitter.go
+++ b/pkg/detectors/gitter/gitter.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/glassnode/glassnode.go b/pkg/detectors/glassnode/glassnode.go
index ec1c42778..e20516c4d 100644
--- a/pkg/detectors/glassnode/glassnode.go
+++ b/pkg/detectors/glassnode/glassnode.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/gocanvas/gocanvas.go b/pkg/detectors/gocanvas/gocanvas.go
index e05336b26..2b4b4d8b2 100644
--- a/pkg/detectors/gocanvas/gocanvas.go
+++ b/pkg/detectors/gocanvas/gocanvas.go
@@ -82,11 +82,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if res.StatusCode >= 200 && res.StatusCode < 300 && response.Error == nil {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/gocardless/gocardless.go b/pkg/detectors/gocardless/gocardless.go
index d98498622..3b139a20c 100644
--- a/pkg/detectors/gocardless/gocardless.go
+++ b/pkg/detectors/gocardless/gocardless.go
@@ -61,11 +61,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/goodday/goodday.go b/pkg/detectors/goodday/goodday.go
index 1b637bc7a..e51f91faf 100644
--- a/pkg/detectors/goodday/goodday.go
+++ b/pkg/detectors/goodday/goodday.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/googleoauth2/googleoauth2_access_token.go b/pkg/detectors/googleoauth2/googleoauth2_access_token.go
index 193d1b836..b84795b91 100644
--- a/pkg/detectors/googleoauth2/googleoauth2_access_token.go
+++ b/pkg/detectors/googleoauth2/googleoauth2_access_token.go
@@ -65,11 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(vErr)
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(token, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
return
diff --git a/pkg/detectors/grafana/grafana.go b/pkg/detectors/grafana/grafana.go
index 9ca0431b2..182453af0 100644
--- a/pkg/detectors/grafana/grafana.go
+++ b/pkg/detectors/grafana/grafana.go
@@ -74,11 +74,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/grafanaserviceaccount/grafanaserviceaccount.go b/pkg/detectors/grafanaserviceaccount/grafanaserviceaccount.go
index 61d02c8c4..b450582ac 100644
--- a/pkg/detectors/grafanaserviceaccount/grafanaserviceaccount.go
+++ b/pkg/detectors/grafanaserviceaccount/grafanaserviceaccount.go
@@ -83,11 +83,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(key, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
}
diff --git a/pkg/detectors/graphcms/graphcms.go b/pkg/detectors/graphcms/graphcms.go
index 63c17507a..46fcae8c4 100644
--- a/pkg/detectors/graphcms/graphcms.go
+++ b/pkg/detectors/graphcms/graphcms.go
@@ -74,12 +74,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s1.Verified {
- if detectors.IsKnownFalsePositive(string(s1.Raw), detectors.DefaultFalsePositives, true) {
- continue
- }
- }
-
results = append(results, s1)
}
}
diff --git a/pkg/detectors/graphhopper/graphhopper.go b/pkg/detectors/graphhopper/graphhopper.go
index 84c25ff88..363891894 100644
--- a/pkg/detectors/graphhopper/graphhopper.go
+++ b/pkg/detectors/graphhopper/graphhopper.go
@@ -53,11 +53,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/groovehq/groovehq.go b/pkg/detectors/groovehq/groovehq.go
index c1bfa8dad..0dee1c3d6 100644
--- a/pkg/detectors/groovehq/groovehq.go
+++ b/pkg/detectors/groovehq/groovehq.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/gtmetrix/gtmetrix.go b/pkg/detectors/gtmetrix/gtmetrix.go
index e1a06782b..96ce3d282 100644
--- a/pkg/detectors/gtmetrix/gtmetrix.go
+++ b/pkg/detectors/gtmetrix/gtmetrix.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/guardianapi/guardianapi.go b/pkg/detectors/guardianapi/guardianapi.go
index 1c55c8f49..9da39d446 100644
--- a/pkg/detectors/guardianapi/guardianapi.go
+++ b/pkg/detectors/guardianapi/guardianapi.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/gumroad/gumroad.go b/pkg/detectors/gumroad/gumroad.go
index cd341d3b9..243f3204d 100644
--- a/pkg/detectors/gumroad/gumroad.go
+++ b/pkg/detectors/gumroad/gumroad.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/guru/guru.go b/pkg/detectors/guru/guru.go
index 8622faec9..315637852 100644
--- a/pkg/detectors/guru/guru.go
+++ b/pkg/detectors/guru/guru.go
@@ -72,11 +72,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(keyMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/gyazo/gyazo.go b/pkg/detectors/gyazo/gyazo.go
index 5c908ebaf..a058d7b37 100644
--- a/pkg/detectors/gyazo/gyazo.go
+++ b/pkg/detectors/gyazo/gyazo.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/happyscribe/happyscribe.go b/pkg/detectors/happyscribe/happyscribe.go
index 7cf67309b..a5b49b1b2 100644
--- a/pkg/detectors/happyscribe/happyscribe.go
+++ b/pkg/detectors/happyscribe/happyscribe.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/harvest/harvest.go b/pkg/detectors/harvest/harvest.go
index 425205332..6f917485a 100644
--- a/pkg/detectors/harvest/harvest.go
+++ b/pkg/detectors/harvest/harvest.go
@@ -63,11 +63,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/hellosign/hellosign.go b/pkg/detectors/hellosign/hellosign.go
index 63c52e3c0..24b6548df 100644
--- a/pkg/detectors/hellosign/hellosign.go
+++ b/pkg/detectors/hellosign/hellosign.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/helpcrunch/helpcrunch.go b/pkg/detectors/helpcrunch/helpcrunch.go
index 93eaa7ef6..d8396c788 100644
--- a/pkg/detectors/helpcrunch/helpcrunch.go
+++ b/pkg/detectors/helpcrunch/helpcrunch.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/helpscout/helpscout.go b/pkg/detectors/helpscout/helpscout.go
index 1139c0030..842a6dece 100644
--- a/pkg/detectors/helpscout/helpscout.go
+++ b/pkg/detectors/helpscout/helpscout.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/hereapi/hereapi.go b/pkg/detectors/hereapi/hereapi.go
index 530f2d60e..bfb5e4811 100644
--- a/pkg/detectors/hereapi/hereapi.go
+++ b/pkg/detectors/hereapi/hereapi.go
@@ -55,11 +55,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/heroku/heroku.go b/pkg/detectors/heroku/heroku.go
index d08cab603..e6ce180e4 100644
--- a/pkg/detectors/heroku/heroku.go
+++ b/pkg/detectors/heroku/heroku.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/hive/hive.go b/pkg/detectors/hive/hive.go
index f0e1bb0e8..c12bf1416 100644
--- a/pkg/detectors/hive/hive.go
+++ b/pkg/detectors/hive/hive.go
@@ -65,11 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(keyMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/hiveage/hiveage.go b/pkg/detectors/hiveage/hiveage.go
index c206e8c60..c797cbe30 100644
--- a/pkg/detectors/hiveage/hiveage.go
+++ b/pkg/detectors/hiveage/hiveage.go
@@ -62,11 +62,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/holidayapi/holidayapi.go b/pkg/detectors/holidayapi/holidayapi.go
index 3ceac5b09..1e24be439 100644
--- a/pkg/detectors/holidayapi/holidayapi.go
+++ b/pkg/detectors/holidayapi/holidayapi.go
@@ -57,12 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
- }
+ }
}
}
diff --git a/pkg/detectors/holistic/holistic.go b/pkg/detectors/holistic/holistic.go
index 5f08c5956..42fb87a5d 100644
--- a/pkg/detectors/holistic/holistic.go
+++ b/pkg/detectors/holistic/holistic.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 && !errorResponse {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/honeycomb/honeycomb.go b/pkg/detectors/honeycomb/honeycomb.go
index ca9dcbd71..c52beae7b 100644
--- a/pkg/detectors/honeycomb/honeycomb.go
+++ b/pkg/detectors/honeycomb/honeycomb.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/host/host.go b/pkg/detectors/host/host.go
index eb627e742..416bb457f 100644
--- a/pkg/detectors/host/host.go
+++ b/pkg/detectors/host/host.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/html2pdf/html2pdf.go b/pkg/detectors/html2pdf/html2pdf.go
index 93a95843a..20f8328bd 100644
--- a/pkg/detectors/html2pdf/html2pdf.go
+++ b/pkg/detectors/html2pdf/html2pdf.go
@@ -63,11 +63,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/hubspotapikey/hubspotapikey.go b/pkg/detectors/hubspotapikey/hubspotapikey.go
index 74a7cd8c6..e912dea44 100644
--- a/pkg/detectors/hubspotapikey/hubspotapikey.go
+++ b/pkg/detectors/hubspotapikey/hubspotapikey.go
@@ -55,10 +55,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/huggingface/huggingface.go b/pkg/detectors/huggingface/huggingface.go
index a6fa0a855..f836def20 100644
--- a/pkg/detectors/huggingface/huggingface.go
+++ b/pkg/detectors/huggingface/huggingface.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, resMatch)
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/humanity/humanity.go b/pkg/detectors/humanity/humanity.go
index e258b5671..57e987d95 100644
--- a/pkg/detectors/humanity/humanity.go
+++ b/pkg/detectors/humanity/humanity.go
@@ -65,12 +65,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if validResponse {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
-
}
}
diff --git a/pkg/detectors/hunter/hunter.go b/pkg/detectors/hunter/hunter.go
index ec7beba33..2c2949ab4 100644
--- a/pkg/detectors/hunter/hunter.go
+++ b/pkg/detectors/hunter/hunter.go
@@ -2,8 +2,6 @@ package hunter
import (
"context"
- // "fmt"
- // "log"
regexp "github.com/wasilibs/go-re2"
"net/http"
"strings"
@@ -57,10 +55,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/hybiscus/hybiscus.go b/pkg/detectors/hybiscus/hybiscus.go
index 6e0e8f040..1ccbade48 100644
--- a/pkg/detectors/hybiscus/hybiscus.go
+++ b/pkg/detectors/hybiscus/hybiscus.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/hypertrack/hypertrack.go b/pkg/detectors/hypertrack/hypertrack.go
index c70821196..6a257e546 100644
--- a/pkg/detectors/hypertrack/hypertrack.go
+++ b/pkg/detectors/hypertrack/hypertrack.go
@@ -67,15 +67,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
- if detectors.IsKnownFalsePositive(resAccMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/ibmclouduserkey/ibmclouduserkey.go b/pkg/detectors/ibmclouduserkey/ibmclouduserkey.go
index 551453dfd..af8c57166 100644
--- a/pkg/detectors/ibmclouduserkey/ibmclouduserkey.go
+++ b/pkg/detectors/ibmclouduserkey/ibmclouduserkey.go
@@ -59,12 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
-
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/iconfinder/iconfinder.go b/pkg/detectors/iconfinder/iconfinder.go
index c98e8acb6..08aef96f2 100644
--- a/pkg/detectors/iconfinder/iconfinder.go
+++ b/pkg/detectors/iconfinder/iconfinder.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/iexapis/iexapis.go b/pkg/detectors/iexapis/iexapis.go
index da15de37c..d4735f0d6 100644
--- a/pkg/detectors/iexapis/iexapis.go
+++ b/pkg/detectors/iexapis/iexapis.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/iexcloud/iexcloud.go b/pkg/detectors/iexcloud/iexcloud.go
index 6da807d4f..57ed64208 100644
--- a/pkg/detectors/iexcloud/iexcloud.go
+++ b/pkg/detectors/iexcloud/iexcloud.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/imagekit/imagekit.go b/pkg/detectors/imagekit/imagekit.go
index cb36a8614..549291a17 100644
--- a/pkg/detectors/imagekit/imagekit.go
+++ b/pkg/detectors/imagekit/imagekit.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/imagga/imagga.go b/pkg/detectors/imagga/imagga.go
index f63241bad..4c7130c65 100644
--- a/pkg/detectors/imagga/imagga.go
+++ b/pkg/detectors/imagga/imagga.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/impala/impala.go b/pkg/detectors/impala/impala.go
index dde3ca5c0..0705954d6 100644
--- a/pkg/detectors/impala/impala.go
+++ b/pkg/detectors/impala/impala.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/infura/infura.go b/pkg/detectors/infura/infura.go
index 1e54c7a48..653c51351 100644
--- a/pkg/detectors/infura/infura.go
+++ b/pkg/detectors/infura/infura.go
@@ -64,11 +64,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
body := string(bodyBytes)
if strings.Contains(body, `"result"`) {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/insightly/insightly.go b/pkg/detectors/insightly/insightly.go
index e77798045..1f298d847 100644
--- a/pkg/detectors/insightly/insightly.go
+++ b/pkg/detectors/insightly/insightly.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/instabot/instabot.go b/pkg/detectors/instabot/instabot.go
index 6ba73ac28..24b5b3b92 100644
--- a/pkg/detectors/instabot/instabot.go
+++ b/pkg/detectors/instabot/instabot.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/instamojo/instamojo.go b/pkg/detectors/instamojo/instamojo.go
index de281a18c..249405f42 100644
--- a/pkg/detectors/instamojo/instamojo.go
+++ b/pkg/detectors/instamojo/instamojo.go
@@ -90,10 +90,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s1.Verified && detectors.IsKnownFalsePositive(string(s1.Raw), detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
}
diff --git a/pkg/detectors/integromat/integromat.go b/pkg/detectors/integromat/integromat.go
index 562e6d090..2ca972a1c 100644
--- a/pkg/detectors/integromat/integromat.go
+++ b/pkg/detectors/integromat/integromat.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/intercom/intercom.go b/pkg/detectors/intercom/intercom.go
index b4b7a0420..ad820bf7c 100644
--- a/pkg/detectors/intercom/intercom.go
+++ b/pkg/detectors/intercom/intercom.go
@@ -68,11 +68,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/intrinio/intrinio.go b/pkg/detectors/intrinio/intrinio.go
index c881fe3a1..fb6a33bfc 100644
--- a/pkg/detectors/intrinio/intrinio.go
+++ b/pkg/detectors/intrinio/intrinio.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/invoiceocean/invoiceocean.go b/pkg/detectors/invoiceocean/invoiceocean.go
index b77a385dd..0669142ff 100644
--- a/pkg/detectors/invoiceocean/invoiceocean.go
+++ b/pkg/detectors/invoiceocean/invoiceocean.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/ip2location/ip2location.go b/pkg/detectors/ip2location/ip2location.go
index c2fac406c..6dd8ed714 100644
--- a/pkg/detectors/ip2location/ip2location.go
+++ b/pkg/detectors/ip2location/ip2location.go
@@ -67,9 +67,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(err, resMatch)
}
}
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
results = append(results, s1)
}
diff --git a/pkg/detectors/ipapi/ipapi.go b/pkg/detectors/ipapi/ipapi.go
index 3f686ea97..7c00fcb2f 100644
--- a/pkg/detectors/ipapi/ipapi.go
+++ b/pkg/detectors/ipapi/ipapi.go
@@ -68,11 +68,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/ipgeolocation/ipgeolocation.go b/pkg/detectors/ipgeolocation/ipgeolocation.go
index cc77f9000..c70162f79 100644
--- a/pkg/detectors/ipgeolocation/ipgeolocation.go
+++ b/pkg/detectors/ipgeolocation/ipgeolocation.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/ipinfo/ipinfo.go b/pkg/detectors/ipinfo/ipinfo.go
index b28387a5e..f36abaae3 100644
--- a/pkg/detectors/ipinfo/ipinfo.go
+++ b/pkg/detectors/ipinfo/ipinfo.go
@@ -74,11 +74,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/ipinfodb/ipinfodb.go b/pkg/detectors/ipinfodb/ipinfodb.go
index 35f78246c..5773f8279 100644
--- a/pkg/detectors/ipinfodb/ipinfodb.go
+++ b/pkg/detectors/ipinfodb/ipinfodb.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/ipquality/ipquality.go b/pkg/detectors/ipquality/ipquality.go
index d6546f742..dfa4b1a21 100644
--- a/pkg/detectors/ipquality/ipquality.go
+++ b/pkg/detectors/ipquality/ipquality.go
@@ -65,11 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
validResponse := strings.Contains(body, "insufficient credits") || strings.Contains(body, `"success":true`)
if (res.StatusCode >= 200 && res.StatusCode < 300) && validResponse {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/ipstack/ipstack.go b/pkg/detectors/ipstack/ipstack.go
index 726c42eae..b09a0ab8d 100644
--- a/pkg/detectors/ipstack/ipstack.go
+++ b/pkg/detectors/ipstack/ipstack.go
@@ -63,10 +63,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if validResponse {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
diff --git a/pkg/detectors/jdbc/jdbc.go b/pkg/detectors/jdbc/jdbc.go
index 82120bd39..cc28db559 100644
--- a/pkg/detectors/jdbc/jdbc.go
+++ b/pkg/detectors/jdbc/jdbc.go
@@ -98,9 +98,7 @@ matchLoop:
// TODO: specialized redaction
}
- if !s.Verified && detectors.IsKnownFalsePositive(string(s.Raw), detectors.DefaultFalsePositives, false) {
- continue
- }
+
results = append(results, s)
}
diff --git a/pkg/detectors/jiratoken/v1/jiratoken.go b/pkg/detectors/jiratoken/v1/jiratoken.go
index ae174feb3..92e243f34 100644
--- a/pkg/detectors/jiratoken/v1/jiratoken.go
+++ b/pkg/detectors/jiratoken/v1/jiratoken.go
@@ -86,10 +86,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, resToken)
}
- if !s1.Verified && detectors.IsKnownFalsePositive(string(s1.Raw), detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
}
diff --git a/pkg/detectors/jiratoken/v2/jiratoken_v2.go b/pkg/detectors/jiratoken/v2/jiratoken_v2.go
index 04f08953e..c356c16a7 100644
--- a/pkg/detectors/jiratoken/v2/jiratoken_v2.go
+++ b/pkg/detectors/jiratoken/v2/jiratoken_v2.go
@@ -87,10 +87,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, resToken)
}
- if !s1.Verified && detectors.IsKnownFalsePositive(string(s1.Raw), detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/jotform/jotform.go b/pkg/detectors/jotform/jotform.go
index 1504e1181..d8005be54 100644
--- a/pkg/detectors/jotform/jotform.go
+++ b/pkg/detectors/jotform/jotform.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/jumpcloud/jumpcloud.go b/pkg/detectors/jumpcloud/jumpcloud.go
index 0f8186097..cbd5b0ef2 100644
--- a/pkg/detectors/jumpcloud/jumpcloud.go
+++ b/pkg/detectors/jumpcloud/jumpcloud.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/juro/juro.go b/pkg/detectors/juro/juro.go
index 7ccd9adfd..c35dac3e4 100644
--- a/pkg/detectors/juro/juro.go
+++ b/pkg/detectors/juro/juro.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/kanban/kanban.go b/pkg/detectors/kanban/kanban.go
index 96a695e21..dabd5561e 100644
--- a/pkg/detectors/kanban/kanban.go
+++ b/pkg/detectors/kanban/kanban.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/kanbantool/kanbantool.go b/pkg/detectors/kanbantool/kanbantool.go
index 3385e45df..b2a32f579 100644
--- a/pkg/detectors/kanbantool/kanbantool.go
+++ b/pkg/detectors/kanbantool/kanbantool.go
@@ -65,11 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/karmacrm/karmacrm.go b/pkg/detectors/karmacrm/karmacrm.go
index 7b93983ce..0fb783f27 100644
--- a/pkg/detectors/karmacrm/karmacrm.go
+++ b/pkg/detectors/karmacrm/karmacrm.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/keenio/keenio.go b/pkg/detectors/keenio/keenio.go
index e0b89deb4..0ff37ba09 100644
--- a/pkg/detectors/keenio/keenio.go
+++ b/pkg/detectors/keenio/keenio.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/klaviyo/klaviyo.go b/pkg/detectors/klaviyo/klaviyo.go
index 6019d775c..404956042 100644
--- a/pkg/detectors/klaviyo/klaviyo.go
+++ b/pkg/detectors/klaviyo/klaviyo.go
@@ -104,11 +104,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/klipfolio/klipfolio.go b/pkg/detectors/klipfolio/klipfolio.go
index 5824f1764..b6d1078d2 100644
--- a/pkg/detectors/klipfolio/klipfolio.go
+++ b/pkg/detectors/klipfolio/klipfolio.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/knapsackpro/knapsackpro.go b/pkg/detectors/knapsackpro/knapsackpro.go
index ba68a522e..fa37e0ba5 100644
--- a/pkg/detectors/knapsackpro/knapsackpro.go
+++ b/pkg/detectors/knapsackpro/knapsackpro.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/kontent/kontent.go b/pkg/detectors/kontent/kontent.go
index 7166835ee..af97f7ed9 100644
--- a/pkg/detectors/kontent/kontent.go
+++ b/pkg/detectors/kontent/kontent.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/kraken/kraken.go b/pkg/detectors/kraken/kraken.go
index 0a0693d14..b9cdf814b 100644
--- a/pkg/detectors/kraken/kraken.go
+++ b/pkg/detectors/kraken/kraken.go
@@ -89,11 +89,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
out, _ := io.ReadAll(res.Body)
if !strings.Contains(string(out), "Invalid key") {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/kucoin/kucoin.go b/pkg/detectors/kucoin/kucoin.go
index 0f68a3946..176d6429d 100644
--- a/pkg/detectors/kucoin/kucoin.go
+++ b/pkg/detectors/kucoin/kucoin.go
@@ -94,15 +94,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resKeyMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
- if detectors.IsKnownFalsePositive(resSecretMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/kylas/kylas.go b/pkg/detectors/kylas/kylas.go
index 815ea5256..c81235da6 100644
--- a/pkg/detectors/kylas/kylas.go
+++ b/pkg/detectors/kylas/kylas.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/languagelayer/languagelayer.go b/pkg/detectors/languagelayer/languagelayer.go
index 68e5e8e14..5f3c856b5 100644
--- a/pkg/detectors/languagelayer/languagelayer.go
+++ b/pkg/detectors/languagelayer/languagelayer.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/launchdarkly/launchdarkly.go b/pkg/detectors/launchdarkly/launchdarkly.go
index 6bafc25d9..10f1a1a0c 100644
--- a/pkg/detectors/launchdarkly/launchdarkly.go
+++ b/pkg/detectors/launchdarkly/launchdarkly.go
@@ -101,11 +101,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/leadfeeder/leadfeeder.go b/pkg/detectors/leadfeeder/leadfeeder.go
index b643a070d..44ca3feb3 100644
--- a/pkg/detectors/leadfeeder/leadfeeder.go
+++ b/pkg/detectors/leadfeeder/leadfeeder.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/lemlist/lemlist.go b/pkg/detectors/lemlist/lemlist.go
index d76a1b5ea..af21db0b9 100644
--- a/pkg/detectors/lemlist/lemlist.go
+++ b/pkg/detectors/lemlist/lemlist.go
@@ -61,11 +61,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/lemonsqueezy/lemonsqueezy.go b/pkg/detectors/lemonsqueezy/lemonsqueezy.go
index ee04f1ab3..498af18dc 100644
--- a/pkg/detectors/lemonsqueezy/lemonsqueezy.go
+++ b/pkg/detectors/lemonsqueezy/lemonsqueezy.go
@@ -74,11 +74,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/lessannoyingcrm/lessannoyingcrm.go b/pkg/detectors/lessannoyingcrm/lessannoyingcrm.go
index f894acedc..4c475bcb5 100644
--- a/pkg/detectors/lessannoyingcrm/lessannoyingcrm.go
+++ b/pkg/detectors/lessannoyingcrm/lessannoyingcrm.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/lexigram/lexigram.go b/pkg/detectors/lexigram/lexigram.go
index 1f4209ce8..4af5b9b6b 100644
--- a/pkg/detectors/lexigram/lexigram.go
+++ b/pkg/detectors/lexigram/lexigram.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/linearapi/linearapi.go b/pkg/detectors/linearapi/linearapi.go
index 69d29747c..d17194cc7 100644
--- a/pkg/detectors/linearapi/linearapi.go
+++ b/pkg/detectors/linearapi/linearapi.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
body := string(bodyBytes)
if res.StatusCode >= 200 && res.StatusCode < 300 && strings.Contains(body, `"data":`) {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/linemessaging/linemessaging.go b/pkg/detectors/linemessaging/linemessaging.go
index 2f0ca3b6a..c5405c06a 100644
--- a/pkg/detectors/linemessaging/linemessaging.go
+++ b/pkg/detectors/linemessaging/linemessaging.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/linenotify/linenotify.go b/pkg/detectors/linenotify/linenotify.go
index 4669865d7..2fd52104c 100644
--- a/pkg/detectors/linenotify/linenotify.go
+++ b/pkg/detectors/linenotify/linenotify.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/linkpreview/linkpreview.go b/pkg/detectors/linkpreview/linkpreview.go
index 66d00ac13..75cd7891c 100644
--- a/pkg/detectors/linkpreview/linkpreview.go
+++ b/pkg/detectors/linkpreview/linkpreview.go
@@ -55,11 +55,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/liveagent/liveagent.go b/pkg/detectors/liveagent/liveagent.go
index c81ad2d89..314845c6b 100644
--- a/pkg/detectors/liveagent/liveagent.go
+++ b/pkg/detectors/liveagent/liveagent.go
@@ -84,11 +84,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if r.Message == "You do not have sufficient privileges" {
s1.Verified = true
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/livestorm/livestorm.go b/pkg/detectors/livestorm/livestorm.go
index f1767d03f..d0bedbcd7 100644
--- a/pkg/detectors/livestorm/livestorm.go
+++ b/pkg/detectors/livestorm/livestorm.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/loadmill/loadmill.go b/pkg/detectors/loadmill/loadmill.go
index 61ccc54d2..b2a5dbb65 100644
--- a/pkg/detectors/loadmill/loadmill.go
+++ b/pkg/detectors/loadmill/loadmill.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/lob/lob.go b/pkg/detectors/lob/lob.go
index 0a27c0e8b..438fcc010 100644
--- a/pkg/detectors/lob/lob.go
+++ b/pkg/detectors/lob/lob.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/locationiq/locationiq.go b/pkg/detectors/locationiq/locationiq.go
index 750cd168e..5c96ecb73 100644
--- a/pkg/detectors/locationiq/locationiq.go
+++ b/pkg/detectors/locationiq/locationiq.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/loggly/loggly.go b/pkg/detectors/loggly/loggly.go
index 453bc3aa2..9ed2c60cb 100644
--- a/pkg/detectors/loggly/loggly.go
+++ b/pkg/detectors/loggly/loggly.go
@@ -84,11 +84,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(key, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
}
diff --git a/pkg/detectors/loginradius/loginradius.go b/pkg/detectors/loginradius/loginradius.go
index 05c2f425e..0e26b57f0 100644
--- a/pkg/detectors/loginradius/loginradius.go
+++ b/pkg/detectors/loginradius/loginradius.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/logzio/logzio.go b/pkg/detectors/logzio/logzio.go
index 1addc3b5e..58b8f4f47 100644
--- a/pkg/detectors/logzio/logzio.go
+++ b/pkg/detectors/logzio/logzio.go
@@ -75,11 +75,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/lokalisetoken/lokalisetoken.go b/pkg/detectors/lokalisetoken/lokalisetoken.go
index b109e4059..213890bdb 100644
--- a/pkg/detectors/lokalisetoken/lokalisetoken.go
+++ b/pkg/detectors/lokalisetoken/lokalisetoken.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/loyverse/loyverse.go b/pkg/detectors/loyverse/loyverse.go
index 4fa28b51e..2ec507695 100644
--- a/pkg/detectors/loyverse/loyverse.go
+++ b/pkg/detectors/loyverse/loyverse.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/lunchmoney/lunchmoney.go b/pkg/detectors/lunchmoney/lunchmoney.go
index 98a53b291..44b4aa7ab 100644
--- a/pkg/detectors/lunchmoney/lunchmoney.go
+++ b/pkg/detectors/lunchmoney/lunchmoney.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/luno/luno.go b/pkg/detectors/luno/luno.go
index d8af86bad..af9798b32 100644
--- a/pkg/detectors/luno/luno.go
+++ b/pkg/detectors/luno/luno.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(tokenPatMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/m3o/m3o.go b/pkg/detectors/m3o/m3o.go
index f55a65d81..2ec5ca4c4 100644
--- a/pkg/detectors/m3o/m3o.go
+++ b/pkg/detectors/m3o/m3o.go
@@ -63,11 +63,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/madkudu/madkudu.go b/pkg/detectors/madkudu/madkudu.go
index b0f80424d..398514891 100644
--- a/pkg/detectors/madkudu/madkudu.go
+++ b/pkg/detectors/madkudu/madkudu.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/magicbell/magicbell.go b/pkg/detectors/magicbell/magicbell.go
index 730b59b27..65332d0fc 100644
--- a/pkg/detectors/magicbell/magicbell.go
+++ b/pkg/detectors/magicbell/magicbell.go
@@ -49,10 +49,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
emailRes := strings.TrimSpace(emailMatch[1])
- if detectors.IsKnownFalsePositive(apiKeyRes, detectors.DefaultFalsePositives, true) { // wait- (apiKeyRes, email) might be false positive does not mean (apiKeyRes, another_email) is ?
- continue
- }
-
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_MagicBell,
Raw: []byte(apiKeyRes),
@@ -70,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(apiKeyRes, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/magnetic/magnetic.go b/pkg/detectors/magnetic/magnetic.go
index aa2867c00..d6b1f1ef7 100644
--- a/pkg/detectors/magnetic/magnetic.go
+++ b/pkg/detectors/magnetic/magnetic.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
@@ -70,7 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
return results, nil
}
-
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Magnetic
}
diff --git a/pkg/detectors/mailboxlayer/mailboxlayer.go b/pkg/detectors/mailboxlayer/mailboxlayer.go
index 57d1ea402..dd4112b5b 100644
--- a/pkg/detectors/mailboxlayer/mailboxlayer.go
+++ b/pkg/detectors/mailboxlayer/mailboxlayer.go
@@ -2,11 +2,12 @@ package mailboxlayer
import (
"context"
- regexp "github.com/wasilibs/go-re2"
"io"
"net/http"
"strings"
+ regexp "github.com/wasilibs/go-re2"
+
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
@@ -68,10 +69,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if validResponse {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
diff --git a/pkg/detectors/mailchimp/mailchimp.go b/pkg/detectors/mailchimp/mailchimp.go
index 852062f17..ba70c1758 100644
--- a/pkg/detectors/mailchimp/mailchimp.go
+++ b/pkg/detectors/mailchimp/mailchimp.go
@@ -61,11 +61,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(match, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/mailerlite/mailerlite.go b/pkg/detectors/mailerlite/mailerlite.go
index cac7e1428..bf757bff5 100644
--- a/pkg/detectors/mailerlite/mailerlite.go
+++ b/pkg/detectors/mailerlite/mailerlite.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/mailgun/mailgun.go b/pkg/detectors/mailgun/mailgun.go
index 7f129cd58..991b7f2f0 100644
--- a/pkg/detectors/mailgun/mailgun.go
+++ b/pkg/detectors/mailgun/mailgun.go
@@ -68,10 +68,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
diff --git a/pkg/detectors/mailjetbasicauth/mailjetbasicauth.go b/pkg/detectors/mailjetbasicauth/mailjetbasicauth.go
index 6faabbb34..6eca7efb0 100644
--- a/pkg/detectors/mailjetbasicauth/mailjetbasicauth.go
+++ b/pkg/detectors/mailjetbasicauth/mailjetbasicauth.go
@@ -57,10 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/mailjetsms/mailjetsms.go b/pkg/detectors/mailjetsms/mailjetsms.go
index 82bdc3c27..0118f2ff6 100644
--- a/pkg/detectors/mailjetsms/mailjetsms.go
+++ b/pkg/detectors/mailjetsms/mailjetsms.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
-
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/mailmodo/mailmodo.go b/pkg/detectors/mailmodo/mailmodo.go
index 0fdf69feb..0c8081ca0 100644
--- a/pkg/detectors/mailmodo/mailmodo.go
+++ b/pkg/detectors/mailmodo/mailmodo.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/mailsac/mailsac.go b/pkg/detectors/mailsac/mailsac.go
index 97ee69af6..c758c173f 100644
--- a/pkg/detectors/mailsac/mailsac.go
+++ b/pkg/detectors/mailsac/mailsac.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/mandrill/mandrill.go b/pkg/detectors/mandrill/mandrill.go
index be0a496bf..df33889be 100644
--- a/pkg/detectors/mandrill/mandrill.go
+++ b/pkg/detectors/mandrill/mandrill.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/manifest/manifest.go b/pkg/detectors/manifest/manifest.go
index e74cbf3fc..6a11688a5 100644
--- a/pkg/detectors/manifest/manifest.go
+++ b/pkg/detectors/manifest/manifest.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/mapbox/mapbox.go b/pkg/detectors/mapbox/mapbox.go
index bbeb059e8..a1341c4e1 100644
--- a/pkg/detectors/mapbox/mapbox.go
+++ b/pkg/detectors/mapbox/mapbox.go
@@ -2,7 +2,6 @@ package mapbox
import (
"context"
- // "log"
regexp "github.com/wasilibs/go-re2"
"net/http"
"strings"
@@ -60,10 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/mapquest/mapquest.go b/pkg/detectors/mapquest/mapquest.go
index 640896264..78807166f 100644
--- a/pkg/detectors/mapquest/mapquest.go
+++ b/pkg/detectors/mapquest/mapquest.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/marketstack/marketstack.go b/pkg/detectors/marketstack/marketstack.go
index e3eb5ac76..903f750bf 100644
--- a/pkg/detectors/marketstack/marketstack.go
+++ b/pkg/detectors/marketstack/marketstack.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken.go b/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken.go
index ca5c65ba2..80c6627cf 100644
--- a/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken.go
+++ b/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken.go
@@ -67,11 +67,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/mavenlink/mavenlink.go b/pkg/detectors/mavenlink/mavenlink.go
index 6897cc1de..b6f6296f2 100644
--- a/pkg/detectors/mavenlink/mavenlink.go
+++ b/pkg/detectors/mavenlink/mavenlink.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/maxmindlicense/v1/maxmindlicense.go b/pkg/detectors/maxmindlicense/v1/maxmindlicense.go
index 0e20c158b..6a2ac4119 100644
--- a/pkg/detectors/maxmindlicense/v1/maxmindlicense.go
+++ b/pkg/detectors/maxmindlicense/v1/maxmindlicense.go
@@ -70,10 +70,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(keyRes, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/meaningcloud/meaningcloud.go b/pkg/detectors/meaningcloud/meaningcloud.go
index 5d4eb584c..50ce02f65 100644
--- a/pkg/detectors/meaningcloud/meaningcloud.go
+++ b/pkg/detectors/meaningcloud/meaningcloud.go
@@ -91,11 +91,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if r.DeepTime > 0 {
s1.Verified = true
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/mediastack/mediastack.go b/pkg/detectors/mediastack/mediastack.go
index 0cd9ab3cc..d8116e0e4 100644
--- a/pkg/detectors/mediastack/mediastack.go
+++ b/pkg/detectors/mediastack/mediastack.go
@@ -60,11 +60,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/meistertask/meistertask.go b/pkg/detectors/meistertask/meistertask.go
index 3219747b0..205ac3b03 100644
--- a/pkg/detectors/meistertask/meistertask.go
+++ b/pkg/detectors/meistertask/meistertask.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/mesibo/mesibo.go b/pkg/detectors/mesibo/mesibo.go
index 81a5c9ae5..e2daed884 100644
--- a/pkg/detectors/mesibo/mesibo.go
+++ b/pkg/detectors/mesibo/mesibo.go
@@ -63,12 +63,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if !strings.Contains(body, "AUTHFAIL") {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
-
}
}
diff --git a/pkg/detectors/messagebird/messagebird.go b/pkg/detectors/messagebird/messagebird.go
index 56e42cc06..5bc2f8485 100644
--- a/pkg/detectors/messagebird/messagebird.go
+++ b/pkg/detectors/messagebird/messagebird.go
@@ -57,10 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/metaapi/metaapi.go b/pkg/detectors/metaapi/metaapi.go
index e5ee72722..121c78b8b 100644
--- a/pkg/detectors/metaapi/metaapi.go
+++ b/pkg/detectors/metaapi/metaapi.go
@@ -73,11 +73,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if res.StatusCode >= 200 && res.StatusCode < 300 && strings.Contains(bodyStr, `"success":true`) {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/metabase/metabase.go b/pkg/detectors/metabase/metabase.go
index 53f11c9f3..852e671fc 100644
--- a/pkg/detectors/metabase/metabase.go
+++ b/pkg/detectors/metabase/metabase.go
@@ -73,11 +73,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
if res.StatusCode == http.StatusOK && json.Valid(body) {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/metrilo/metrilo.go b/pkg/detectors/metrilo/metrilo.go
index a25a16875..cee0e2bc4 100644
--- a/pkg/detectors/metrilo/metrilo.go
+++ b/pkg/detectors/metrilo/metrilo.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/microsoftteamswebhook/microsoftteamswebhook.go b/pkg/detectors/microsoftteamswebhook/microsoftteamswebhook.go
index cda30abda..7175f7fbc 100644
--- a/pkg/detectors/microsoftteamswebhook/microsoftteamswebhook.go
+++ b/pkg/detectors/microsoftteamswebhook/microsoftteamswebhook.go
@@ -65,10 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, resMatch)
}
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, false) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/mindmeister/mindmeister.go b/pkg/detectors/mindmeister/mindmeister.go
index 28c5b8453..f11ed882f 100644
--- a/pkg/detectors/mindmeister/mindmeister.go
+++ b/pkg/detectors/mindmeister/mindmeister.go
@@ -67,12 +67,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
- }
+ }
}
}
}
diff --git a/pkg/detectors/miro/miro.go b/pkg/detectors/miro/miro.go
index aad280cab..3e5bd2cfb 100644
--- a/pkg/detectors/miro/miro.go
+++ b/pkg/detectors/miro/miro.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/mite/mite.go b/pkg/detectors/mite/mite.go
index 2a027b257..067d9a470 100644
--- a/pkg/detectors/mite/mite.go
+++ b/pkg/detectors/mite/mite.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/mixmax/mixmax.go b/pkg/detectors/mixmax/mixmax.go
index d2c733989..9bc4d6228 100644
--- a/pkg/detectors/mixmax/mixmax.go
+++ b/pkg/detectors/mixmax/mixmax.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/mixpanel/mixpanel.go b/pkg/detectors/mixpanel/mixpanel.go
index a28c4c626..6e9110a3c 100644
--- a/pkg/detectors/mixpanel/mixpanel.go
+++ b/pkg/detectors/mixpanel/mixpanel.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(tokenPatMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/mockaroo/mockaroo.go b/pkg/detectors/mockaroo/mockaroo.go
index 7c18ace57..0fe00c1b1 100644
--- a/pkg/detectors/mockaroo/mockaroo.go
+++ b/pkg/detectors/mockaroo/mockaroo.go
@@ -62,12 +62,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if err == nil && len(t.Types) > 0 {
s1.Verified = true
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
- }
+ }
}
}
diff --git a/pkg/detectors/moderation/moderation.go b/pkg/detectors/moderation/moderation.go
index 1a54841f8..49c230756 100644
--- a/pkg/detectors/moderation/moderation.go
+++ b/pkg/detectors/moderation/moderation.go
@@ -64,11 +64,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/monday/monday.go b/pkg/detectors/monday/monday.go
index fe57e2c0f..e319fa763 100644
--- a/pkg/detectors/monday/monday.go
+++ b/pkg/detectors/monday/monday.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/monkeylearn/monkeylearn.go b/pkg/detectors/monkeylearn/monkeylearn.go
index 4a1c52f73..773fc7f48 100644
--- a/pkg/detectors/monkeylearn/monkeylearn.go
+++ b/pkg/detectors/monkeylearn/monkeylearn.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/moonclerk/moonclerk.go b/pkg/detectors/moonclerk/moonclerk.go
index e04384d66..083f3bc2f 100644
--- a/pkg/detectors/moonclerk/moonclerk.go
+++ b/pkg/detectors/moonclerk/moonclerk.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/moosend/moosend.go b/pkg/detectors/moosend/moosend.go
index 8ac552832..cbbb70794 100644
--- a/pkg/detectors/moosend/moosend.go
+++ b/pkg/detectors/moosend/moosend.go
@@ -62,12 +62,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
body := string(bodyBytes)
if strings.Contains(body, "CreatedOn") {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
-
}
}
diff --git a/pkg/detectors/moralis/moralis.go b/pkg/detectors/moralis/moralis.go
index 5c6c2d176..59a647ff7 100644
--- a/pkg/detectors/moralis/moralis.go
+++ b/pkg/detectors/moralis/moralis.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/mrticktock/mrticktock.go b/pkg/detectors/mrticktock/mrticktock.go
index 75edeb164..c2fb5737f 100644
--- a/pkg/detectors/mrticktock/mrticktock.go
+++ b/pkg/detectors/mrticktock/mrticktock.go
@@ -73,11 +73,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
body := string(bodyBytes)
if res.StatusCode >= 200 && res.StatusCode < 300 && strings.Contains(body, `"errors":[]`) {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/mux/mux.go b/pkg/detectors/mux/mux.go
index 98c5159fa..ef2679da0 100644
--- a/pkg/detectors/mux/mux.go
+++ b/pkg/detectors/mux/mux.go
@@ -67,11 +67,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/myfreshworks/myfreshworks.go b/pkg/detectors/myfreshworks/myfreshworks.go
index db93da3aa..c29801306 100644
--- a/pkg/detectors/myfreshworks/myfreshworks.go
+++ b/pkg/detectors/myfreshworks/myfreshworks.go
@@ -64,10 +64,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, resMatch)
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
results = append(results, s1)
}
diff --git a/pkg/detectors/myintervals/myintervals.go b/pkg/detectors/myintervals/myintervals.go
index 00c6dec4c..2bac40d34 100644
--- a/pkg/detectors/myintervals/myintervals.go
+++ b/pkg/detectors/myintervals/myintervals.go
@@ -62,11 +62,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/nasdaqdatalink/nasdaqdatalink.go b/pkg/detectors/nasdaqdatalink/nasdaqdatalink.go
index db1fdc828..877373e90 100644
--- a/pkg/detectors/nasdaqdatalink/nasdaqdatalink.go
+++ b/pkg/detectors/nasdaqdatalink/nasdaqdatalink.go
@@ -60,11 +60,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/nethunt/nethunt.go b/pkg/detectors/nethunt/nethunt.go
index ff23d922e..5e5ebdc04 100644
--- a/pkg/detectors/nethunt/nethunt.go
+++ b/pkg/detectors/nethunt/nethunt.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(tokenPatMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/netlify/netlify.go b/pkg/detectors/netlify/netlify.go
index b6ad55f4a..fdfde21ab 100644
--- a/pkg/detectors/netlify/netlify.go
+++ b/pkg/detectors/netlify/netlify.go
@@ -60,10 +60,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/neutrinoapi/neutrinoapi.go b/pkg/detectors/neutrinoapi/neutrinoapi.go
index 1ddf6f001..d5bc2da97 100644
--- a/pkg/detectors/neutrinoapi/neutrinoapi.go
+++ b/pkg/detectors/neutrinoapi/neutrinoapi.go
@@ -81,11 +81,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/newrelicpersonalapikey/newrelicpersonalapikey.go b/pkg/detectors/newrelicpersonalapikey/newrelicpersonalapikey.go
index a024d2d95..c5e702545 100644
--- a/pkg/detectors/newrelicpersonalapikey/newrelicpersonalapikey.go
+++ b/pkg/detectors/newrelicpersonalapikey/newrelicpersonalapikey.go
@@ -62,21 +62,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, false) {
- continue
- }
}
} else if errEU == nil {
defer resEU.Body.Close()
if resEU.StatusCode >= 200 && resEU.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, false) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/newsapi/newsapi.go b/pkg/detectors/newsapi/newsapi.go
index e344e34a1..1864376b7 100644
--- a/pkg/detectors/newsapi/newsapi.go
+++ b/pkg/detectors/newsapi/newsapi.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/newscatcher/newscatcher.go b/pkg/detectors/newscatcher/newscatcher.go
index 8d0f49b6d..ccddc5b9c 100644
--- a/pkg/detectors/newscatcher/newscatcher.go
+++ b/pkg/detectors/newscatcher/newscatcher.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/nexmoapikey/nexmoapikey.go b/pkg/detectors/nexmoapikey/nexmoapikey.go
index 3012be318..19bdc4c9f 100644
--- a/pkg/detectors/nexmoapikey/nexmoapikey.go
+++ b/pkg/detectors/nexmoapikey/nexmoapikey.go
@@ -64,11 +64,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/nftport/nftport.go b/pkg/detectors/nftport/nftport.go
index 3241d11a2..820392cd4 100644
--- a/pkg/detectors/nftport/nftport.go
+++ b/pkg/detectors/nftport/nftport.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/ngc/ngc.go b/pkg/detectors/ngc/ngc.go
index ffd4bd3ec..8f707cb5d 100644
--- a/pkg/detectors/ngc/ngc.go
+++ b/pkg/detectors/ngc/ngc.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/ngrok/ngrok.go b/pkg/detectors/ngrok/ngrok.go
index 52523ce6a..752882daa 100644
--- a/pkg/detectors/ngrok/ngrok.go
+++ b/pkg/detectors/ngrok/ngrok.go
@@ -71,11 +71,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/nicereply/nicereply.go b/pkg/detectors/nicereply/nicereply.go
index aa8de838e..12bb87cb7 100644
--- a/pkg/detectors/nicereply/nicereply.go
+++ b/pkg/detectors/nicereply/nicereply.go
@@ -61,11 +61,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/nightfall/nightfall.go b/pkg/detectors/nightfall/nightfall.go
index 105eed1fd..3fc22196e 100644
--- a/pkg/detectors/nightfall/nightfall.go
+++ b/pkg/detectors/nightfall/nightfall.go
@@ -61,11 +61,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/nimble/nimble.go b/pkg/detectors/nimble/nimble.go
index 6f3fc1a0b..dab1a194a 100644
--- a/pkg/detectors/nimble/nimble.go
+++ b/pkg/detectors/nimble/nimble.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/noticeable/noticeable.go b/pkg/detectors/noticeable/noticeable.go
index 13331ab12..52aa4ab6b 100644
--- a/pkg/detectors/noticeable/noticeable.go
+++ b/pkg/detectors/noticeable/noticeable.go
@@ -60,11 +60,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/notion/notion.go b/pkg/detectors/notion/notion.go
index 2d599f50f..dea8a9ea2 100644
--- a/pkg/detectors/notion/notion.go
+++ b/pkg/detectors/notion/notion.go
@@ -3,10 +3,11 @@ package notion
import (
"context"
"fmt"
- regexp "github.com/wasilibs/go-re2"
"net/http"
"strings"
+ regexp "github.com/wasilibs/go-re2"
+
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
@@ -63,14 +64,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
// /v1/search, /v1/databases/*, etc. may work.
s1.Verified = true
- } else if res.StatusCode == 401 {
- // The secret is determinately not verified (nothing to do)
- // Nothing returns 401 on all requests not containing a api key.
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
} else {
s1.SetVerificationError(err, resMatch)
diff --git a/pkg/detectors/nozbeteams/nozbeteams.go b/pkg/detectors/nozbeteams/nozbeteams.go
index d2e230ba9..3282cdc9c 100644
--- a/pkg/detectors/nozbeteams/nozbeteams.go
+++ b/pkg/detectors/nozbeteams/nozbeteams.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/npmtoken/npmtoken.go b/pkg/detectors/npmtoken/npmtoken.go
index 06b5fb709..73a0f9800 100644
--- a/pkg/detectors/npmtoken/npmtoken.go
+++ b/pkg/detectors/npmtoken/npmtoken.go
@@ -62,11 +62,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/npmtokenv2/npmtokenv2.go b/pkg/detectors/npmtokenv2/npmtokenv2.go
index e7eda9b96..15d54ba66 100644
--- a/pkg/detectors/npmtokenv2/npmtokenv2.go
+++ b/pkg/detectors/npmtokenv2/npmtokenv2.go
@@ -63,11 +63,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/nugetapikey/nugetapikey.go b/pkg/detectors/nugetapikey/nugetapikey.go
index f7d071063..4a7c6af99 100644
--- a/pkg/detectors/nugetapikey/nugetapikey.go
+++ b/pkg/detectors/nugetapikey/nugetapikey.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
// we can either match on response code "400" or "Bad Request" response
if res.StatusCode == 400 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/numverify/numverify.go b/pkg/detectors/numverify/numverify.go
index cb13b7093..420668491 100644
--- a/pkg/detectors/numverify/numverify.go
+++ b/pkg/detectors/numverify/numverify.go
@@ -61,11 +61,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/nutritionix/nutritionix.go b/pkg/detectors/nutritionix/nutritionix.go
index 9e038353d..8594761f1 100644
--- a/pkg/detectors/nutritionix/nutritionix.go
+++ b/pkg/detectors/nutritionix/nutritionix.go
@@ -69,11 +69,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/nylas/nylas.go b/pkg/detectors/nylas/nylas.go
index 323eef573..c05e53460 100644
--- a/pkg/detectors/nylas/nylas.go
+++ b/pkg/detectors/nylas/nylas.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/oanda/oanda.go b/pkg/detectors/oanda/oanda.go
index c2f47a582..de31ae0c0 100644
--- a/pkg/detectors/oanda/oanda.go
+++ b/pkg/detectors/oanda/oanda.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/okta/okta.go b/pkg/detectors/okta/okta.go
index 165f603e8..a3a3d9785 100644
--- a/pkg/detectors/okta/okta.go
+++ b/pkg/detectors/okta/okta.go
@@ -75,12 +75,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s.Verified {
- if detectors.IsKnownFalsePositive(string(s.Raw), detectors.DefaultFalsePositives, true) {
- continue
- }
- }
-
results = append(results, s)
}
}
diff --git a/pkg/detectors/omnisend/omnisend.go b/pkg/detectors/omnisend/omnisend.go
index 8654d5523..c058f07b7 100644
--- a/pkg/detectors/omnisend/omnisend.go
+++ b/pkg/detectors/omnisend/omnisend.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/onedesk/onedesk.go b/pkg/detectors/onedesk/onedesk.go
index 4c71b6132..621e78f69 100644
--- a/pkg/detectors/onedesk/onedesk.go
+++ b/pkg/detectors/onedesk/onedesk.go
@@ -72,11 +72,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
body := string(bodyBytes)
if res.StatusCode >= 200 && res.StatusCode < 300 && strings.Contains(body, `"code":"SUCCESS"`) {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/onelogin/onelogin.go b/pkg/detectors/onelogin/onelogin.go
index f280a0481..d77a674a2 100644
--- a/pkg/detectors/onelogin/onelogin.go
+++ b/pkg/detectors/onelogin/onelogin.go
@@ -74,10 +74,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s.Verified && detectors.IsKnownFalsePositive(string(s.Raw), detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s)
}
}
diff --git a/pkg/detectors/onepagecrm/onepagecrm.go b/pkg/detectors/onepagecrm/onepagecrm.go
index ee3df783e..d6e43e8c5 100644
--- a/pkg/detectors/onepagecrm/onepagecrm.go
+++ b/pkg/detectors/onepagecrm/onepagecrm.go
@@ -65,11 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(tokenPatMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/onesignal/onesignal.go b/pkg/detectors/onesignal/onesignal.go
index 259558167..1829a2188 100644
--- a/pkg/detectors/onesignal/onesignal.go
+++ b/pkg/detectors/onesignal/onesignal.go
@@ -62,11 +62,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/onwaterio/onwaterio.go b/pkg/detectors/onwaterio/onwaterio.go
index 2c12fa389..725451a45 100644
--- a/pkg/detectors/onwaterio/onwaterio.go
+++ b/pkg/detectors/onwaterio/onwaterio.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/oopspam/oopspam.go b/pkg/detectors/oopspam/oopspam.go
index b3bebe57e..0199c2b46 100644
--- a/pkg/detectors/oopspam/oopspam.go
+++ b/pkg/detectors/oopspam/oopspam.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/openai/openai.go b/pkg/detectors/openai/openai.go
index 7b28b05b6..5e4442786 100644
--- a/pkg/detectors/openai/openai.go
+++ b/pkg/detectors/openai/openai.go
@@ -97,10 +97,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s1.Verified && detectors.IsKnownFalsePositive(string(s1.Raw), detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/opencagedata/opencagedata.go b/pkg/detectors/opencagedata/opencagedata.go
index 110886d93..9b21e81e8 100644
--- a/pkg/detectors/opencagedata/opencagedata.go
+++ b/pkg/detectors/opencagedata/opencagedata.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/openuv/openuv.go b/pkg/detectors/openuv/openuv.go
index 1d0a0b512..1a9f4bb8f 100644
--- a/pkg/detectors/openuv/openuv.go
+++ b/pkg/detectors/openuv/openuv.go
@@ -57,12 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
- }
+ }
}
}
diff --git a/pkg/detectors/openvpn/openvpn.go b/pkg/detectors/openvpn/openvpn.go
index 1bec5b2ff..ae229809e 100644
--- a/pkg/detectors/openvpn/openvpn.go
+++ b/pkg/detectors/openvpn/openvpn.go
@@ -89,10 +89,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(err, clientSecretRes)
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(clientSecretRes, detectors.DefaultFalsePositives, true) {
- continue
- }
+
results = append(results, s1)
}
}
diff --git a/pkg/detectors/openweather/openweather.go b/pkg/detectors/openweather/openweather.go
index 34d82de4c..747a37319 100644
--- a/pkg/detectors/openweather/openweather.go
+++ b/pkg/detectors/openweather/openweather.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/opsgenie/opsgenie.go b/pkg/detectors/opsgenie/opsgenie.go
index 020856aa1..5f2938c13 100644
--- a/pkg/detectors/opsgenie/opsgenie.go
+++ b/pkg/detectors/opsgenie/opsgenie.go
@@ -2,12 +2,13 @@ package opsgenie
import (
"context"
+ "encoding/json"
"fmt"
- regexp "github.com/wasilibs/go-re2"
"net/http"
- "encoding/json"
"strings"
+ regexp "github.com/wasilibs/go-re2"
+
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
@@ -52,44 +53,44 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
Raw: []byte(resMatch),
}
- if verify {
- // Check for false positives
- if detectors.IsKnownFalsePositive(match[0], append(detectors.DefaultFalsePositives, "opsgenie.com/alert/detail/"), true) {
- continue
- }
- req, err := http.NewRequestWithContext(ctx, "GET", "https://api.opsgenie.com/v2/alerts", nil)
- if err != nil {
+ if strings.Contains(match[0], "opsgenie.com/alert/detail/") {
continue
- }
- req.Header.Add("Authorization", fmt.Sprintf("GenieKey %s", resMatch))
- res, err := client.Do(req)
- if err != nil {
- continue
- }
- defer res.Body.Close()
+ }
- // Check for 200 status code
- if res.StatusCode == 200 {
- var data map[string]interface{}
- err := json.NewDecoder(res.Body).Decode(&data)
+ if verify {
+
+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.opsgenie.com/v2/alerts", nil)
if err != nil {
- s1.Verified = false
- continue
+ continue
}
-
- // Check if "data" is one of the top-level attributes
- if _, ok := data["data"]; ok {
- s1.Verified = true
- } else {
- s1.Verified = false
+ req.Header.Add("Authorization", fmt.Sprintf("GenieKey %s", resMatch))
+ res, err := client.Do(req)
+ if err != nil {
+ continue
}
- } else {
- s1.Verified = false
+ defer res.Body.Close()
+
+ // Check for 200 status code
+ if res.StatusCode == 200 {
+ var data map[string]interface{}
+ err := json.NewDecoder(res.Body).Decode(&data)
+ if err != nil {
+ s1.Verified = false
+ continue
+ }
+
+ // Check if "data" is one of the top-level attributes
+ if _, ok := data["data"]; ok {
+ s1.Verified = true
+ } else {
+ s1.Verified = false
+ }
+ } else {
+ s1.Verified = false
- }
+ }
}
-
results = append(results, s1)
}
diff --git a/pkg/detectors/optimizely/optimizely.go b/pkg/detectors/optimizely/optimizely.go
index 7601db444..f3a90e2b3 100644
--- a/pkg/detectors/optimizely/optimizely.go
+++ b/pkg/detectors/optimizely/optimizely.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/overloop/overloop.go b/pkg/detectors/overloop/overloop.go
index fcb583dca..61310545c 100644
--- a/pkg/detectors/overloop/overloop.go
+++ b/pkg/detectors/overloop/overloop.go
@@ -74,11 +74,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/owlbot/owlbot.go b/pkg/detectors/owlbot/owlbot.go
index abba80bba..d8ca5fea1 100644
--- a/pkg/detectors/owlbot/owlbot.go
+++ b/pkg/detectors/owlbot/owlbot.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/packagecloud/packagecloud.go b/pkg/detectors/packagecloud/packagecloud.go
index a03e27ccf..f7ec0ffb0 100644
--- a/pkg/detectors/packagecloud/packagecloud.go
+++ b/pkg/detectors/packagecloud/packagecloud.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/pagerdutyapikey/pagerdutyapikey.go b/pkg/detectors/pagerdutyapikey/pagerdutyapikey.go
index 7b0c7b5ce..815641c7a 100644
--- a/pkg/detectors/pagerdutyapikey/pagerdutyapikey.go
+++ b/pkg/detectors/pagerdutyapikey/pagerdutyapikey.go
@@ -56,9 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, resMatch)
}
- if !s1.Verified && detectors.IsKnownFalsePositive(string(s1.Raw), detectors.DefaultFalsePositives, true) {
- continue
- }
results = append(results, s1)
}
diff --git a/pkg/detectors/pandadoc/pandadoc.go b/pkg/detectors/pandadoc/pandadoc.go
index ef8b1ff21..2c8a579c6 100644
--- a/pkg/detectors/pandadoc/pandadoc.go
+++ b/pkg/detectors/pandadoc/pandadoc.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/paperform/paperform.go b/pkg/detectors/paperform/paperform.go
index 558d14459..06e364a5c 100644
--- a/pkg/detectors/paperform/paperform.go
+++ b/pkg/detectors/paperform/paperform.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/paralleldots/paralleldots.go b/pkg/detectors/paralleldots/paralleldots.go
index c0e5cd17d..1af81ee28 100644
--- a/pkg/detectors/paralleldots/paralleldots.go
+++ b/pkg/detectors/paralleldots/paralleldots.go
@@ -84,11 +84,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
body := string(bodyBytes)
if (res.StatusCode >= 200 && res.StatusCode < 300) && strings.Contains(body, "intent") {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/parsehub/parsehub.go b/pkg/detectors/parsehub/parsehub.go
index 886497fd7..7da8861ae 100644
--- a/pkg/detectors/parsehub/parsehub.go
+++ b/pkg/detectors/parsehub/parsehub.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/parsers/parsers.go b/pkg/detectors/parsers/parsers.go
index 2885610e6..311428341 100644
--- a/pkg/detectors/parsers/parsers.go
+++ b/pkg/detectors/parsers/parsers.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/parseur/parseur.go b/pkg/detectors/parseur/parseur.go
index 206cc5617..f0e7dce37 100644
--- a/pkg/detectors/parseur/parseur.go
+++ b/pkg/detectors/parseur/parseur.go
@@ -57,13 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, resMatch)
}
- if !s1.Verified {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/partnerstack/partnerstack.go b/pkg/detectors/partnerstack/partnerstack.go
index 6d15c8850..a0a81cc0b 100644
--- a/pkg/detectors/partnerstack/partnerstack.go
+++ b/pkg/detectors/partnerstack/partnerstack.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/pastebin/pastebin.go b/pkg/detectors/pastebin/pastebin.go
index 70723d807..7e1abaace 100644
--- a/pkg/detectors/pastebin/pastebin.go
+++ b/pkg/detectors/pastebin/pastebin.go
@@ -87,11 +87,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/paydirtapp/paydirtapp.go b/pkg/detectors/paydirtapp/paydirtapp.go
index ade5e315a..d74acd9d2 100644
--- a/pkg/detectors/paydirtapp/paydirtapp.go
+++ b/pkg/detectors/paydirtapp/paydirtapp.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/paymoapp/paymoapp.go b/pkg/detectors/paymoapp/paymoapp.go
index b59397ae9..13a9f4b41 100644
--- a/pkg/detectors/paymoapp/paymoapp.go
+++ b/pkg/detectors/paymoapp/paymoapp.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/paymongo/paymongo.go b/pkg/detectors/paymongo/paymongo.go
index f3c54f806..4ff0ab7b8 100644
--- a/pkg/detectors/paymongo/paymongo.go
+++ b/pkg/detectors/paymongo/paymongo.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/paypaloauth/paypaloauth.go b/pkg/detectors/paypaloauth/paypaloauth.go
index 1a9c58bf5..c52de5d51 100644
--- a/pkg/detectors/paypaloauth/paypaloauth.go
+++ b/pkg/detectors/paypaloauth/paypaloauth.go
@@ -72,11 +72,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resIDMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/paystack/paystack.go b/pkg/detectors/paystack/paystack.go
index c470093a9..f7ee3c37d 100644
--- a/pkg/detectors/paystack/paystack.go
+++ b/pkg/detectors/paystack/paystack.go
@@ -57,10 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, false) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/pdflayer/pdflayer.go b/pkg/detectors/pdflayer/pdflayer.go
index 3caf35c36..e83d98957 100644
--- a/pkg/detectors/pdflayer/pdflayer.go
+++ b/pkg/detectors/pdflayer/pdflayer.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/pdfshift/pdfshift.go b/pkg/detectors/pdfshift/pdfshift.go
index 218c5d764..9b480bcad 100644
--- a/pkg/detectors/pdfshift/pdfshift.go
+++ b/pkg/detectors/pdfshift/pdfshift.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/peopledatalabs/peopledatalabs.go b/pkg/detectors/peopledatalabs/peopledatalabs.go
index 6b8bf1a6f..bb406e373 100644
--- a/pkg/detectors/peopledatalabs/peopledatalabs.go
+++ b/pkg/detectors/peopledatalabs/peopledatalabs.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/pepipost/pepipost.go b/pkg/detectors/pepipost/pepipost.go
index 3ecc2caa0..7a62e6804 100644
--- a/pkg/detectors/pepipost/pepipost.go
+++ b/pkg/detectors/pepipost/pepipost.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/percy/percy.go b/pkg/detectors/percy/percy.go
index 5c5c26a5d..ca6e64ae7 100644
--- a/pkg/detectors/percy/percy.go
+++ b/pkg/detectors/percy/percy.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/pinata/pinata.go b/pkg/detectors/pinata/pinata.go
index f67c4924c..5103a2348 100644
--- a/pkg/detectors/pinata/pinata.go
+++ b/pkg/detectors/pinata/pinata.go
@@ -71,11 +71,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/pipedream/pipedream.go b/pkg/detectors/pipedream/pipedream.go
index f299366d0..e6d692b4b 100644
--- a/pkg/detectors/pipedream/pipedream.go
+++ b/pkg/detectors/pipedream/pipedream.go
@@ -61,11 +61,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/pipedrive/pipedrive.go b/pkg/detectors/pipedrive/pipedrive.go
index d78f66f4f..09ef200ba 100644
--- a/pkg/detectors/pipedrive/pipedrive.go
+++ b/pkg/detectors/pipedrive/pipedrive.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/pivotaltracker/pivotaltracker.go b/pkg/detectors/pivotaltracker/pivotaltracker.go
index efe177d66..d0e37ce4f 100644
--- a/pkg/detectors/pivotaltracker/pivotaltracker.go
+++ b/pkg/detectors/pivotaltracker/pivotaltracker.go
@@ -65,10 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s.Verified && detectors.IsKnownFalsePositive(string(s.Raw), detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s)
}
diff --git a/pkg/detectors/pixabay/pixabay.go b/pkg/detectors/pixabay/pixabay.go
index df7c38a59..df09f2f05 100644
--- a/pkg/detectors/pixabay/pixabay.go
+++ b/pkg/detectors/pixabay/pixabay.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/plaidkey/plaidkey.go b/pkg/detectors/plaidkey/plaidkey.go
index 1158145fc..365ac7daf 100644
--- a/pkg/detectors/plaidkey/plaidkey.go
+++ b/pkg/detectors/plaidkey/plaidkey.go
@@ -69,11 +69,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
s1.ExtraData = map[string]string{"environment": fmt.Sprintf("https://%s.plaid.com", env)}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/planviewleankit/planviewleankit.go b/pkg/detectors/planviewleankit/planviewleankit.go
index 82b52b871..079e38b12 100644
--- a/pkg/detectors/planviewleankit/planviewleankit.go
+++ b/pkg/detectors/planviewleankit/planviewleankit.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/planyo/planyo.go b/pkg/detectors/planyo/planyo.go
index 447a0c132..e5a33be83 100644
--- a/pkg/detectors/planyo/planyo.go
+++ b/pkg/detectors/planyo/planyo.go
@@ -65,11 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
validResponse := strings.Contains(body, "data") || strings.Contains(body, "Your Planyo site has expired")
if res.StatusCode >= 200 && res.StatusCode < 300 && validResponse {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/plivo/plivo.go b/pkg/detectors/plivo/plivo.go
index 827a5129e..28fd635ab 100644
--- a/pkg/detectors/plivo/plivo.go
+++ b/pkg/detectors/plivo/plivo.go
@@ -68,10 +68,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/podio/podio.go b/pkg/detectors/podio/podio.go
index 5dfd16b99..3978c4266 100644
--- a/pkg/detectors/podio/podio.go
+++ b/pkg/detectors/podio/podio.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/pollsapi/pollsapi.go b/pkg/detectors/pollsapi/pollsapi.go
index 3152f3332..6d305def6 100644
--- a/pkg/detectors/pollsapi/pollsapi.go
+++ b/pkg/detectors/pollsapi/pollsapi.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/poloniex/poloniex.go b/pkg/detectors/poloniex/poloniex.go
index f79d706e3..8c7a0c359 100644
--- a/pkg/detectors/poloniex/poloniex.go
+++ b/pkg/detectors/poloniex/poloniex.go
@@ -83,15 +83,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
- if detectors.IsKnownFalsePositive(resSecretMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/polygon/polygon.go b/pkg/detectors/polygon/polygon.go
index 670a9440c..d3da6a4ce 100644
--- a/pkg/detectors/polygon/polygon.go
+++ b/pkg/detectors/polygon/polygon.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/portainer/portainer.go b/pkg/detectors/portainer/portainer.go
index 6cf41f46a..fa93bc65e 100644
--- a/pkg/detectors/portainer/portainer.go
+++ b/pkg/detectors/portainer/portainer.go
@@ -80,9 +80,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
+
if len(endpointMatches) > 0 {
results = append(results, s1)
diff --git a/pkg/detectors/portainertoken/portainertoken.go b/pkg/detectors/portainertoken/portainertoken.go
index 74edd57e9..f3925a6ed 100644
--- a/pkg/detectors/portainertoken/portainertoken.go
+++ b/pkg/detectors/portainertoken/portainertoken.go
@@ -83,10 +83,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
if len(endpointMatches) > 0 {
results = append(results, s1)
}
diff --git a/pkg/detectors/positionstack/positionstack.go b/pkg/detectors/positionstack/positionstack.go
index 4e7c79425..7001be451 100644
--- a/pkg/detectors/positionstack/positionstack.go
+++ b/pkg/detectors/positionstack/positionstack.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/postageapp/postageapp.go b/pkg/detectors/postageapp/postageapp.go
index af37f42d0..3f119e824 100644
--- a/pkg/detectors/postageapp/postageapp.go
+++ b/pkg/detectors/postageapp/postageapp.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/postbacks/postbacks.go b/pkg/detectors/postbacks/postbacks.go
index dff601eb4..8c4c00f22 100644
--- a/pkg/detectors/postbacks/postbacks.go
+++ b/pkg/detectors/postbacks/postbacks.go
@@ -62,11 +62,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/postgres/postgres.go b/pkg/detectors/postgres/postgres.go
index a5b2cae3e..09ec98d92 100644
--- a/pkg/detectors/postgres/postgres.go
+++ b/pkg/detectors/postgres/postgres.go
@@ -138,9 +138,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) ([]dete
pg_sslmode: sslmode,
}
- if !result.Verified && detectors.IsKnownFalsePositive(password, detectors.DefaultFalsePositives, true) {
- continue
- }
results = append(results, result)
}
diff --git a/pkg/detectors/posthog/posthog.go b/pkg/detectors/posthog/posthog.go
index 0ca7970d0..ca47572c4 100644
--- a/pkg/detectors/posthog/posthog.go
+++ b/pkg/detectors/posthog/posthog.go
@@ -68,17 +68,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/postman/postman.go b/pkg/detectors/postman/postman.go
index 068458259..bc25323f4 100644
--- a/pkg/detectors/postman/postman.go
+++ b/pkg/detectors/postman/postman.go
@@ -58,9 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, resMatch)
}
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
results = append(results, s1)
}
diff --git a/pkg/detectors/postmark/postmark.go b/pkg/detectors/postmark/postmark.go
index 82a0c0c5e..1ffe18df0 100644
--- a/pkg/detectors/postmark/postmark.go
+++ b/pkg/detectors/postmark/postmark.go
@@ -58,10 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/powrbot/powrbot.go b/pkg/detectors/powrbot/powrbot.go
index fcc713cab..16b7790fd 100644
--- a/pkg/detectors/powrbot/powrbot.go
+++ b/pkg/detectors/powrbot/powrbot.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/prefect/prefect.go b/pkg/detectors/prefect/prefect.go
index 6e8f099b6..c9d6dc0a2 100644
--- a/pkg/detectors/prefect/prefect.go
+++ b/pkg/detectors/prefect/prefect.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/privacy/privacy.go b/pkg/detectors/privacy/privacy.go
index 0818e9544..f85a3ad62 100644
--- a/pkg/detectors/privacy/privacy.go
+++ b/pkg/detectors/privacy/privacy.go
@@ -74,11 +74,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/prodpad/prodpad.go b/pkg/detectors/prodpad/prodpad.go
index 72768713b..384ff3e21 100644
--- a/pkg/detectors/prodpad/prodpad.go
+++ b/pkg/detectors/prodpad/prodpad.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/prospectcrm/prospectcrm.go b/pkg/detectors/prospectcrm/prospectcrm.go
index fd86a61f3..fcfeb4629 100644
--- a/pkg/detectors/prospectcrm/prospectcrm.go
+++ b/pkg/detectors/prospectcrm/prospectcrm.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/protocolsio/protocolsio.go b/pkg/detectors/protocolsio/protocolsio.go
index 590770e96..4ffa176e8 100644
--- a/pkg/detectors/protocolsio/protocolsio.go
+++ b/pkg/detectors/protocolsio/protocolsio.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/proxycrawl/proxycrawl.go b/pkg/detectors/proxycrawl/proxycrawl.go
index 30ab7d8ac..86b56ebb2 100644
--- a/pkg/detectors/proxycrawl/proxycrawl.go
+++ b/pkg/detectors/proxycrawl/proxycrawl.go
@@ -60,11 +60,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/pubnubpublishkey/pubnubpublishkey.go b/pkg/detectors/pubnubpublishkey/pubnubpublishkey.go
index a672dc132..656637799 100644
--- a/pkg/detectors/pubnubpublishkey/pubnubpublishkey.go
+++ b/pkg/detectors/pubnubpublishkey/pubnubpublishkey.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, resMatch)
}
- // This function will check false positives for common test words, but also it will make sure the key
- // appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
results = append(results, s1)
}
}
diff --git a/pkg/detectors/pubnubsubscriptionkey/pubnubsubscriptionkey.go b/pkg/detectors/pubnubsubscriptionkey/pubnubsubscriptionkey.go
index 72f80ff73..f5017000f 100644
--- a/pkg/detectors/pubnubsubscriptionkey/pubnubsubscriptionkey.go
+++ b/pkg/detectors/pubnubsubscriptionkey/pubnubsubscriptionkey.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/pulumi/pulumi.go b/pkg/detectors/pulumi/pulumi.go
index ebaa574fc..27ce74f78 100644
--- a/pkg/detectors/pulumi/pulumi.go
+++ b/pkg/detectors/pulumi/pulumi.go
@@ -60,11 +60,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/purestake/purestake.go b/pkg/detectors/purestake/purestake.go
index 5e35637a1..831fa5b18 100644
--- a/pkg/detectors/purestake/purestake.go
+++ b/pkg/detectors/purestake/purestake.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/pushbulletapikey/pushbulletapikey.go b/pkg/detectors/pushbulletapikey/pushbulletapikey.go
index 6aec6262f..715c6c49f 100644
--- a/pkg/detectors/pushbulletapikey/pushbulletapikey.go
+++ b/pkg/detectors/pushbulletapikey/pushbulletapikey.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/pusherchannelkey/pusherchannelkey.go b/pkg/detectors/pusherchannelkey/pusherchannelkey.go
index b97506c99..1e56891da 100644
--- a/pkg/detectors/pusherchannelkey/pusherchannelkey.go
+++ b/pkg/detectors/pusherchannelkey/pusherchannelkey.go
@@ -111,11 +111,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(ressecretMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/qase/qase.go b/pkg/detectors/qase/qase.go
index 64d17dfbb..d4eaf50df 100644
--- a/pkg/detectors/qase/qase.go
+++ b/pkg/detectors/qase/qase.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/qualaroo/qualaroo.go b/pkg/detectors/qualaroo/qualaroo.go
index c92d6bb40..2a5341d34 100644
--- a/pkg/detectors/qualaroo/qualaroo.go
+++ b/pkg/detectors/qualaroo/qualaroo.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/qubole/qubole.go b/pkg/detectors/qubole/qubole.go
index 6725cd6de..39932a72a 100644
--- a/pkg/detectors/qubole/qubole.go
+++ b/pkg/detectors/qubole/qubole.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/rabbitmq/rabbitmq.go b/pkg/detectors/rabbitmq/rabbitmq.go
index 6526252fc..9528ec15a 100644
--- a/pkg/detectors/rabbitmq/rabbitmq.go
+++ b/pkg/detectors/rabbitmq/rabbitmq.go
@@ -76,10 +76,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s.Verified && detectors.IsKnownFalsePositive(string(s.Raw), detectors.DefaultFalsePositives, false) {
- continue
- }
-
results = append(results, s)
}
diff --git a/pkg/detectors/ramp/ramp.go b/pkg/detectors/ramp/ramp.go
index 2437abb23..fb03a0ac2 100644
--- a/pkg/detectors/ramp/ramp.go
+++ b/pkg/detectors/ramp/ramp.go
@@ -93,11 +93,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
}
diff --git a/pkg/detectors/rapidapi/rapidapi.go b/pkg/detectors/rapidapi/rapidapi.go
index 19a0e8f96..38ee1791d 100644
--- a/pkg/detectors/rapidapi/rapidapi.go
+++ b/pkg/detectors/rapidapi/rapidapi.go
@@ -56,10 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/raven/raven.go b/pkg/detectors/raven/raven.go
index 3b6fadebf..92bce8be0 100644
--- a/pkg/detectors/raven/raven.go
+++ b/pkg/detectors/raven/raven.go
@@ -67,11 +67,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/rawg/rawg.go b/pkg/detectors/rawg/rawg.go
index 5311b4c5c..464e0eca0 100644
--- a/pkg/detectors/rawg/rawg.go
+++ b/pkg/detectors/rawg/rawg.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/razorpay/razorpay.go b/pkg/detectors/razorpay/razorpay.go
index 441609f41..4a7819aba 100644
--- a/pkg/detectors/razorpay/razorpay.go
+++ b/pkg/detectors/razorpay/razorpay.go
@@ -70,10 +70,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s1.Verified && detectors.IsKnownFalsePositive(key, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/reachmail/reachmail.go b/pkg/detectors/reachmail/reachmail.go
index ebf2c3c07..7756c5099 100644
--- a/pkg/detectors/reachmail/reachmail.go
+++ b/pkg/detectors/reachmail/reachmail.go
@@ -60,11 +60,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/readme/readme.go b/pkg/detectors/readme/readme.go
index 4d40c89fd..ecb4826f5 100644
--- a/pkg/detectors/readme/readme.go
+++ b/pkg/detectors/readme/readme.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/reallysimplesystems/reallysimplesystems.go b/pkg/detectors/reallysimplesystems/reallysimplesystems.go
index ab66106ce..a8eb0cbe7 100644
--- a/pkg/detectors/reallysimplesystems/reallysimplesystems.go
+++ b/pkg/detectors/reallysimplesystems/reallysimplesystems.go
@@ -68,11 +68,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/rebrandly/rebrandly.go b/pkg/detectors/rebrandly/rebrandly.go
index 61a4232e4..16057153b 100644
--- a/pkg/detectors/rebrandly/rebrandly.go
+++ b/pkg/detectors/rebrandly/rebrandly.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/rechargepayments/rechargepayments.go b/pkg/detectors/rechargepayments/rechargepayments.go
index c55351096..53f2a3f21 100644
--- a/pkg/detectors/rechargepayments/rechargepayments.go
+++ b/pkg/detectors/rechargepayments/rechargepayments.go
@@ -62,10 +62,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s.Verified && detectors.IsKnownFalsePositive(string(s.Raw), detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s)
}
}
diff --git a/pkg/detectors/redis/redis.go b/pkg/detectors/redis/redis.go
index 810da6849..044305d27 100644
--- a/pkg/detectors/redis/redis.go
+++ b/pkg/detectors/redis/redis.go
@@ -73,10 +73,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s.Verified && detectors.IsKnownFalsePositive(string(s.Raw), detectors.DefaultFalsePositives, false) {
- continue
- }
-
results = append(results, s)
}
@@ -116,10 +112,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s.Verified && detectors.IsKnownFalsePositive(string(s.Raw), detectors.DefaultFalsePositives, false) {
- continue
- }
-
results = append(results, s)
}
diff --git a/pkg/detectors/refiner/refiner.go b/pkg/detectors/refiner/refiner.go
index 6736f689a..924fc000b 100644
--- a/pkg/detectors/refiner/refiner.go
+++ b/pkg/detectors/refiner/refiner.go
@@ -60,11 +60,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/rentman/rentman.go b/pkg/detectors/rentman/rentman.go
index adabbc285..d7f23577f 100644
--- a/pkg/detectors/rentman/rentman.go
+++ b/pkg/detectors/rentman/rentman.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/repairshopr/repairshopr.go b/pkg/detectors/repairshopr/repairshopr.go
index 34e3516ac..37f9182be 100644
--- a/pkg/detectors/repairshopr/repairshopr.go
+++ b/pkg/detectors/repairshopr/repairshopr.go
@@ -67,11 +67,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/replicate/replicate.go b/pkg/detectors/replicate/replicate.go
index 893b56867..229083ef5 100644
--- a/pkg/detectors/replicate/replicate.go
+++ b/pkg/detectors/replicate/replicate.go
@@ -70,11 +70,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/replyio/replyio.go b/pkg/detectors/replyio/replyio.go
index 9583529fe..4d1164a1b 100644
--- a/pkg/detectors/replyio/replyio.go
+++ b/pkg/detectors/replyio/replyio.go
@@ -71,11 +71,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/requestfinance/requestfinance.go b/pkg/detectors/requestfinance/requestfinance.go
index 462112c29..815362520 100644
--- a/pkg/detectors/requestfinance/requestfinance.go
+++ b/pkg/detectors/requestfinance/requestfinance.go
@@ -73,11 +73,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/restpack/restpack.go b/pkg/detectors/restpack/restpack.go
index e53bb862c..2f2e43804 100644
--- a/pkg/detectors/restpack/restpack.go
+++ b/pkg/detectors/restpack/restpack.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/restpackhtmltopdfapi/restpackhtmltopdfapi.go b/pkg/detectors/restpackhtmltopdfapi/restpackhtmltopdfapi.go
index 00683d584..2935df586 100644
--- a/pkg/detectors/restpackhtmltopdfapi/restpackhtmltopdfapi.go
+++ b/pkg/detectors/restpackhtmltopdfapi/restpackhtmltopdfapi.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/restpackscreenshotapi/restpackscreenshotapi.go b/pkg/detectors/restpackscreenshotapi/restpackscreenshotapi.go
index 63d0eaa55..2e62c04cf 100644
--- a/pkg/detectors/restpackscreenshotapi/restpackscreenshotapi.go
+++ b/pkg/detectors/restpackscreenshotapi/restpackscreenshotapi.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/rev/rev.go b/pkg/detectors/rev/rev.go
index 708c4ebc2..8ca7a4979 100644
--- a/pkg/detectors/rev/rev.go
+++ b/pkg/detectors/rev/rev.go
@@ -66,15 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resUserMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
- if detectors.IsKnownFalsePositive(resClientMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/revampcrm/revampcrm.go b/pkg/detectors/revampcrm/revampcrm.go
index fc5ee627d..2c9d2ca84 100644
--- a/pkg/detectors/revampcrm/revampcrm.go
+++ b/pkg/detectors/revampcrm/revampcrm.go
@@ -65,11 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(tokenPatMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/ringcentral/ringcentral.go b/pkg/detectors/ringcentral/ringcentral.go
index 97522725b..f20268656 100644
--- a/pkg/detectors/ringcentral/ringcentral.go
+++ b/pkg/detectors/ringcentral/ringcentral.go
@@ -65,11 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/ritekit/ritekit.go b/pkg/detectors/ritekit/ritekit.go
index 0bd17af69..5fdd7d241 100644
--- a/pkg/detectors/ritekit/ritekit.go
+++ b/pkg/detectors/ritekit/ritekit.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/roaring/roaring.go b/pkg/detectors/roaring/roaring.go
index ca25056f3..356d0914a 100644
--- a/pkg/detectors/roaring/roaring.go
+++ b/pkg/detectors/roaring/roaring.go
@@ -71,11 +71,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resSecret, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/rocketreach/rocketreach.go b/pkg/detectors/rocketreach/rocketreach.go
index 19cff56c5..f706e791b 100644
--- a/pkg/detectors/rocketreach/rocketreach.go
+++ b/pkg/detectors/rocketreach/rocketreach.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/rockset/rockset.go b/pkg/detectors/rockset/rockset.go
index 459b19a0c..de3baa507 100644
--- a/pkg/detectors/rockset/rockset.go
+++ b/pkg/detectors/rockset/rockset.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/roninapp/roninapp.go b/pkg/detectors/roninapp/roninapp.go
index 44c30e05b..020af6450 100644
--- a/pkg/detectors/roninapp/roninapp.go
+++ b/pkg/detectors/roninapp/roninapp.go
@@ -70,11 +70,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/route4me/route4me.go b/pkg/detectors/route4me/route4me.go
index 3668f7d48..dbebd5130 100644
--- a/pkg/detectors/route4me/route4me.go
+++ b/pkg/detectors/route4me/route4me.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/rownd/rownd.go b/pkg/detectors/rownd/rownd.go
index ec71e141d..67aab70b2 100644
--- a/pkg/detectors/rownd/rownd.go
+++ b/pkg/detectors/rownd/rownd.go
@@ -77,11 +77,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(keyMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/rubygems/rubygems.go b/pkg/detectors/rubygems/rubygems.go
index 56f8702a0..c90da120c 100644
--- a/pkg/detectors/rubygems/rubygems.go
+++ b/pkg/detectors/rubygems/rubygems.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 || res.StatusCode == http.StatusForbidden {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/runrunit/runrunit.go b/pkg/detectors/runrunit/runrunit.go
index 5587d2fd7..4df932dbd 100644
--- a/pkg/detectors/runrunit/runrunit.go
+++ b/pkg/detectors/runrunit/runrunit.go
@@ -66,15 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
- if detectors.IsKnownFalsePositive(resUserTokenMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/salesblink/salesblink.go b/pkg/detectors/salesblink/salesblink.go
index 86786c7f9..0a8a07633 100644
--- a/pkg/detectors/salesblink/salesblink.go
+++ b/pkg/detectors/salesblink/salesblink.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/salescookie/salescookie.go b/pkg/detectors/salescookie/salescookie.go
index aadf992ec..9cd4a071a 100644
--- a/pkg/detectors/salescookie/salescookie.go
+++ b/pkg/detectors/salescookie/salescookie.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/salesflare/salesflare.go b/pkg/detectors/salesflare/salesflare.go
index 6c3f9bbd2..ee62c241a 100644
--- a/pkg/detectors/salesflare/salesflare.go
+++ b/pkg/detectors/salesflare/salesflare.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/salesmate/salesmate.go b/pkg/detectors/salesmate/salesmate.go
index 1c5a17e8a..273928a2c 100644
--- a/pkg/detectors/salesmate/salesmate.go
+++ b/pkg/detectors/salesmate/salesmate.go
@@ -67,11 +67,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/satismeterprojectkey/satismeterprojectkey.go b/pkg/detectors/satismeterprojectkey/satismeterprojectkey.go
index c9a7ae4a7..01bcdb9d3 100644
--- a/pkg/detectors/satismeterprojectkey/satismeterprojectkey.go
+++ b/pkg/detectors/satismeterprojectkey/satismeterprojectkey.go
@@ -80,11 +80,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/satismeterwritekey/satismeterwritekey.go b/pkg/detectors/satismeterwritekey/satismeterwritekey.go
index 0435ee7e6..d49aa91b9 100644
--- a/pkg/detectors/satismeterwritekey/satismeterwritekey.go
+++ b/pkg/detectors/satismeterwritekey/satismeterwritekey.go
@@ -63,11 +63,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/saucelabs/saucelabs.go b/pkg/detectors/saucelabs/saucelabs.go
index 40114bfcf..9544a0cbd 100644
--- a/pkg/detectors/saucelabs/saucelabs.go
+++ b/pkg/detectors/saucelabs/saucelabs.go
@@ -72,11 +72,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(keyMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/scalewaykey/scalewaykey.go b/pkg/detectors/scalewaykey/scalewaykey.go
index 6946c690c..daaf76d20 100644
--- a/pkg/detectors/scalewaykey/scalewaykey.go
+++ b/pkg/detectors/scalewaykey/scalewaykey.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
-
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, false) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/scalr/scalr.go b/pkg/detectors/scalr/scalr.go
index 76e53cd9b..a2a80c39f 100644
--- a/pkg/detectors/scalr/scalr.go
+++ b/pkg/detectors/scalr/scalr.go
@@ -67,11 +67,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/scrapeowl/scrapeowl.go b/pkg/detectors/scrapeowl/scrapeowl.go
index ad9d0dfe2..566383b00 100644
--- a/pkg/detectors/scrapeowl/scrapeowl.go
+++ b/pkg/detectors/scrapeowl/scrapeowl.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/scraperapi/scraperapi.go b/pkg/detectors/scraperapi/scraperapi.go
index 75add0eae..a69374868 100644
--- a/pkg/detectors/scraperapi/scraperapi.go
+++ b/pkg/detectors/scraperapi/scraperapi.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/scraperbox/scraperbox.go b/pkg/detectors/scraperbox/scraperbox.go
index 0f3b9de81..1d5439f8d 100644
--- a/pkg/detectors/scraperbox/scraperbox.go
+++ b/pkg/detectors/scraperbox/scraperbox.go
@@ -60,11 +60,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/scrapestack/scrapestack.go b/pkg/detectors/scrapestack/scrapestack.go
index 2407d8806..4f57b751e 100644
--- a/pkg/detectors/scrapestack/scrapestack.go
+++ b/pkg/detectors/scrapestack/scrapestack.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/scrapfly/scrapfly.go b/pkg/detectors/scrapfly/scrapfly.go
index cd0059b0f..ce97f374a 100644
--- a/pkg/detectors/scrapfly/scrapfly.go
+++ b/pkg/detectors/scrapfly/scrapfly.go
@@ -64,11 +64,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/scrapingant/scrapingant.go b/pkg/detectors/scrapingant/scrapingant.go
index f838affe5..5aba39bfa 100644
--- a/pkg/detectors/scrapingant/scrapingant.go
+++ b/pkg/detectors/scrapingant/scrapingant.go
@@ -60,11 +60,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/scrapingbee/scrapingbee.go b/pkg/detectors/scrapingbee/scrapingbee.go
index 1aa17c65a..9f9c654bd 100644
--- a/pkg/detectors/scrapingbee/scrapingbee.go
+++ b/pkg/detectors/scrapingbee/scrapingbee.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/screenshotapi/screenshotapi.go b/pkg/detectors/screenshotapi/screenshotapi.go
index b330ea55e..dfbbef53c 100644
--- a/pkg/detectors/screenshotapi/screenshotapi.go
+++ b/pkg/detectors/screenshotapi/screenshotapi.go
@@ -69,11 +69,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
if res.StatusCode >= 200 && res.StatusCode < 300 && r.Screenshot != "" {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/screenshotlayer/screenshotlayer.go b/pkg/detectors/screenshotlayer/screenshotlayer.go
index e04d645d6..39c174e27 100644
--- a/pkg/detectors/screenshotlayer/screenshotlayer.go
+++ b/pkg/detectors/screenshotlayer/screenshotlayer.go
@@ -67,11 +67,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/scrutinizerci/scrutinizerci.go b/pkg/detectors/scrutinizerci/scrutinizerci.go
index 7f832df3c..b662b331a 100644
--- a/pkg/detectors/scrutinizerci/scrutinizerci.go
+++ b/pkg/detectors/scrutinizerci/scrutinizerci.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/securitytrails/securitytrails.go b/pkg/detectors/securitytrails/securitytrails.go
index 401a14391..84bfe0ba6 100644
--- a/pkg/detectors/securitytrails/securitytrails.go
+++ b/pkg/detectors/securitytrails/securitytrails.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/segmentapikey/segmentapikey.go b/pkg/detectors/segmentapikey/segmentapikey.go
index 3f0ff5d3d..f3d2ba891 100644
--- a/pkg/detectors/segmentapikey/segmentapikey.go
+++ b/pkg/detectors/segmentapikey/segmentapikey.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/selectpdf/selectpdf.go b/pkg/detectors/selectpdf/selectpdf.go
index a4b8cc807..e3993a03e 100644
--- a/pkg/detectors/selectpdf/selectpdf.go
+++ b/pkg/detectors/selectpdf/selectpdf.go
@@ -60,11 +60,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/semaphore/semaphore.go b/pkg/detectors/semaphore/semaphore.go
index 1dbe1d68a..098d71bdd 100644
--- a/pkg/detectors/semaphore/semaphore.go
+++ b/pkg/detectors/semaphore/semaphore.go
@@ -68,11 +68,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
body := string(bodyBytes)
if res.StatusCode >= 200 && res.StatusCode < 300 && strings.Contains(body, "account_id") {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/sendbird/sendbird.go b/pkg/detectors/sendbird/sendbird.go
index dce9dd082..51fe9165a 100644
--- a/pkg/detectors/sendbird/sendbird.go
+++ b/pkg/detectors/sendbird/sendbird.go
@@ -104,10 +104,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
results = append(results, s1)
}
}
diff --git a/pkg/detectors/sendbirdorganizationapi/sendbirdorganizationapi.go b/pkg/detectors/sendbirdorganizationapi/sendbirdorganizationapi.go
index 74f846f20..6bc71aa0f 100644
--- a/pkg/detectors/sendbirdorganizationapi/sendbirdorganizationapi.go
+++ b/pkg/detectors/sendbirdorganizationapi/sendbirdorganizationapi.go
@@ -74,10 +74,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
results = append(results, s1)
}
diff --git a/pkg/detectors/sendgrid/sendgrid.go b/pkg/detectors/sendgrid/sendgrid.go
index 661e9053f..e00cb2a2e 100644
--- a/pkg/detectors/sendgrid/sendgrid.go
+++ b/pkg/detectors/sendgrid/sendgrid.go
@@ -85,10 +85,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s1.Verified && detectors.IsKnownFalsePositive(string(s1.Raw), detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/sendinbluev2/sendinbluev2.go b/pkg/detectors/sendinbluev2/sendinbluev2.go
index b7c6aa41d..e33eac6c7 100644
--- a/pkg/detectors/sendinbluev2/sendinbluev2.go
+++ b/pkg/detectors/sendinbluev2/sendinbluev2.go
@@ -56,10 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, false) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/sentrytoken/sentrytoken.go b/pkg/detectors/sentrytoken/sentrytoken.go
index 0e32137af..ce73fdd65 100644
--- a/pkg/detectors/sentrytoken/sentrytoken.go
+++ b/pkg/detectors/sentrytoken/sentrytoken.go
@@ -70,9 +70,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
results = append(results, s1)
}
diff --git a/pkg/detectors/serphouse/serphouse.go b/pkg/detectors/serphouse/serphouse.go
index b3fb4ed37..7dfd7ba01 100644
--- a/pkg/detectors/serphouse/serphouse.go
+++ b/pkg/detectors/serphouse/serphouse.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/serpstack/serpstack.go b/pkg/detectors/serpstack/serpstack.go
index b1a048c4d..fb92a530a 100644
--- a/pkg/detectors/serpstack/serpstack.go
+++ b/pkg/detectors/serpstack/serpstack.go
@@ -69,11 +69,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/sheety/sheety.go b/pkg/detectors/sheety/sheety.go
index bd32c4521..5f990d1a5 100644
--- a/pkg/detectors/sheety/sheety.go
+++ b/pkg/detectors/sheety/sheety.go
@@ -65,11 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/sherpadesk/sherpadesk.go b/pkg/detectors/sherpadesk/sherpadesk.go
index b4d5215cc..79bcee05b 100644
--- a/pkg/detectors/sherpadesk/sherpadesk.go
+++ b/pkg/detectors/sherpadesk/sherpadesk.go
@@ -62,11 +62,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/shipday/shipday.go b/pkg/detectors/shipday/shipday.go
index cbdf31374..97474c345 100644
--- a/pkg/detectors/shipday/shipday.go
+++ b/pkg/detectors/shipday/shipday.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/shodankey/shodankey.go b/pkg/detectors/shodankey/shodankey.go
index eefb364c7..58a66b015 100644
--- a/pkg/detectors/shodankey/shodankey.go
+++ b/pkg/detectors/shodankey/shodankey.go
@@ -51,9 +51,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if verify {
s1.Verified = verifyToken(ctx, client, resMatch)
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
results = append(results, s1)
}
diff --git a/pkg/detectors/shopify/shopify.go b/pkg/detectors/shopify/shopify.go
index a86151e15..187889f17 100644
--- a/pkg/detectors/shopify/shopify.go
+++ b/pkg/detectors/shopify/shopify.go
@@ -74,11 +74,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
res.Body.Close()
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(key, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
diff --git a/pkg/detectors/shortcut/shortcut.go b/pkg/detectors/shortcut/shortcut.go
index 33ea6e3f9..764e548ef 100644
--- a/pkg/detectors/shortcut/shortcut.go
+++ b/pkg/detectors/shortcut/shortcut.go
@@ -51,13 +51,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, resMatch)
}
- if !s1.Verified {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
- }
-
results = append(results, s1)
}
return results, nil
diff --git a/pkg/detectors/shotstack/shotstack.go b/pkg/detectors/shotstack/shotstack.go
index daf5420ec..b3d46f752 100644
--- a/pkg/detectors/shotstack/shotstack.go
+++ b/pkg/detectors/shotstack/shotstack.go
@@ -89,11 +89,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/shutterstock/shutterstock.go b/pkg/detectors/shutterstock/shutterstock.go
index e128b8d74..c097d8202 100644
--- a/pkg/detectors/shutterstock/shutterstock.go
+++ b/pkg/detectors/shutterstock/shutterstock.go
@@ -66,15 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
- if detectors.IsKnownFalsePositive(resSecretMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/shutterstockoauth/shutterstockoauth.go b/pkg/detectors/shutterstockoauth/shutterstockoauth.go
index 88721a82d..5f9076b43 100644
--- a/pkg/detectors/shutterstockoauth/shutterstockoauth.go
+++ b/pkg/detectors/shutterstockoauth/shutterstockoauth.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/signable/signable.go b/pkg/detectors/signable/signable.go
index 42f582602..8e13d562a 100644
--- a/pkg/detectors/signable/signable.go
+++ b/pkg/detectors/signable/signable.go
@@ -63,11 +63,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, resMatch)
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/signalwire/signalwire.go b/pkg/detectors/signalwire/signalwire.go
index 4b4d571c9..a617a867c 100644
--- a/pkg/detectors/signalwire/signalwire.go
+++ b/pkg/detectors/signalwire/signalwire.go
@@ -78,11 +78,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/signaturit/signaturit.go b/pkg/detectors/signaturit/signaturit.go
index fe47d46f4..c34b712b0 100644
--- a/pkg/detectors/signaturit/signaturit.go
+++ b/pkg/detectors/signaturit/signaturit.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/signupgenius/signupgenius.go b/pkg/detectors/signupgenius/signupgenius.go
index cfd8ee21b..044e8614b 100644
--- a/pkg/detectors/signupgenius/signupgenius.go
+++ b/pkg/detectors/signupgenius/signupgenius.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/sigopt/sigopt.go b/pkg/detectors/sigopt/sigopt.go
index 0bcb2a257..4055f93d2 100644
--- a/pkg/detectors/sigopt/sigopt.go
+++ b/pkg/detectors/sigopt/sigopt.go
@@ -62,11 +62,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/simfin/simfin.go b/pkg/detectors/simfin/simfin.go
index 9a0191444..1fce9b07c 100644
--- a/pkg/detectors/simfin/simfin.go
+++ b/pkg/detectors/simfin/simfin.go
@@ -65,11 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 && validResponse {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/simplesat/simplesat.go b/pkg/detectors/simplesat/simplesat.go
index c032191c1..9cea1ae9a 100644
--- a/pkg/detectors/simplesat/simplesat.go
+++ b/pkg/detectors/simplesat/simplesat.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/simplynoted/simplynoted.go b/pkg/detectors/simplynoted/simplynoted.go
index 6bfef10f9..ea07439db 100644
--- a/pkg/detectors/simplynoted/simplynoted.go
+++ b/pkg/detectors/simplynoted/simplynoted.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/simvoly/simvoly.go b/pkg/detectors/simvoly/simvoly.go
index b9ab8d04c..935265f22 100644
--- a/pkg/detectors/simvoly/simvoly.go
+++ b/pkg/detectors/simvoly/simvoly.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/sinchmessage/sinchmessage.go b/pkg/detectors/sinchmessage/sinchmessage.go
index 4e8f154e1..eb67ecb7c 100644
--- a/pkg/detectors/sinchmessage/sinchmessage.go
+++ b/pkg/detectors/sinchmessage/sinchmessage.go
@@ -72,11 +72,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/sirv/sirv.go b/pkg/detectors/sirv/sirv.go
index 0615c0bf1..566553267 100644
--- a/pkg/detectors/sirv/sirv.go
+++ b/pkg/detectors/sirv/sirv.go
@@ -70,11 +70,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/siteleaf/siteleaf.go b/pkg/detectors/siteleaf/siteleaf.go
index 57a0ee379..a3a3bcabd 100644
--- a/pkg/detectors/siteleaf/siteleaf.go
+++ b/pkg/detectors/siteleaf/siteleaf.go
@@ -71,11 +71,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/skrappio/skrappio.go b/pkg/detectors/skrappio/skrappio.go
index b3d2d172d..f23e90fd1 100644
--- a/pkg/detectors/skrappio/skrappio.go
+++ b/pkg/detectors/skrappio/skrappio.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/skybiometry/skybiometry.go b/pkg/detectors/skybiometry/skybiometry.go
index 18ae10862..297f5a565 100644
--- a/pkg/detectors/skybiometry/skybiometry.go
+++ b/pkg/detectors/skybiometry/skybiometry.go
@@ -70,15 +70,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
- if detectors.IsKnownFalsePositive(resSecretMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/slack/slack.go b/pkg/detectors/slack/slack.go
index dc217a16f..275fe8e0e 100644
--- a/pkg/detectors/slack/slack.go
+++ b/pkg/detectors/slack/slack.go
@@ -106,10 +106,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s1.Verified && detectors.IsKnownFalsePositive(string(s1.Raw), detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
}
diff --git a/pkg/detectors/smartsheets/smartsheets.go b/pkg/detectors/smartsheets/smartsheets.go
index e3d606570..0ce964465 100644
--- a/pkg/detectors/smartsheets/smartsheets.go
+++ b/pkg/detectors/smartsheets/smartsheets.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/smartystreets/smartystreets.go b/pkg/detectors/smartystreets/smartystreets.go
index 9fced972e..55eb78af8 100644
--- a/pkg/detectors/smartystreets/smartystreets.go
+++ b/pkg/detectors/smartystreets/smartystreets.go
@@ -65,11 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/smooch/smooch.go b/pkg/detectors/smooch/smooch.go
index 9b0bdef2a..491fa7ff9 100644
--- a/pkg/detectors/smooch/smooch.go
+++ b/pkg/detectors/smooch/smooch.go
@@ -71,11 +71,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/snipcart/snipcart.go b/pkg/detectors/snipcart/snipcart.go
index f47f030d3..f0e161a6e 100644
--- a/pkg/detectors/snipcart/snipcart.go
+++ b/pkg/detectors/snipcart/snipcart.go
@@ -62,11 +62,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/snowflake/snowflake.go b/pkg/detectors/snowflake/snowflake.go
index 53e034253..a769720d5 100644
--- a/pkg/detectors/snowflake/snowflake.go
+++ b/pkg/detectors/snowflake/snowflake.go
@@ -154,11 +154,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resPasswordMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/snykkey/snykkey.go b/pkg/detectors/snykkey/snykkey.go
index aaaf5ff09..0bfb11b7a 100644
--- a/pkg/detectors/snykkey/snykkey.go
+++ b/pkg/detectors/snykkey/snykkey.go
@@ -52,10 +52,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, token)
}
- if !s1.Verified && detectors.IsKnownFalsePositive(token, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/sonarcloud/sonarcloud.go b/pkg/detectors/sonarcloud/sonarcloud.go
index 8f9ec5671..f7e34cbad 100644
--- a/pkg/detectors/sonarcloud/sonarcloud.go
+++ b/pkg/detectors/sonarcloud/sonarcloud.go
@@ -67,11 +67,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if validResponse {
s1.Verified = true
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
diff --git a/pkg/detectors/sourcegraph/sourcegraph.go b/pkg/detectors/sourcegraph/sourcegraph.go
index 2018e7b89..08c542f6c 100644
--- a/pkg/detectors/sourcegraph/sourcegraph.go
+++ b/pkg/detectors/sourcegraph/sourcegraph.go
@@ -82,11 +82,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/sourcegraphcody/sourcegraphcody.go b/pkg/detectors/sourcegraphcody/sourcegraphcody.go
index bb00e01a0..46ab53ee7 100644
--- a/pkg/detectors/sourcegraphcody/sourcegraphcody.go
+++ b/pkg/detectors/sourcegraphcody/sourcegraphcody.go
@@ -76,11 +76,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/sparkpost/sparkpost.go b/pkg/detectors/sparkpost/sparkpost.go
index d02e58bf8..c605a4479 100644
--- a/pkg/detectors/sparkpost/sparkpost.go
+++ b/pkg/detectors/sparkpost/sparkpost.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/speechtextai/speechtextai.go b/pkg/detectors/speechtextai/speechtextai.go
index 53a2ce8e6..0fdb0272f 100644
--- a/pkg/detectors/speechtextai/speechtextai.go
+++ b/pkg/detectors/speechtextai/speechtextai.go
@@ -61,11 +61,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/splunkobservabilitytoken/splunkobservabilitytoken.go b/pkg/detectors/splunkobservabilitytoken/splunkobservabilitytoken.go
index 5bb39ed19..87a32b457 100644
--- a/pkg/detectors/splunkobservabilitytoken/splunkobservabilitytoken.go
+++ b/pkg/detectors/splunkobservabilitytoken/splunkobservabilitytoken.go
@@ -59,12 +59,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
- }
+ }
}
}
diff --git a/pkg/detectors/spoonacular/spoonacular.go b/pkg/detectors/spoonacular/spoonacular.go
index a7f5ae9cd..6c6ec8086 100644
--- a/pkg/detectors/spoonacular/spoonacular.go
+++ b/pkg/detectors/spoonacular/spoonacular.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/sportsmonk/sportsmonk.go b/pkg/detectors/sportsmonk/sportsmonk.go
index c22b1e1e8..b89347e7a 100644
--- a/pkg/detectors/sportsmonk/sportsmonk.go
+++ b/pkg/detectors/sportsmonk/sportsmonk.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/square/square.go b/pkg/detectors/square/square.go
index e27e5f372..08f840ed1 100644
--- a/pkg/detectors/square/square.go
+++ b/pkg/detectors/square/square.go
@@ -81,10 +81,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s.Verified && detectors.IsKnownFalsePositive(string(s.Raw), detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s)
}
diff --git a/pkg/detectors/squareapp/squareapp.go b/pkg/detectors/squareapp/squareapp.go
index dfe6a4e10..0ec85bf02 100644
--- a/pkg/detectors/squareapp/squareapp.go
+++ b/pkg/detectors/squareapp/squareapp.go
@@ -5,9 +5,9 @@ import (
"context"
"encoding/json"
"fmt"
- regexp "github.com/wasilibs/go-re2"
"net/http"
- "strings"
+
+ regexp "github.com/wasilibs/go-re2"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
@@ -41,10 +41,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for _, match := range matches {
for _, secMatch := range secMatches {
- if detectors.IsKnownFalsePositive(strings.ToLower(secMatch), detectors.DefaultFalsePositives, true) {
- continue
- }
-
s := detectors.Result{
DetectorType: detectorspb.DetectorType_SquareApp,
Raw: []byte(match),
@@ -83,10 +79,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s.Verified && detectors.IsKnownFalsePositive(string(s.Raw), detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s)
}
}
diff --git a/pkg/detectors/squarespace/squarespace.go b/pkg/detectors/squarespace/squarespace.go
index 0a87bb872..35b83f44f 100644
--- a/pkg/detectors/squarespace/squarespace.go
+++ b/pkg/detectors/squarespace/squarespace.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/squareup/squareup.go b/pkg/detectors/squareup/squareup.go
index 731328b4f..cb3e097dd 100644
--- a/pkg/detectors/squareup/squareup.go
+++ b/pkg/detectors/squareup/squareup.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/sslmate/sslmate.go b/pkg/detectors/sslmate/sslmate.go
index 0fcc26dd5..3dd8c6bab 100644
--- a/pkg/detectors/sslmate/sslmate.go
+++ b/pkg/detectors/sslmate/sslmate.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/statuscake/statuscake.go b/pkg/detectors/statuscake/statuscake.go
index a12d4b815..e00a2a0b6 100644
--- a/pkg/detectors/statuscake/statuscake.go
+++ b/pkg/detectors/statuscake/statuscake.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/statuspage/statuspage.go b/pkg/detectors/statuspage/statuspage.go
index 12cfe603d..8bb04b07b 100644
--- a/pkg/detectors/statuspage/statuspage.go
+++ b/pkg/detectors/statuspage/statuspage.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/statuspal/statuspal.go b/pkg/detectors/statuspal/statuspal.go
index e74610422..947a4055b 100644
--- a/pkg/detectors/statuspal/statuspal.go
+++ b/pkg/detectors/statuspal/statuspal.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/stitchdata/stitchdata.go b/pkg/detectors/stitchdata/stitchdata.go
index a51a591b0..67e7d4d35 100644
--- a/pkg/detectors/stitchdata/stitchdata.go
+++ b/pkg/detectors/stitchdata/stitchdata.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/stockdata/stockdata.go b/pkg/detectors/stockdata/stockdata.go
index 19b407654..baef22287 100644
--- a/pkg/detectors/stockdata/stockdata.go
+++ b/pkg/detectors/stockdata/stockdata.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/storecove/storecove.go b/pkg/detectors/storecove/storecove.go
index 327d82d08..4e113e747 100644
--- a/pkg/detectors/storecove/storecove.go
+++ b/pkg/detectors/storecove/storecove.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/stormboard/stormboard.go b/pkg/detectors/stormboard/stormboard.go
index 0cc9933c7..6c2a61528 100644
--- a/pkg/detectors/stormboard/stormboard.go
+++ b/pkg/detectors/stormboard/stormboard.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/stormglass/stormglass.go b/pkg/detectors/stormglass/stormglass.go
index 89669d556..83216c6db 100644
--- a/pkg/detectors/stormglass/stormglass.go
+++ b/pkg/detectors/stormglass/stormglass.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/storyblok/storyblok.go b/pkg/detectors/storyblok/storyblok.go
index ceb524182..c5262d0af 100644
--- a/pkg/detectors/storyblok/storyblok.go
+++ b/pkg/detectors/storyblok/storyblok.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/storychief/storychief.go b/pkg/detectors/storychief/storychief.go
index 776058633..9e2949a97 100644
--- a/pkg/detectors/storychief/storychief.go
+++ b/pkg/detectors/storychief/storychief.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/strava/strava.go b/pkg/detectors/strava/strava.go
index 701a02232..42b68d7be 100644
--- a/pkg/detectors/strava/strava.go
+++ b/pkg/detectors/strava/strava.go
@@ -76,11 +76,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resId, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/streak/streak.go b/pkg/detectors/streak/streak.go
index 99364b97b..f241da304 100644
--- a/pkg/detectors/streak/streak.go
+++ b/pkg/detectors/streak/streak.go
@@ -61,11 +61,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/stripe/stripe.go b/pkg/detectors/stripe/stripe.go
index 188180454..e26645da7 100644
--- a/pkg/detectors/stripe/stripe.go
+++ b/pkg/detectors/stripe/stripe.go
@@ -67,10 +67,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s.Verified && detectors.IsKnownFalsePositive(string(s.Raw), detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s)
}
diff --git a/pkg/detectors/stripo/stripo.go b/pkg/detectors/stripo/stripo.go
index 41bb77f34..73592efb7 100644
--- a/pkg/detectors/stripo/stripo.go
+++ b/pkg/detectors/stripo/stripo.go
@@ -73,11 +73,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/stytch/stytch.go b/pkg/detectors/stytch/stytch.go
index c17fd9a7d..ce8024f4f 100644
--- a/pkg/detectors/stytch/stytch.go
+++ b/pkg/detectors/stytch/stytch.go
@@ -64,11 +64,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(tokenPatMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/sugester/sugester.go b/pkg/detectors/sugester/sugester.go
index 6e2151dd0..794f13b15 100644
--- a/pkg/detectors/sugester/sugester.go
+++ b/pkg/detectors/sugester/sugester.go
@@ -64,11 +64,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/sumologickey/sumologickey.go b/pkg/detectors/sumologickey/sumologickey.go
index b8f5f1b6e..b0f6f8fee 100644
--- a/pkg/detectors/sumologickey/sumologickey.go
+++ b/pkg/detectors/sumologickey/sumologickey.go
@@ -70,11 +70,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/supabasetoken/supabasetoken.go b/pkg/detectors/supabasetoken/supabasetoken.go
index 07018a869..7b08cbfda 100644
--- a/pkg/detectors/supabasetoken/supabasetoken.go
+++ b/pkg/detectors/supabasetoken/supabasetoken.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/supernotesapi/supernotesapi.go b/pkg/detectors/supernotesapi/supernotesapi.go
index 9a520fc3b..e94f23930 100644
--- a/pkg/detectors/supernotesapi/supernotesapi.go
+++ b/pkg/detectors/supernotesapi/supernotesapi.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/surveyanyplace/surveyanyplace.go b/pkg/detectors/surveyanyplace/surveyanyplace.go
index f6773935b..fa6c52765 100644
--- a/pkg/detectors/surveyanyplace/surveyanyplace.go
+++ b/pkg/detectors/surveyanyplace/surveyanyplace.go
@@ -73,11 +73,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/surveybot/surveybot.go b/pkg/detectors/surveybot/surveybot.go
index 25bf4fa6d..e6e798bc5 100644
--- a/pkg/detectors/surveybot/surveybot.go
+++ b/pkg/detectors/surveybot/surveybot.go
@@ -70,11 +70,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if len(r.Surveys) > 0 {
s1.Verified = true
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/surveysparrow/surveysparrow.go b/pkg/detectors/surveysparrow/surveysparrow.go
index d61256c10..7f31317a6 100644
--- a/pkg/detectors/surveysparrow/surveysparrow.go
+++ b/pkg/detectors/surveysparrow/surveysparrow.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/survicate/survicate.go b/pkg/detectors/survicate/survicate.go
index 9c2340475..c3b24d59b 100644
--- a/pkg/detectors/survicate/survicate.go
+++ b/pkg/detectors/survicate/survicate.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/swell/swell.go b/pkg/detectors/swell/swell.go
index ba1384ecf..c103885b2 100644
--- a/pkg/detectors/swell/swell.go
+++ b/pkg/detectors/swell/swell.go
@@ -65,11 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(tokenPatMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/swiftype/swiftype.go b/pkg/detectors/swiftype/swiftype.go
index 1ec300fec..bc6eba41a 100644
--- a/pkg/detectors/swiftype/swiftype.go
+++ b/pkg/detectors/swiftype/swiftype.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/tailscale/tailscale.go b/pkg/detectors/tailscale/tailscale.go
index 20a8c12a2..7ba46f479 100644
--- a/pkg/detectors/tailscale/tailscale.go
+++ b/pkg/detectors/tailscale/tailscale.go
@@ -70,11 +70,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/tallyfy/tallyfy.go b/pkg/detectors/tallyfy/tallyfy.go
index 2a32fafae..68f6f6cbc 100644
--- a/pkg/detectors/tallyfy/tallyfy.go
+++ b/pkg/detectors/tallyfy/tallyfy.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/tatumio/tatumio.go b/pkg/detectors/tatumio/tatumio.go
index dd45e4979..97bc9d128 100644
--- a/pkg/detectors/tatumio/tatumio.go
+++ b/pkg/detectors/tatumio/tatumio.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/taxjar/taxjar.go b/pkg/detectors/taxjar/taxjar.go
index 337bc43d1..956318210 100644
--- a/pkg/detectors/taxjar/taxjar.go
+++ b/pkg/detectors/taxjar/taxjar.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/teamgate/teamgate.go b/pkg/detectors/teamgate/teamgate.go
index 5ee093bc2..697b8be15 100644
--- a/pkg/detectors/teamgate/teamgate.go
+++ b/pkg/detectors/teamgate/teamgate.go
@@ -67,11 +67,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/teamworkcrm/teamworkcrm.go b/pkg/detectors/teamworkcrm/teamworkcrm.go
index 293ac6f20..3a5cae840 100644
--- a/pkg/detectors/teamworkcrm/teamworkcrm.go
+++ b/pkg/detectors/teamworkcrm/teamworkcrm.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/teamworkdesk/teamworkdesk.go b/pkg/detectors/teamworkdesk/teamworkdesk.go
index 9a9a06e11..e4e788baa 100644
--- a/pkg/detectors/teamworkdesk/teamworkdesk.go
+++ b/pkg/detectors/teamworkdesk/teamworkdesk.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/teamworkspaces/teamworkspaces.go b/pkg/detectors/teamworkspaces/teamworkspaces.go
index 281daa422..3e4b3aa1c 100644
--- a/pkg/detectors/teamworkspaces/teamworkspaces.go
+++ b/pkg/detectors/teamworkspaces/teamworkspaces.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/technicalanalysisapi/technicalanalysisapi.go b/pkg/detectors/technicalanalysisapi/technicalanalysisapi.go
index c0e79fa6e..fbdbda279 100644
--- a/pkg/detectors/technicalanalysisapi/technicalanalysisapi.go
+++ b/pkg/detectors/technicalanalysisapi/technicalanalysisapi.go
@@ -60,11 +60,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/tefter/tefter.go b/pkg/detectors/tefter/tefter.go
index a5707e537..0d5dbf398 100644
--- a/pkg/detectors/tefter/tefter.go
+++ b/pkg/detectors/tefter/tefter.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 && validResponse {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/telegrambottoken/telegrambottoken.go b/pkg/detectors/telegrambottoken/telegrambottoken.go
index 22985ebe4..90649da1f 100644
--- a/pkg/detectors/telegrambottoken/telegrambottoken.go
+++ b/pkg/detectors/telegrambottoken/telegrambottoken.go
@@ -72,10 +72,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
"username": apiRes.Result.Username,
}
}
- } else {
- if detectors.IsKnownFalsePositive(key, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/teletype/teletype.go b/pkg/detectors/teletype/teletype.go
index b994b5ec1..a56c4da6c 100644
--- a/pkg/detectors/teletype/teletype.go
+++ b/pkg/detectors/teletype/teletype.go
@@ -71,11 +71,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = true
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/telnyx/telnyx.go b/pkg/detectors/telnyx/telnyx.go
index 5aba48b2d..4d4e11c31 100644
--- a/pkg/detectors/telnyx/telnyx.go
+++ b/pkg/detectors/telnyx/telnyx.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/terraformcloudpersonaltoken/terraformcloudpersonaltoken.go b/pkg/detectors/terraformcloudpersonaltoken/terraformcloudpersonaltoken.go
index 40cff8b8f..28cddb17c 100644
--- a/pkg/detectors/terraformcloudpersonaltoken/terraformcloudpersonaltoken.go
+++ b/pkg/detectors/terraformcloudpersonaltoken/terraformcloudpersonaltoken.go
@@ -57,10 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/testingbot/testingbot.go b/pkg/detectors/testingbot/testingbot.go
index 91d26248b..9003c688e 100644
--- a/pkg/detectors/testingbot/testingbot.go
+++ b/pkg/detectors/testingbot/testingbot.go
@@ -64,11 +64,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/textmagic/textmagic.go b/pkg/detectors/textmagic/textmagic.go
index 8c53ca5b6..bee025d95 100644
--- a/pkg/detectors/textmagic/textmagic.go
+++ b/pkg/detectors/textmagic/textmagic.go
@@ -71,11 +71,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/theoddsapi/theoddsapi.go b/pkg/detectors/theoddsapi/theoddsapi.go
index 9cbeb96b9..2b9b06183 100644
--- a/pkg/detectors/theoddsapi/theoddsapi.go
+++ b/pkg/detectors/theoddsapi/theoddsapi.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/thinkific/thinkific.go b/pkg/detectors/thinkific/thinkific.go
index 86f8ed882..66f9459af 100644
--- a/pkg/detectors/thinkific/thinkific.go
+++ b/pkg/detectors/thinkific/thinkific.go
@@ -75,12 +75,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if strings.Contains(body, "API Access is not available") {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
-
}
}
diff --git a/pkg/detectors/thousandeyes/thousandeyes.go b/pkg/detectors/thousandeyes/thousandeyes.go
index 83a0a2e7d..435c85846 100644
--- a/pkg/detectors/thousandeyes/thousandeyes.go
+++ b/pkg/detectors/thousandeyes/thousandeyes.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(tokenPatMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/ticketmaster/ticketmaster.go b/pkg/detectors/ticketmaster/ticketmaster.go
index 7f1026f9f..de12b7a04 100644
--- a/pkg/detectors/ticketmaster/ticketmaster.go
+++ b/pkg/detectors/ticketmaster/ticketmaster.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/tickettailor/tickettailor.go b/pkg/detectors/tickettailor/tickettailor.go
index e8160c401..10d96b551 100644
--- a/pkg/detectors/tickettailor/tickettailor.go
+++ b/pkg/detectors/tickettailor/tickettailor.go
@@ -62,11 +62,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/tiingo/tiingo.go b/pkg/detectors/tiingo/tiingo.go
index 419367910..e8aa1da7e 100644
--- a/pkg/detectors/tiingo/tiingo.go
+++ b/pkg/detectors/tiingo/tiingo.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/timecamp/timecamp.go b/pkg/detectors/timecamp/timecamp.go
index fd019a2f3..e3c132ab1 100644
--- a/pkg/detectors/timecamp/timecamp.go
+++ b/pkg/detectors/timecamp/timecamp.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/timezoneapi/timezoneapi.go b/pkg/detectors/timezoneapi/timezoneapi.go
index c9a094024..ef7534d3a 100644
--- a/pkg/detectors/timezoneapi/timezoneapi.go
+++ b/pkg/detectors/timezoneapi/timezoneapi.go
@@ -61,11 +61,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 && verifiedBodyResponse {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/tly/tly.go b/pkg/detectors/tly/tly.go
index ca9ba4a25..37b7eb6ff 100644
--- a/pkg/detectors/tly/tly.go
+++ b/pkg/detectors/tly/tly.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/tmetric/tmetric.go b/pkg/detectors/tmetric/tmetric.go
index 640146d65..476b5e6fd 100644
--- a/pkg/detectors/tmetric/tmetric.go
+++ b/pkg/detectors/tmetric/tmetric.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/todoist/todoist.go b/pkg/detectors/todoist/todoist.go
index f1c238fa5..3461c5e3b 100644
--- a/pkg/detectors/todoist/todoist.go
+++ b/pkg/detectors/todoist/todoist.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/toggltrack/toggltrack.go b/pkg/detectors/toggltrack/toggltrack.go
index 2c35e6b26..883784c7b 100644
--- a/pkg/detectors/toggltrack/toggltrack.go
+++ b/pkg/detectors/toggltrack/toggltrack.go
@@ -62,11 +62,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/tokeet/tokeet.go b/pkg/detectors/tokeet/tokeet.go
index b361b3192..7e7cf8668 100644
--- a/pkg/detectors/tokeet/tokeet.go
+++ b/pkg/detectors/tokeet/tokeet.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/tomorrowio/tomorrowio.go b/pkg/detectors/tomorrowio/tomorrowio.go
index 82076c5be..edf5de186 100644
--- a/pkg/detectors/tomorrowio/tomorrowio.go
+++ b/pkg/detectors/tomorrowio/tomorrowio.go
@@ -57,12 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
- }
+ }
}
}
diff --git a/pkg/detectors/tomtom/tomtom.go b/pkg/detectors/tomtom/tomtom.go
index 46f1e51b3..b1e1aff2c 100644
--- a/pkg/detectors/tomtom/tomtom.go
+++ b/pkg/detectors/tomtom/tomtom.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/tradier/tradier.go b/pkg/detectors/tradier/tradier.go
index 36cdebd8a..c11d0ee14 100644
--- a/pkg/detectors/tradier/tradier.go
+++ b/pkg/detectors/tradier/tradier.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/transferwise/transferwise.go b/pkg/detectors/transferwise/transferwise.go
index 1cebe38f3..e49455d2c 100644
--- a/pkg/detectors/transferwise/transferwise.go
+++ b/pkg/detectors/transferwise/transferwise.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/travelpayouts/travelpayouts.go b/pkg/detectors/travelpayouts/travelpayouts.go
index 651c63a5c..6aa4b481b 100644
--- a/pkg/detectors/travelpayouts/travelpayouts.go
+++ b/pkg/detectors/travelpayouts/travelpayouts.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/travisci/travisci.go b/pkg/detectors/travisci/travisci.go
index af73e2388..fe7b7a79a 100644
--- a/pkg/detectors/travisci/travisci.go
+++ b/pkg/detectors/travisci/travisci.go
@@ -59,10 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/trelloapikey/trelloapikey.go b/pkg/detectors/trelloapikey/trelloapikey.go
index 26e8e810f..1f2e533fa 100644
--- a/pkg/detectors/trelloapikey/trelloapikey.go
+++ b/pkg/detectors/trelloapikey/trelloapikey.go
@@ -62,10 +62,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/tru/tru.go b/pkg/detectors/tru/tru.go
index 25dee7b48..2df42285c 100644
--- a/pkg/detectors/tru/tru.go
+++ b/pkg/detectors/tru/tru.go
@@ -71,11 +71,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/trufflehogenterprise/trufflehogenterprise.go b/pkg/detectors/trufflehogenterprise/trufflehogenterprise.go
index 20955b5a0..cc2978e1b 100644
--- a/pkg/detectors/trufflehogenterprise/trufflehogenterprise.go
+++ b/pkg/detectors/trufflehogenterprise/trufflehogenterprise.go
@@ -86,11 +86,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if res.StatusCode >= 200 && res.StatusCode < 300 && verifiedBodyResponse {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resSecretMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/twelvedata/twelvedata.go b/pkg/detectors/twelvedata/twelvedata.go
index 8a2230671..1b684910d 100644
--- a/pkg/detectors/twelvedata/twelvedata.go
+++ b/pkg/detectors/twelvedata/twelvedata.go
@@ -68,10 +68,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if !strings.Contains(body, "401") {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
diff --git a/pkg/detectors/twilio/twilio.go b/pkg/detectors/twilio/twilio.go
index 4c61cec9a..d761dc333 100644
--- a/pkg/detectors/twilio/twilio.go
+++ b/pkg/detectors/twilio/twilio.go
@@ -88,10 +88,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s1.Verified && detectors.IsKnownFalsePositive(string(s1.Raw), detectors.DefaultFalsePositives, true) {
- continue
- }
-
if len(keyMatches) > 0 {
results = append(results, s1)
}
diff --git a/pkg/detectors/twist/twist.go b/pkg/detectors/twist/twist.go
index 898d53f05..c99c423d2 100644
--- a/pkg/detectors/twist/twist.go
+++ b/pkg/detectors/twist/twist.go
@@ -63,12 +63,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
- }
+ }
}
}
results = append(results, s1)
diff --git a/pkg/detectors/twitch/twitch.go b/pkg/detectors/twitch/twitch.go
index 9898d4f5e..426f89841 100644
--- a/pkg/detectors/twitch/twitch.go
+++ b/pkg/detectors/twitch/twitch.go
@@ -68,10 +68,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(verificationErr, resMatch)
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
results = append(results, s1)
}
}
diff --git a/pkg/detectors/tyntec/tyntec.go b/pkg/detectors/tyntec/tyntec.go
index 85c6ccebd..0269f61a1 100644
--- a/pkg/detectors/tyntec/tyntec.go
+++ b/pkg/detectors/tyntec/tyntec.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/typeform/typeform.go b/pkg/detectors/typeform/typeform.go
index 404137427..63dfbf41e 100644
--- a/pkg/detectors/typeform/typeform.go
+++ b/pkg/detectors/typeform/typeform.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/typetalk/typetalk.go b/pkg/detectors/typetalk/typetalk.go
index 9f455c5a1..2ad121fe7 100644
--- a/pkg/detectors/typetalk/typetalk.go
+++ b/pkg/detectors/typetalk/typetalk.go
@@ -65,11 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/ubidots/ubidots.go b/pkg/detectors/ubidots/ubidots.go
index 73d3b680e..303de4887 100644
--- a/pkg/detectors/ubidots/ubidots.go
+++ b/pkg/detectors/ubidots/ubidots.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/uclassify/uclassify.go b/pkg/detectors/uclassify/uclassify.go
index 64483ade4..29fe57cc6 100644
--- a/pkg/detectors/uclassify/uclassify.go
+++ b/pkg/detectors/uclassify/uclassify.go
@@ -60,11 +60,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/unifyid/unifyid.go b/pkg/detectors/unifyid/unifyid.go
index f75999a2f..4bb02a180 100644
--- a/pkg/detectors/unifyid/unifyid.go
+++ b/pkg/detectors/unifyid/unifyid.go
@@ -65,11 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
body := string(bodyBytes)
if (res.StatusCode >= 200 && res.StatusCode < 300) || (res.StatusCode == 400 && strings.Contains(body, "invalid token")) {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/unplugg/unplugg.go b/pkg/detectors/unplugg/unplugg.go
index 298737a0b..25c2b59a6 100644
--- a/pkg/detectors/unplugg/unplugg.go
+++ b/pkg/detectors/unplugg/unplugg.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/unsplash/unsplash.go b/pkg/detectors/unsplash/unsplash.go
index e15383c25..4b2a75808 100644
--- a/pkg/detectors/unsplash/unsplash.go
+++ b/pkg/detectors/unsplash/unsplash.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/upcdatabase/upcdatabase.go b/pkg/detectors/upcdatabase/upcdatabase.go
index f86d3eb23..c18f34fe9 100644
--- a/pkg/detectors/upcdatabase/upcdatabase.go
+++ b/pkg/detectors/upcdatabase/upcdatabase.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/uplead/uplead.go b/pkg/detectors/uplead/uplead.go
index d49367772..6058835c8 100644
--- a/pkg/detectors/uplead/uplead.go
+++ b/pkg/detectors/uplead/uplead.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/uploadcare/uploadcare.go b/pkg/detectors/uploadcare/uploadcare.go
index 70830b3ba..665f158ef 100644
--- a/pkg/detectors/uploadcare/uploadcare.go
+++ b/pkg/detectors/uploadcare/uploadcare.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/uptimerobot/uptimerobot.go b/pkg/detectors/uptimerobot/uptimerobot.go
index 9adfea392..b501e246a 100644
--- a/pkg/detectors/uptimerobot/uptimerobot.go
+++ b/pkg/detectors/uptimerobot/uptimerobot.go
@@ -67,11 +67,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/upwave/upwave.go b/pkg/detectors/upwave/upwave.go
index 1cbc174bb..c42178d0b 100644
--- a/pkg/detectors/upwave/upwave.go
+++ b/pkg/detectors/upwave/upwave.go
@@ -59,12 +59,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
- }
+ }
}
}
diff --git a/pkg/detectors/uri/uri.go b/pkg/detectors/uri/uri.go
index 0ab918466..33d63ad77 100644
--- a/pkg/detectors/uri/uri.go
+++ b/pkg/detectors/uri/uri.go
@@ -95,10 +95,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s1.Verified && !s.allowKnownTestSites && detectors.IsKnownFalsePositive(string(s1.Raw), detectors.DefaultFalsePositives, false) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/urlscan/urlscan.go b/pkg/detectors/urlscan/urlscan.go
index aae63b2c1..b1236f870 100644
--- a/pkg/detectors/urlscan/urlscan.go
+++ b/pkg/detectors/urlscan/urlscan.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/user/user.go b/pkg/detectors/user/user.go
index a1549423e..ee5ec0fa2 100644
--- a/pkg/detectors/user/user.go
+++ b/pkg/detectors/user/user.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/userflow/userflow.go b/pkg/detectors/userflow/userflow.go
index f43d3dd97..9014b5f5e 100644
--- a/pkg/detectors/userflow/userflow.go
+++ b/pkg/detectors/userflow/userflow.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/userstack/userstack.go b/pkg/detectors/userstack/userstack.go
index 05dacac14..7655a8e80 100644
--- a/pkg/detectors/userstack/userstack.go
+++ b/pkg/detectors/userstack/userstack.go
@@ -64,10 +64,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.Verified = true
} else {
s1.Verified = false
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/vagrantcloudpersonaltoken/vagrantcloudpersonaltoken.go b/pkg/detectors/vagrantcloudpersonaltoken/vagrantcloudpersonaltoken.go
index c517169c8..951530115 100644
--- a/pkg/detectors/vagrantcloudpersonaltoken/vagrantcloudpersonaltoken.go
+++ b/pkg/detectors/vagrantcloudpersonaltoken/vagrantcloudpersonaltoken.go
@@ -75,11 +75,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/vatlayer/vatlayer.go b/pkg/detectors/vatlayer/vatlayer.go
index be0bbf525..6951bdf0f 100644
--- a/pkg/detectors/vatlayer/vatlayer.go
+++ b/pkg/detectors/vatlayer/vatlayer.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/vbout/vbout.go b/pkg/detectors/vbout/vbout.go
index f9cfd4a1b..e8badadc7 100644
--- a/pkg/detectors/vbout/vbout.go
+++ b/pkg/detectors/vbout/vbout.go
@@ -57,12 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
- }
+ }
}
}
diff --git a/pkg/detectors/vercel/vercel.go b/pkg/detectors/vercel/vercel.go
index 87b398675..4b04286b5 100644
--- a/pkg/detectors/vercel/vercel.go
+++ b/pkg/detectors/vercel/vercel.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/verifier/verifier.go b/pkg/detectors/verifier/verifier.go
index eb8180a77..5bea79f9b 100644
--- a/pkg/detectors/verifier/verifier.go
+++ b/pkg/detectors/verifier/verifier.go
@@ -65,11 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/verimail/verimail.go b/pkg/detectors/verimail/verimail.go
index f449b088a..ce90672e9 100644
--- a/pkg/detectors/verimail/verimail.go
+++ b/pkg/detectors/verimail/verimail.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/veriphone/veriphone.go b/pkg/detectors/veriphone/veriphone.go
index 46902ba66..16cfb0eab 100644
--- a/pkg/detectors/veriphone/veriphone.go
+++ b/pkg/detectors/veriphone/veriphone.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/versioneye/versioneye.go b/pkg/detectors/versioneye/versioneye.go
index 9752e6fd0..74c718f11 100644
--- a/pkg/detectors/versioneye/versioneye.go
+++ b/pkg/detectors/versioneye/versioneye.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/viewneo/viewneo.go b/pkg/detectors/viewneo/viewneo.go
index 3465f61cb..d12fffc69 100644
--- a/pkg/detectors/viewneo/viewneo.go
+++ b/pkg/detectors/viewneo/viewneo.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/virustotal/virustotal.go b/pkg/detectors/virustotal/virustotal.go
index f57024017..db78d8a56 100644
--- a/pkg/detectors/virustotal/virustotal.go
+++ b/pkg/detectors/virustotal/virustotal.go
@@ -48,9 +48,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if verify {
s1.Verified = verifyToken(ctx, client, resMatch)
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
results = append(results, s1)
}
diff --git a/pkg/detectors/visualcrossing/visualcrossing.go b/pkg/detectors/visualcrossing/visualcrossing.go
index 54b5e7606..81fb62ff0 100644
--- a/pkg/detectors/visualcrossing/visualcrossing.go
+++ b/pkg/detectors/visualcrossing/visualcrossing.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/voicegain/voicegain.go b/pkg/detectors/voicegain/voicegain.go
index 72bbb3532..e118b51e3 100644
--- a/pkg/detectors/voicegain/voicegain.go
+++ b/pkg/detectors/voicegain/voicegain.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/voodoosms/voodoosms.go b/pkg/detectors/voodoosms/voodoosms.go
index 0a8ab9884..8490d0031 100644
--- a/pkg/detectors/voodoosms/voodoosms.go
+++ b/pkg/detectors/voodoosms/voodoosms.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/vouchery/vouchery.go b/pkg/detectors/vouchery/vouchery.go
index 28b064081..2f5d5d296 100644
--- a/pkg/detectors/vouchery/vouchery.go
+++ b/pkg/detectors/vouchery/vouchery.go
@@ -68,11 +68,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/vpnapi/vpnapi.go b/pkg/detectors/vpnapi/vpnapi.go
index 5ea820bb6..a53ec3eec 100644
--- a/pkg/detectors/vpnapi/vpnapi.go
+++ b/pkg/detectors/vpnapi/vpnapi.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/vultrapikey/vultrapikey.go b/pkg/detectors/vultrapikey/vultrapikey.go
index fc1d4a1a8..96029c911 100644
--- a/pkg/detectors/vultrapikey/vultrapikey.go
+++ b/pkg/detectors/vultrapikey/vultrapikey.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/vyte/vyte.go b/pkg/detectors/vyte/vyte.go
index 47685a67d..653e29c2a 100644
--- a/pkg/detectors/vyte/vyte.go
+++ b/pkg/detectors/vyte/vyte.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/walkscore/walkscore.go b/pkg/detectors/walkscore/walkscore.go
index 28eaea891..b3d87654f 100644
--- a/pkg/detectors/walkscore/walkscore.go
+++ b/pkg/detectors/walkscore/walkscore.go
@@ -64,11 +64,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
body := string(bodyBytes)
if (res.StatusCode >= 200 && res.StatusCode < 300) && strings.Contains(body, `distance`) {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/weatherbit/weatherbit.go b/pkg/detectors/weatherbit/weatherbit.go
index 9b6eb90f1..fbc752cf5 100644
--- a/pkg/detectors/weatherbit/weatherbit.go
+++ b/pkg/detectors/weatherbit/weatherbit.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/weatherstack/weatherstack.go b/pkg/detectors/weatherstack/weatherstack.go
index 6e42ec8b1..234d931e4 100644
--- a/pkg/detectors/weatherstack/weatherstack.go
+++ b/pkg/detectors/weatherstack/weatherstack.go
@@ -65,11 +65,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
validResponse := strings.Contains(body, `location`) || strings.Contains(body, `"info":"Access Restricted - Your current Subscription Plan does not support HTTPS Encryption."`)
if (res.StatusCode >= 200 && res.StatusCode < 300) && validResponse {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/web3storage/web3storage.go b/pkg/detectors/web3storage/web3storage.go
index 00ca87108..3510f0a92 100644
--- a/pkg/detectors/web3storage/web3storage.go
+++ b/pkg/detectors/web3storage/web3storage.go
@@ -74,11 +74,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/webex/webex.go b/pkg/detectors/webex/webex.go
index d00ad14e6..fbeecb03e 100644
--- a/pkg/detectors/webex/webex.go
+++ b/pkg/detectors/webex/webex.go
@@ -80,10 +80,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
}
diff --git a/pkg/detectors/webflow/webflow.go b/pkg/detectors/webflow/webflow.go
index ed42a9124..b1f69d182 100644
--- a/pkg/detectors/webflow/webflow.go
+++ b/pkg/detectors/webflow/webflow.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/webscraper/webscraper.go b/pkg/detectors/webscraper/webscraper.go
index c5aa1e424..963e3799a 100644
--- a/pkg/detectors/webscraper/webscraper.go
+++ b/pkg/detectors/webscraper/webscraper.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/webscraping/webscraping.go b/pkg/detectors/webscraping/webscraping.go
index 6cd63258a..acbb46de9 100644
--- a/pkg/detectors/webscraping/webscraping.go
+++ b/pkg/detectors/webscraping/webscraping.go
@@ -63,12 +63,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if strings.Contains(body, "key `url` required.") {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
-
}
}
diff --git a/pkg/detectors/websitepulse/websitepulse.go b/pkg/detectors/websitepulse/websitepulse.go
index b952c9e2e..37bd03ba8 100644
--- a/pkg/detectors/websitepulse/websitepulse.go
+++ b/pkg/detectors/websitepulse/websitepulse.go
@@ -70,10 +70,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if strings.Contains(body, "Active") {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/wepay/wepay.go b/pkg/detectors/wepay/wepay.go
index 0bb07752e..6e3391c4c 100644
--- a/pkg/detectors/wepay/wepay.go
+++ b/pkg/detectors/wepay/wepay.go
@@ -73,11 +73,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/whoxy/whoxy.go b/pkg/detectors/whoxy/whoxy.go
index d85683228..4405a299e 100644
--- a/pkg/detectors/whoxy/whoxy.go
+++ b/pkg/detectors/whoxy/whoxy.go
@@ -64,11 +64,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
body := string(bodyBytes)
if res.StatusCode >= 200 && res.StatusCode < 300 && strings.Contains(body, `"status": 1`) {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/wistia/wistia.go b/pkg/detectors/wistia/wistia.go
index e05f6dff7..9efc215a1 100644
--- a/pkg/detectors/wistia/wistia.go
+++ b/pkg/detectors/wistia/wistia.go
@@ -56,12 +56,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
- }
+ }
}
}
diff --git a/pkg/detectors/wit/wit.go b/pkg/detectors/wit/wit.go
index 67ea8417a..7f77a2ccb 100644
--- a/pkg/detectors/wit/wit.go
+++ b/pkg/detectors/wit/wit.go
@@ -58,12 +58,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
- }
+ }
}
}
diff --git a/pkg/detectors/worksnaps/worksnaps.go b/pkg/detectors/worksnaps/worksnaps.go
index 78ecf768b..a8c987267 100644
--- a/pkg/detectors/worksnaps/worksnaps.go
+++ b/pkg/detectors/worksnaps/worksnaps.go
@@ -61,11 +61,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/workstack/workstack.go b/pkg/detectors/workstack/workstack.go
index 488f6ae88..fb076f84f 100644
--- a/pkg/detectors/workstack/workstack.go
+++ b/pkg/detectors/workstack/workstack.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/worldcoinindex/worldcoinindex.go b/pkg/detectors/worldcoinindex/worldcoinindex.go
index 0d5ac48ba..287f9aa88 100644
--- a/pkg/detectors/worldcoinindex/worldcoinindex.go
+++ b/pkg/detectors/worldcoinindex/worldcoinindex.go
@@ -67,11 +67,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.Verified = false
}
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/worldweather/worldweather.go b/pkg/detectors/worldweather/worldweather.go
index 3edc5bc53..296cb7b78 100644
--- a/pkg/detectors/worldweather/worldweather.go
+++ b/pkg/detectors/worldweather/worldweather.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/wrike/wrike.go b/pkg/detectors/wrike/wrike.go
index c71962b03..de45cd446 100644
--- a/pkg/detectors/wrike/wrike.go
+++ b/pkg/detectors/wrike/wrike.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/yandex/yandex.go b/pkg/detectors/yandex/yandex.go
index 61faddde5..93603818d 100644
--- a/pkg/detectors/yandex/yandex.go
+++ b/pkg/detectors/yandex/yandex.go
@@ -56,11 +56,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/yelp/yelp.go b/pkg/detectors/yelp/yelp.go
index 11dd05a5e..58019f4aa 100644
--- a/pkg/detectors/yelp/yelp.go
+++ b/pkg/detectors/yelp/yelp.go
@@ -75,11 +75,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
} else {
s1.SetVerificationError(err, resMatch)
}
-
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
results = append(results, s1)
diff --git a/pkg/detectors/youneedabudget/youneedabudget.go b/pkg/detectors/youneedabudget/youneedabudget.go
index 1bab39c6f..48e56c4a4 100644
--- a/pkg/detectors/youneedabudget/youneedabudget.go
+++ b/pkg/detectors/youneedabudget/youneedabudget.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/yousign/yousign.go b/pkg/detectors/yousign/yousign.go
index 032fdbc25..b187879ea 100644
--- a/pkg/detectors/yousign/yousign.go
+++ b/pkg/detectors/yousign/yousign.go
@@ -59,11 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/youtubeapikey/youtubeapikey.go b/pkg/detectors/youtubeapikey/youtubeapikey.go
index 92597c31b..e77ac9201 100644
--- a/pkg/detectors/youtubeapikey/youtubeapikey.go
+++ b/pkg/detectors/youtubeapikey/youtubeapikey.go
@@ -64,11 +64,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/zendeskapi/zendeskapi.go b/pkg/detectors/zendeskapi/zendeskapi.go
index abaa94a04..1c0043a9e 100644
--- a/pkg/detectors/zendeskapi/zendeskapi.go
+++ b/pkg/detectors/zendeskapi/zendeskapi.go
@@ -59,10 +59,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
resEmail := strings.TrimSpace(email[1])
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_ZendeskApi,
Raw: []byte(resMatch),
diff --git a/pkg/detectors/zenkitapi/zenkitapi.go b/pkg/detectors/zenkitapi/zenkitapi.go
index a45aa60af..d17a636c5 100644
--- a/pkg/detectors/zenkitapi/zenkitapi.go
+++ b/pkg/detectors/zenkitapi/zenkitapi.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/zenrows/zenrows.go b/pkg/detectors/zenrows/zenrows.go
index 4f71bd371..5f85f5871 100644
--- a/pkg/detectors/zenrows/zenrows.go
+++ b/pkg/detectors/zenrows/zenrows.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/zenscrape/zenscrape.go b/pkg/detectors/zenscrape/zenscrape.go
index 651a8099f..05d0fb229 100644
--- a/pkg/detectors/zenscrape/zenscrape.go
+++ b/pkg/detectors/zenscrape/zenscrape.go
@@ -58,10 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if (res.StatusCode >= 200 && res.StatusCode < 300) || res.StatusCode == 429 {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/zenserp/zenserp.go b/pkg/detectors/zenserp/zenserp.go
index a5f9b3b31..84375a5e4 100644
--- a/pkg/detectors/zenserp/zenserp.go
+++ b/pkg/detectors/zenserp/zenserp.go
@@ -62,12 +62,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
body := string(bodyBytes)
if strings.Contains(body, "query") {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
-
}
}
diff --git a/pkg/detectors/zeplin/zeplin.go b/pkg/detectors/zeplin/zeplin.go
index 84e3c14f1..bd3eb38b1 100644
--- a/pkg/detectors/zeplin/zeplin.go
+++ b/pkg/detectors/zeplin/zeplin.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/zerobounce/zerobounce.go b/pkg/detectors/zerobounce/zerobounce.go
index 3ecaa1a8f..23dbd37a1 100644
--- a/pkg/detectors/zerobounce/zerobounce.go
+++ b/pkg/detectors/zerobounce/zerobounce.go
@@ -63,13 +63,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if strings.Contains(body, "found") {
s1.Verified = true
- } else {
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
-
}
results = append(results, s1)
diff --git a/pkg/detectors/zerotier/zerotier.go b/pkg/detectors/zerotier/zerotier.go
index 15462eabf..03433ed2d 100644
--- a/pkg/detectors/zerotier/zerotier.go
+++ b/pkg/detectors/zerotier/zerotier.go
@@ -75,11 +75,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
-
results = append(results, s1)
}
diff --git a/pkg/detectors/zipapi/zipapi.go b/pkg/detectors/zipapi/zipapi.go
index 9ad753f9e..8f544a080 100644
--- a/pkg/detectors/zipapi/zipapi.go
+++ b/pkg/detectors/zipapi/zipapi.go
@@ -76,11 +76,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/zipbooks/zipbooks.go b/pkg/detectors/zipbooks/zipbooks.go
index 07078135a..28ada1847 100644
--- a/pkg/detectors/zipbooks/zipbooks.go
+++ b/pkg/detectors/zipbooks/zipbooks.go
@@ -66,11 +66,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/zipcodeapi/zipcodeapi.go b/pkg/detectors/zipcodeapi/zipcodeapi.go
index f42dcf781..f0f47802e 100644
--- a/pkg/detectors/zipcodeapi/zipcodeapi.go
+++ b/pkg/detectors/zipcodeapi/zipcodeapi.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/zipcodebase/zipcodebase.go b/pkg/detectors/zipcodebase/zipcodebase.go
index 354ed3448..3aea7b32b 100644
--- a/pkg/detectors/zipcodebase/zipcodebase.go
+++ b/pkg/detectors/zipcodebase/zipcodebase.go
@@ -58,11 +58,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/zonkafeedback/zonkafeedback.go b/pkg/detectors/zonkafeedback/zonkafeedback.go
index 7d480daec..1379656d0 100644
--- a/pkg/detectors/zonkafeedback/zonkafeedback.go
+++ b/pkg/detectors/zonkafeedback/zonkafeedback.go
@@ -57,11 +57,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
- } else {
- // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key.
- if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
}
}
}
diff --git a/pkg/detectors/zulipchat/zulipchat.go b/pkg/detectors/zulipchat/zulipchat.go
index 02030d2ed..61c70f3d3 100644
--- a/pkg/detectors/zulipchat/zulipchat.go
+++ b/pkg/detectors/zulipchat/zulipchat.go
@@ -91,9 +91,6 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1.SetVerificationError(err, resMatch)
}
}
- if !s1.Verified && detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
- continue
- }
results = append(results, s1)
}
diff --git a/pkg/engine/engine.go b/pkg/engine/engine.go
index 1a3405343..22cc18686 100644
--- a/pkg/engine/engine.go
+++ b/pkg/engine/engine.go
@@ -72,6 +72,7 @@ type Engine struct {
notifyVerifiedResults bool
notifyUnverifiedResults bool
notifyUnknownResults bool
+ logFilteredUnverified bool
verificationOverlap bool
printAvgDetectorTime bool
@@ -181,6 +182,9 @@ func WithResults(results map[string]struct{}) Option {
_, ok = results["unverified"]
e.notifyUnverifiedResults = ok
+
+ _, ok = results["filtered_unverified"]
+ e.logFilteredUnverified = ok
}
}
@@ -827,8 +831,10 @@ func (e *Engine) detectChunk(ctx context.Context, data detectableChunk) {
results = detectors.CleanResults(results)
}
+ results = detectors.FilterKnownFalsePositives(ctx, results, detectors.DefaultFalsePositives, true, e.logFilteredUnverified)
+
if e.filterEntropy != nil {
- results = detectors.FilterResultsWithEntropy(results, *e.filterEntropy)
+ results = detectors.FilterResultsWithEntropy(ctx, results, *e.filterEntropy, e.logFilteredUnverified)
}
for _, res := range results {
diff --git a/pkg/engine/engine_test.go b/pkg/engine/engine_test.go
index 49b881a0d..88d340c2b 100644
--- a/pkg/engine/engine_test.go
+++ b/pkg/engine/engine_test.go
@@ -192,8 +192,8 @@ func BenchmarkSupportsLineNumbersLoop(b *testing.B) {
}
}
-// TestEngine_DuplicatSecrets is a test that detects ALL duplicate secrets with the same decoder.
-func TestEngine_DuplicatSecrets(t *testing.T) {
+// TestEngine_DuplicateSecrets is a test that detects ALL duplicate secrets with the same decoder.
+func TestEngine_DuplicateSecrets(t *testing.T) {
ctx := context.Background()
absPath, err := filepath.Abs("./testdata/secrets.txt")