diff --git a/pkg/detectors/abbysale/abbysale.go b/pkg/detectors/abbysale/abbysale.go index 8f961d4ca952..e836ca571d74 100644 --- a/pkg/detectors/abbysale/abbysale.go +++ b/pkg/detectors/abbysale/abbysale.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/abstract/abstract.go b/pkg/detectors/abstract/abstract.go index 183f461da7ad..914877d485e4 100644 --- a/pkg/detectors/abstract/abstract.go +++ b/pkg/detectors/abstract/abstract.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/abuseipdb/abuseipdb.go b/pkg/detectors/abuseipdb/abuseipdb.go index f081bff72f1f..62cf56912772 100644 --- a/pkg/detectors/abuseipdb/abuseipdb.go +++ b/pkg/detectors/abuseipdb/abuseipdb.go @@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/accuweather/accuweather.go b/pkg/detectors/accuweather/accuweather.go index 7078551d7c30..dc7dad347251 100644 --- a/pkg/detectors/accuweather/accuweather.go +++ b/pkg/detectors/accuweather/accuweather.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/adafruitio/adafruitio.go b/pkg/detectors/adafruitio/adafruitio.go index 3f72878ab7e5..dc6fcd6f3c23 100644 --- a/pkg/detectors/adafruitio/adafruitio.go +++ b/pkg/detectors/adafruitio/adafruitio.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/adobeio/adobeio.go b/pkg/detectors/adobeio/adobeio.go index af079da9e5ef..1fa055946c52 100644 --- a/pkg/detectors/adobeio/adobeio.go +++ b/pkg/detectors/adobeio/adobeio.go @@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/adzuna/adzuna.go b/pkg/detectors/adzuna/adzuna.go index 32f8aca716d0..f76727a561fe 100644 --- a/pkg/detectors/adzuna/adzuna.go +++ b/pkg/detectors/adzuna/adzuna.go @@ -78,5 +78,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/aeroworkflow/aeroworkflow.go b/pkg/detectors/aeroworkflow/aeroworkflow.go index 31088f06cab6..3936a1701997 100644 --- a/pkg/detectors/aeroworkflow/aeroworkflow.go +++ b/pkg/detectors/aeroworkflow/aeroworkflow.go @@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/agora/agora.go b/pkg/detectors/agora/agora.go index 8fe1f537ed4f..89add75a1cce 100644 --- a/pkg/detectors/agora/agora.go +++ b/pkg/detectors/agora/agora.go @@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/aha/aha.go b/pkg/detectors/aha/aha.go index add34d30c373..fc93f9073367 100644 --- a/pkg/detectors/aha/aha.go +++ b/pkg/detectors/aha/aha.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/airbrakeprojectkey/airbrakeprojectkey.go b/pkg/detectors/airbrakeprojectkey/airbrakeprojectkey.go index a09cfaf68284..e02c01fc0e85 100644 --- a/pkg/detectors/airbrakeprojectkey/airbrakeprojectkey.go +++ b/pkg/detectors/airbrakeprojectkey/airbrakeprojectkey.go @@ -85,5 +85,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/airbrakeuserkey/airbrakeuserkey.go b/pkg/detectors/airbrakeuserkey/airbrakeuserkey.go index f47afa189a85..edbad5d2fcba 100644 --- a/pkg/detectors/airbrakeuserkey/airbrakeuserkey.go +++ b/pkg/detectors/airbrakeuserkey/airbrakeuserkey.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/airship/airship.go b/pkg/detectors/airship/airship.go index 0f4dce5a2a5f..521bc70cd688 100644 --- a/pkg/detectors/airship/airship.go +++ b/pkg/detectors/airship/airship.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/airtableapikey/airtableapikey.go b/pkg/detectors/airtableapikey/airtableapikey.go index 814741d98260..2994034e8f29 100644 --- a/pkg/detectors/airtableapikey/airtableapikey.go +++ b/pkg/detectors/airtableapikey/airtableapikey.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/airvisual/airvisual.go b/pkg/detectors/airvisual/airvisual.go index 51bd1736b7f9..da8709c7301a 100644 --- a/pkg/detectors/airvisual/airvisual.go +++ b/pkg/detectors/airvisual/airvisual.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/alconost/alconost.go b/pkg/detectors/alconost/alconost.go index 75c1901c1492..1bb70b909ee5 100644 --- a/pkg/detectors/alconost/alconost.go +++ b/pkg/detectors/alconost/alconost.go @@ -74,5 +74,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/alegra/alegra.go b/pkg/detectors/alegra/alegra.go index a4df18fda1e2..d29200792662 100644 --- a/pkg/detectors/alegra/alegra.go +++ b/pkg/detectors/alegra/alegra.go @@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/aletheiaapi/aletheiaapi.go b/pkg/detectors/aletheiaapi/aletheiaapi.go index ada90d1f5c0f..a7862f68a581 100644 --- a/pkg/detectors/aletheiaapi/aletheiaapi.go +++ b/pkg/detectors/aletheiaapi/aletheiaapi.go @@ -72,5 +72,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/algoliaadminkey/algoliaadminkey.go b/pkg/detectors/algoliaadminkey/algoliaadminkey.go index 7c5ac6023ec3..804b2ab2e902 100644 --- a/pkg/detectors/algoliaadminkey/algoliaadminkey.go +++ b/pkg/detectors/algoliaadminkey/algoliaadminkey.go @@ -78,5 +78,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/alibaba/alibaba.go b/pkg/detectors/alibaba/alibaba.go index 63df50bba43e..6d581bc2bcb9 100644 --- a/pkg/detectors/alibaba/alibaba.go +++ b/pkg/detectors/alibaba/alibaba.go @@ -128,5 +128,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/alienvault/alienvault.go b/pkg/detectors/alienvault/alienvault.go index bda9f6dc56ff..f9a006e34dfd 100644 --- a/pkg/detectors/alienvault/alienvault.go +++ b/pkg/detectors/alienvault/alienvault.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/allsports/allsports.go b/pkg/detectors/allsports/allsports.go index 4dc997f16442..8cf66e9cce14 100644 --- a/pkg/detectors/allsports/allsports.go +++ b/pkg/detectors/allsports/allsports.go @@ -75,5 +75,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/amadeus/amadeus.go b/pkg/detectors/amadeus/amadeus.go index ae788af977af..2742b96ffca0 100644 --- a/pkg/detectors/amadeus/amadeus.go +++ b/pkg/detectors/amadeus/amadeus.go @@ -86,5 +86,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/ambee/ambee.go b/pkg/detectors/ambee/ambee.go index 140d12778886..0b58021a7535 100644 --- a/pkg/detectors/ambee/ambee.go +++ b/pkg/detectors/ambee/ambee.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/amplitudeapikey/amplitudeapikey.go b/pkg/detectors/amplitudeapikey/amplitudeapikey.go index 7d30b00f7233..538c0cda43de 100644 --- a/pkg/detectors/amplitudeapikey/amplitudeapikey.go +++ b/pkg/detectors/amplitudeapikey/amplitudeapikey.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/anypoint/anypoint.go b/pkg/detectors/anypoint/anypoint.go index a669b59ff766..083cb737fd04 100644 --- a/pkg/detectors/anypoint/anypoint.go +++ b/pkg/detectors/anypoint/anypoint.go @@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/apacta/apacta.go b/pkg/detectors/apacta/apacta.go index 9d8d80be7c4a..39880760e6f6 100644 --- a/pkg/detectors/apacta/apacta.go +++ b/pkg/detectors/apacta/apacta.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/api2cart/api2cart.go b/pkg/detectors/api2cart/api2cart.go index 01204a7c1279..f96e4db4dd8b 100644 --- a/pkg/detectors/api2cart/api2cart.go +++ b/pkg/detectors/api2cart/api2cart.go @@ -80,7 +80,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } type Response struct { diff --git a/pkg/detectors/apideck/apideck.go b/pkg/detectors/apideck/apideck.go index 917de9c8797f..6b24bf6e72bb 100644 --- a/pkg/detectors/apideck/apideck.go +++ b/pkg/detectors/apideck/apideck.go @@ -82,5 +82,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/apiflash/apiflash.go b/pkg/detectors/apiflash/apiflash.go index bb8e4653a376..0866fc61cda5 100644 --- a/pkg/detectors/apiflash/apiflash.go +++ b/pkg/detectors/apiflash/apiflash.go @@ -78,5 +78,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/apifonica/apifonica.go b/pkg/detectors/apifonica/apifonica.go index 1d605fb5c5a3..814735613736 100644 --- a/pkg/detectors/apifonica/apifonica.go +++ b/pkg/detectors/apifonica/apifonica.go @@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/apify/apify.go b/pkg/detectors/apify/apify.go index 2a5eb5d23383..82d4af818bf6 100644 --- a/pkg/detectors/apify/apify.go +++ b/pkg/detectors/apify/apify.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/apilayer/apilayer.go b/pkg/detectors/apilayer/apilayer.go index bf86f25eb011..a1b141ecb0d8 100644 --- a/pkg/detectors/apilayer/apilayer.go +++ b/pkg/detectors/apilayer/apilayer.go @@ -2,12 +2,12 @@ package apilayer import ( "context" - "net/http" - "regexp" - "strings" "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "net/http" + "regexp" + "strings" ) type Scanner struct{} @@ -18,7 +18,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"apilayer"}) + `\b([a-zA-Z0-9]{32})\b`) ) @@ -57,7 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) { continue } @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/apimatic/apimatic.go b/pkg/detectors/apimatic/apimatic.go index 2030ed5cd7d3..1707be16621d 100644 --- a/pkg/detectors/apimatic/apimatic.go +++ b/pkg/detectors/apimatic/apimatic.go @@ -82,5 +82,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/apiscience/apiscience.go b/pkg/detectors/apiscience/apiscience.go index 103c9152fdf5..37bed89e5640 100644 --- a/pkg/detectors/apiscience/apiscience.go +++ b/pkg/detectors/apiscience/apiscience.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/apitemplate/apitemplate.go b/pkg/detectors/apitemplate/apitemplate.go index 0876d7d4a349..13687448d336 100644 --- a/pkg/detectors/apitemplate/apitemplate.go +++ b/pkg/detectors/apitemplate/apitemplate.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/apollo/apollo.go b/pkg/detectors/apollo/apollo.go index 51e0d9f1c3d1..fc2c3d73ebbc 100644 --- a/pkg/detectors/apollo/apollo.go +++ b/pkg/detectors/apollo/apollo.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/appcues/appcues.go b/pkg/detectors/appcues/appcues.go index b5f76a5a5757..09695ddeb4a4 100644 --- a/pkg/detectors/appcues/appcues.go +++ b/pkg/detectors/appcues/appcues.go @@ -90,5 +90,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/appfollow/appfollow.go b/pkg/detectors/appfollow/appfollow.go index feb389b1d517..aa6f24c0ff30 100644 --- a/pkg/detectors/appfollow/appfollow.go +++ b/pkg/detectors/appfollow/appfollow.go @@ -73,5 +73,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/appointedd/appointedd.go b/pkg/detectors/appointedd/appointedd.go index 0b6782341950..0e91e2cf7801 100644 --- a/pkg/detectors/appointedd/appointedd.go +++ b/pkg/detectors/appointedd/appointedd.go @@ -74,5 +74,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/appsynergy/appsynergy.go b/pkg/detectors/appsynergy/appsynergy.go index 48a17dc3fa43..582289f6cc45 100644 --- a/pkg/detectors/appsynergy/appsynergy.go +++ b/pkg/detectors/appsynergy/appsynergy.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/apptivo/apptivo.go b/pkg/detectors/apptivo/apptivo.go index 084329433416..02080c952536 100644 --- a/pkg/detectors/apptivo/apptivo.go +++ b/pkg/detectors/apptivo/apptivo.go @@ -89,5 +89,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/artifactory/artifactory.go b/pkg/detectors/artifactory/artifactory.go index 1fe3dc431c49..1938d9f7802f 100644 --- a/pkg/detectors/artifactory/artifactory.go +++ b/pkg/detectors/artifactory/artifactory.go @@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/artsy/artsy.go b/pkg/detectors/artsy/artsy.go index e1249ead1ba7..61d3ab79ebdd 100644 --- a/pkg/detectors/artsy/artsy.go +++ b/pkg/detectors/artsy/artsy.go @@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/asanaoauth/asanaoauth.go b/pkg/detectors/asanaoauth/asanaoauth.go index 26c2203599f8..a44089a9fa67 100644 --- a/pkg/detectors/asanaoauth/asanaoauth.go +++ b/pkg/detectors/asanaoauth/asanaoauth.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/asanapersonalaccesstoken/asanapersonalaccesstoken.go b/pkg/detectors/asanapersonalaccesstoken/asanapersonalaccesstoken.go index 7915cb394deb..e6fbb505e64d 100644 --- a/pkg/detectors/asanapersonalaccesstoken/asanapersonalaccesstoken.go +++ b/pkg/detectors/asanapersonalaccesstoken/asanapersonalaccesstoken.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/assemblyai/assemblyai.go b/pkg/detectors/assemblyai/assemblyai.go index c7e33dba402c..351b7ca726c0 100644 --- a/pkg/detectors/assemblyai/assemblyai.go +++ b/pkg/detectors/assemblyai/assemblyai.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/atera/atera.go b/pkg/detectors/atera/atera.go index 5aff5be413fd..76db38df9793 100644 --- a/pkg/detectors/atera/atera.go +++ b/pkg/detectors/atera/atera.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/audd/audd.go b/pkg/detectors/audd/audd.go index 9cb549e476e3..4ed02a53a8a2 100644 --- a/pkg/detectors/audd/audd.go +++ b/pkg/detectors/audd/audd.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/auth0managementapitoken/auth0managementapitoken.go b/pkg/detectors/auth0managementapitoken/auth0managementapitoken.go index 6abfccbf8da5..13575a00f6e7 100644 --- a/pkg/detectors/auth0managementapitoken/auth0managementapitoken.go +++ b/pkg/detectors/auth0managementapitoken/auth0managementapitoken.go @@ -88,5 +88,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/auth0oauth/auth0oauth.go b/pkg/detectors/auth0oauth/auth0oauth.go index 56af8b69035e..5e6bb80ef98f 100644 --- a/pkg/detectors/auth0oauth/auth0oauth.go +++ b/pkg/detectors/auth0oauth/auth0oauth.go @@ -114,5 +114,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/autodesk/autodesk.go b/pkg/detectors/autodesk/autodesk.go index 40d7203d9264..bbb499959986 100644 --- a/pkg/detectors/autodesk/autodesk.go +++ b/pkg/detectors/autodesk/autodesk.go @@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/autoklose/autoklose.go b/pkg/detectors/autoklose/autoklose.go index 311f3159f7be..aa7b813a4154 100644 --- a/pkg/detectors/autoklose/autoklose.go +++ b/pkg/detectors/autoklose/autoklose.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/autopilot/autopilot.go b/pkg/detectors/autopilot/autopilot.go index f4e82ef68b17..45f7dfb42e34 100644 --- a/pkg/detectors/autopilot/autopilot.go +++ b/pkg/detectors/autopilot/autopilot.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/avazapersonalaccesstoken/avazapersonalaccesstoken.go b/pkg/detectors/avazapersonalaccesstoken/avazapersonalaccesstoken.go index 843eac4fa509..21094fd19e25 100644 --- a/pkg/detectors/avazapersonalaccesstoken/avazapersonalaccesstoken.go +++ b/pkg/detectors/avazapersonalaccesstoken/avazapersonalaccesstoken.go @@ -21,7 +21,7 @@ var ( client = common.SaneHttpClient() // Make sure that your group is surrounded in boundary characters such as below to reduce false positives. - //The number prefix increments for every Personal Access Token created. + // The number prefix increments for every Personal Access Token created. keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"avaza"}) + `\b([0-9]+-[0-9a-f]{40})\b`) ) @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/aviationstack/aviationstack.go b/pkg/detectors/aviationstack/aviationstack.go index 2ed3fc1bf0da..3c2572fe9aad 100644 --- a/pkg/detectors/aviationstack/aviationstack.go +++ b/pkg/detectors/aviationstack/aviationstack.go @@ -72,5 +72,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/axonaut/axonaut.go b/pkg/detectors/axonaut/axonaut.go index 9267af29aff7..975a26c3e3df 100644 --- a/pkg/detectors/axonaut/axonaut.go +++ b/pkg/detectors/axonaut/axonaut.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/aylien/aylien.go b/pkg/detectors/aylien/aylien.go index f8a28b30bb72..761d80c63518 100644 --- a/pkg/detectors/aylien/aylien.go +++ b/pkg/detectors/aylien/aylien.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/ayrshare/ayrshare.go b/pkg/detectors/ayrshare/ayrshare.go index a67ea03b8844..1e5a1579fd96 100644 --- a/pkg/detectors/ayrshare/ayrshare.go +++ b/pkg/detectors/ayrshare/ayrshare.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/azure/azure.go b/pkg/detectors/azure/azure.go index 6b14e798caaf..d784f88b4d8b 100644 --- a/pkg/detectors/azure/azure.go +++ b/pkg/detectors/azure/azure.go @@ -83,5 +83,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/bannerbear/bannerbear.go b/pkg/detectors/bannerbear/bannerbear.go index 79afdd13a835..cfdb1c09a9c0 100644 --- a/pkg/detectors/bannerbear/bannerbear.go +++ b/pkg/detectors/bannerbear/bannerbear.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/baremetrics/baremetrics.go b/pkg/detectors/baremetrics/baremetrics.go index e9065c52b82b..0d42773d8c1e 100644 --- a/pkg/detectors/baremetrics/baremetrics.go +++ b/pkg/detectors/baremetrics/baremetrics.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/baseapiio/baseapiio.go b/pkg/detectors/baseapiio/baseapiio.go index ed8a460700d8..05bf35a7c2f2 100644 --- a/pkg/detectors/baseapiio/baseapiio.go +++ b/pkg/detectors/baseapiio/baseapiio.go @@ -77,5 +77,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/beamer/beamer.go b/pkg/detectors/beamer/beamer.go index b14339508ff4..baf6b052f76d 100644 --- a/pkg/detectors/beamer/beamer.go +++ b/pkg/detectors/beamer/beamer.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/beebole/beebole.go b/pkg/detectors/beebole/beebole.go index c9cd9fe3a7b8..38a09fc86ed9 100644 --- a/pkg/detectors/beebole/beebole.go +++ b/pkg/detectors/beebole/beebole.go @@ -75,5 +75,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/besnappy/besnappy.go b/pkg/detectors/besnappy/besnappy.go index 85c82c536440..60d3aff14536 100644 --- a/pkg/detectors/besnappy/besnappy.go +++ b/pkg/detectors/besnappy/besnappy.go @@ -2,11 +2,11 @@ package besnappy import ( "context" + b64 "encoding/base64" "fmt" "net/http" "regexp" "strings" - b64 "encoding/base64" "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" @@ -21,7 +21,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"besnappy"}) + `\b([a-f0-9]{64})\b`) ) @@ -61,7 +61,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) { continue } @@ -72,5 +72,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/besttime/besttime.go b/pkg/detectors/besttime/besttime.go index 28b7f7e6313d..196a02206512 100644 --- a/pkg/detectors/besttime/besttime.go +++ b/pkg/detectors/besttime/besttime.go @@ -75,5 +75,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/billomat/billomat.go b/pkg/detectors/billomat/billomat.go index 4c40b0598f37..d6c60681c031 100644 --- a/pkg/detectors/billomat/billomat.go +++ b/pkg/detectors/billomat/billomat.go @@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/bitbar/bitbar.go b/pkg/detectors/bitbar/bitbar.go index 2f13ec95226b..97051ddc4395 100644 --- a/pkg/detectors/bitbar/bitbar.go +++ b/pkg/detectors/bitbar/bitbar.go @@ -74,5 +74,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/bitcoinaverage/bitcoinaverage.go b/pkg/detectors/bitcoinaverage/bitcoinaverage.go index 9d5d7691bc2f..677637564fd5 100644 --- a/pkg/detectors/bitcoinaverage/bitcoinaverage.go +++ b/pkg/detectors/bitcoinaverage/bitcoinaverage.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/bitfinex/bitfinex.go b/pkg/detectors/bitfinex/bitfinex.go index 006aadbb663b..f6d7e46205b8 100644 --- a/pkg/detectors/bitfinex/bitfinex.go +++ b/pkg/detectors/bitfinex/bitfinex.go @@ -99,5 +99,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/bitlyaccesstoken/bitlyaccesstoken.go b/pkg/detectors/bitlyaccesstoken/bitlyaccesstoken.go index 4b77101b5c65..def138b28dd6 100644 --- a/pkg/detectors/bitlyaccesstoken/bitlyaccesstoken.go +++ b/pkg/detectors/bitlyaccesstoken/bitlyaccesstoken.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/bitmex/bitmex.go b/pkg/detectors/bitmex/bitmex.go index 94ccaf5792de..6ff8d61ba46f 100644 --- a/pkg/detectors/bitmex/bitmex.go +++ b/pkg/detectors/bitmex/bitmex.go @@ -99,7 +99,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } func getBitmexSignature(timeStamp string, secret string, action string, path string, payload string) string { diff --git a/pkg/detectors/blablabus/blablabus.go b/pkg/detectors/blablabus/blablabus.go index b72619858f59..2b8ba692530c 100644 --- a/pkg/detectors/blablabus/blablabus.go +++ b/pkg/detectors/blablabus/blablabus.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/blazemeter/blazemeter.go b/pkg/detectors/blazemeter/blazemeter.go index 6d5d2d067438..bc9554786beb 100644 --- a/pkg/detectors/blazemeter/blazemeter.go +++ b/pkg/detectors/blazemeter/blazemeter.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/blitapp/blitapp.go b/pkg/detectors/blitapp/blitapp.go index c7e7ebc630fb..fb753b19d0b6 100644 --- a/pkg/detectors/blitapp/blitapp.go +++ b/pkg/detectors/blitapp/blitapp.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/blogger/blogger.go b/pkg/detectors/blogger/blogger.go index 1ade35d41eb4..e702c9417018 100644 --- a/pkg/detectors/blogger/blogger.go +++ b/pkg/detectors/blogger/blogger.go @@ -67,5 +67,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/bombbomb/bombbomb.go b/pkg/detectors/bombbomb/bombbomb.go index 46636b9e814b..8c69677a0b7b 100644 --- a/pkg/detectors/bombbomb/bombbomb.go +++ b/pkg/detectors/bombbomb/bombbomb.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/boostnote/boostnote.go b/pkg/detectors/boostnote/boostnote.go index 16c9a66dc336..3d562c0faf0c 100644 --- a/pkg/detectors/boostnote/boostnote.go +++ b/pkg/detectors/boostnote/boostnote.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/borgbase/borgbase.go b/pkg/detectors/borgbase/borgbase.go index 7e5374e9830c..7d01412a7b2f 100644 --- a/pkg/detectors/borgbase/borgbase.go +++ b/pkg/detectors/borgbase/borgbase.go @@ -85,5 +85,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/braintreepayments/braintreepayments.go b/pkg/detectors/braintreepayments/braintreepayments.go index fd11698f9df2..28a0bff33ac2 100644 --- a/pkg/detectors/braintreepayments/braintreepayments.go +++ b/pkg/detectors/braintreepayments/braintreepayments.go @@ -91,5 +91,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/brandfetch/brandfetch.go b/pkg/detectors/brandfetch/brandfetch.go index 13c454586b1f..4d2e1dec3894 100644 --- a/pkg/detectors/brandfetch/brandfetch.go +++ b/pkg/detectors/brandfetch/brandfetch.go @@ -74,5 +74,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/browserstack/browserstack.go b/pkg/detectors/browserstack/browserstack.go index a43efefd6dc0..82c27c144023 100644 --- a/pkg/detectors/browserstack/browserstack.go +++ b/pkg/detectors/browserstack/browserstack.go @@ -20,8 +20,8 @@ var ( client = common.SaneHttpClient() // Make sure that your group is surrounded in boundary characters such as below to reduce false positives. - keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"browserstack","key","automate","local"}) + `\b([0-9a-zA-Z]{20})\b`) - userPat = regexp.MustCompile(detectors.PrefixRegex([]string{"browserstack","user","automate","local"}) + `\b(^[a-zA-Z\d]+([._-]?[a-zA-Z\d]+)*[a-zA-Z\d]+$)\b`) + keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"browserstack", "key", "automate", "local"}) + `\b([0-9a-zA-Z]{20})\b`) + userPat = regexp.MustCompile(detectors.PrefixRegex([]string{"browserstack", "user", "automate", "local"}) + `\b(^[a-zA-Z\d]+([._-]?[a-zA-Z\d]+)*[a-zA-Z\d]+$)\b`) ) // Keywords are used for efficiently pre-filtering chunks. @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/browshot/browshot.go b/pkg/detectors/browshot/browshot.go index 33f8fe2f68ec..cd9929e656bd 100644 --- a/pkg/detectors/browshot/browshot.go +++ b/pkg/detectors/browshot/browshot.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/buddyns/buddyns.go b/pkg/detectors/buddyns/buddyns.go index a36b5ce7f793..61294471a5be 100644 --- a/pkg/detectors/buddyns/buddyns.go +++ b/pkg/detectors/buddyns/buddyns.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/bugherd/bugherd.go b/pkg/detectors/bugherd/bugherd.go index ee301080f01e..862182a286ff 100644 --- a/pkg/detectors/bugherd/bugherd.go +++ b/pkg/detectors/bugherd/bugherd.go @@ -74,5 +74,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/bugsnag/bugsnag.go b/pkg/detectors/bugsnag/bugsnag.go index 4b9147211d70..ef7bd5ac837d 100644 --- a/pkg/detectors/bugsnag/bugsnag.go +++ b/pkg/detectors/bugsnag/bugsnag.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/buildkite/buildkite.go b/pkg/detectors/buildkite/buildkite.go index 4e6ba7797b77..dd0ebc9b9f90 100644 --- a/pkg/detectors/buildkite/buildkite.go +++ b/pkg/detectors/buildkite/buildkite.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/bulbul/bulbul.go b/pkg/detectors/bulbul/bulbul.go index 1207f323950d..efcbb7531b12 100644 --- a/pkg/detectors/bulbul/bulbul.go +++ b/pkg/detectors/bulbul/bulbul.go @@ -83,5 +83,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/bulksms/bulksms.go b/pkg/detectors/bulksms/bulksms.go index 203e18ee71f1..1c9f113a34b8 100644 --- a/pkg/detectors/bulksms/bulksms.go +++ b/pkg/detectors/bulksms/bulksms.go @@ -83,5 +83,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/buttercms/buttercms.go b/pkg/detectors/buttercms/buttercms.go index 2f114c2861d5..1544cc07691a 100644 --- a/pkg/detectors/buttercms/buttercms.go +++ b/pkg/detectors/buttercms/buttercms.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/caflou/caflou.go b/pkg/detectors/caflou/caflou.go index f61efab61870..57ce456626d6 100644 --- a/pkg/detectors/caflou/caflou.go +++ b/pkg/detectors/caflou/caflou.go @@ -73,5 +73,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/calendarific/calendarific.go b/pkg/detectors/calendarific/calendarific.go index d0e855db9b53..c98a7700a680 100644 --- a/pkg/detectors/calendarific/calendarific.go +++ b/pkg/detectors/calendarific/calendarific.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/calendlyapikey/calendlyapikey.go b/pkg/detectors/calendlyapikey/calendlyapikey.go index ebe3d18541db..b250f77eb434 100644 --- a/pkg/detectors/calendlyapikey/calendlyapikey.go +++ b/pkg/detectors/calendlyapikey/calendlyapikey.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/calorieninja/calorieninja.go b/pkg/detectors/calorieninja/calorieninja.go index c2f06261e927..c87236f5c325 100644 --- a/pkg/detectors/calorieninja/calorieninja.go +++ b/pkg/detectors/calorieninja/calorieninja.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/campayn/campayn.go b/pkg/detectors/campayn/campayn.go index 914d9ac84dcc..92e87e9761a3 100644 --- a/pkg/detectors/campayn/campayn.go +++ b/pkg/detectors/campayn/campayn.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/cannyio/cannyio.go b/pkg/detectors/cannyio/cannyio.go index 4eef48c93a1d..cddb28ce225c 100644 --- a/pkg/detectors/cannyio/cannyio.go +++ b/pkg/detectors/cannyio/cannyio.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/capsulecrm/capsulecrm.go b/pkg/detectors/capsulecrm/capsulecrm.go index 262c0f38cf8b..e92c23bb95cb 100644 --- a/pkg/detectors/capsulecrm/capsulecrm.go +++ b/pkg/detectors/capsulecrm/capsulecrm.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/captaindata/captaindata.go b/pkg/detectors/captaindata/captaindata.go index 8d77f1dfc28d..d062c1a9c963 100644 --- a/pkg/detectors/captaindata/captaindata.go +++ b/pkg/detectors/captaindata/captaindata.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/carboninterface/carboninterface.go b/pkg/detectors/carboninterface/carboninterface.go index ee1e877f1bbb..f5d8af8c8873 100644 --- a/pkg/detectors/carboninterface/carboninterface.go +++ b/pkg/detectors/carboninterface/carboninterface.go @@ -72,5 +72,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/cashboard/cashboard.go b/pkg/detectors/cashboard/cashboard.go index 8c4f8d90bffb..7fb2240e7522 100644 --- a/pkg/detectors/cashboard/cashboard.go +++ b/pkg/detectors/cashboard/cashboard.go @@ -83,5 +83,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/caspio/caspio.go b/pkg/detectors/caspio/caspio.go index 9c97af74180a..191eec00549b 100644 --- a/pkg/detectors/caspio/caspio.go +++ b/pkg/detectors/caspio/caspio.go @@ -92,5 +92,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/censys/censys.go b/pkg/detectors/censys/censys.go index 5a816d9f086f..d6dda21d7427 100644 --- a/pkg/detectors/censys/censys.go +++ b/pkg/detectors/censys/censys.go @@ -78,5 +78,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/centralstationcrm/centralstationcrm.go b/pkg/detectors/centralstationcrm/centralstationcrm.go index f21a11489130..d88b27be3e68 100644 --- a/pkg/detectors/centralstationcrm/centralstationcrm.go +++ b/pkg/detectors/centralstationcrm/centralstationcrm.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/cexio/cexio.go b/pkg/detectors/cexio/cexio.go index 85fa81a04fe5..4db91876b33f 100644 --- a/pkg/detectors/cexio/cexio.go +++ b/pkg/detectors/cexio/cexio.go @@ -127,7 +127,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } type Response struct { diff --git a/pkg/detectors/chartmogul/chartmogul.go b/pkg/detectors/chartmogul/chartmogul.go index d0d284a39fa2..3eafb635026f 100644 --- a/pkg/detectors/chartmogul/chartmogul.go +++ b/pkg/detectors/chartmogul/chartmogul.go @@ -73,5 +73,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/chatbot/chatbot.go b/pkg/detectors/chatbot/chatbot.go index 59cd72544edc..385460ea867f 100644 --- a/pkg/detectors/chatbot/chatbot.go +++ b/pkg/detectors/chatbot/chatbot.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/chatfule/chatfule.go b/pkg/detectors/chatfule/chatfule.go index d9112765945d..eceeaf640dc6 100644 --- a/pkg/detectors/chatfule/chatfule.go +++ b/pkg/detectors/chatfule/chatfule.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/checio/checio.go b/pkg/detectors/checio/checio.go index 9ff6874d1144..5b322db29ec8 100644 --- a/pkg/detectors/checio/checio.go +++ b/pkg/detectors/checio/checio.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/checklyhq/checklyhq.go b/pkg/detectors/checklyhq/checklyhq.go index 8ffdc28ca405..40b2479ccc69 100644 --- a/pkg/detectors/checklyhq/checklyhq.go +++ b/pkg/detectors/checklyhq/checklyhq.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/checkout/checkout.go b/pkg/detectors/checkout/checkout.go index 6d12f1fa2752..170f058316cd 100644 --- a/pkg/detectors/checkout/checkout.go +++ b/pkg/detectors/checkout/checkout.go @@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/checkvist/checkvist.go b/pkg/detectors/checkvist/checkvist.go index f50ae66c22a9..9a6181dc60f5 100644 --- a/pkg/detectors/checkvist/checkvist.go +++ b/pkg/detectors/checkvist/checkvist.go @@ -85,5 +85,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/cicero/cicero.go b/pkg/detectors/cicero/cicero.go index d459ddc5219d..6968e4a7b825 100644 --- a/pkg/detectors/cicero/cicero.go +++ b/pkg/detectors/cicero/cicero.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/clarifai/clarifai.go b/pkg/detectors/clarifai/clarifai.go index 4f53df5fa6d4..d0e5d259968d 100644 --- a/pkg/detectors/clarifai/clarifai.go +++ b/pkg/detectors/clarifai/clarifai.go @@ -86,5 +86,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/clearbit/clearbit.go b/pkg/detectors/clearbit/clearbit.go index 8cc45ca16c56..b1076b74f995 100644 --- a/pkg/detectors/clearbit/clearbit.go +++ b/pkg/detectors/clearbit/clearbit.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/clickhelp/clickhelp.go b/pkg/detectors/clickhelp/clickhelp.go index d9ebaa1f50de..d2b03f296893 100644 --- a/pkg/detectors/clickhelp/clickhelp.go +++ b/pkg/detectors/clickhelp/clickhelp.go @@ -92,5 +92,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/clicksendsms/clicksendsms.go b/pkg/detectors/clicksendsms/clicksendsms.go index 4bd5f597311b..a19c9fe4e364 100644 --- a/pkg/detectors/clicksendsms/clicksendsms.go +++ b/pkg/detectors/clicksendsms/clicksendsms.go @@ -83,5 +83,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/clickuppersonaltoken/clickuppersonaltoken.go b/pkg/detectors/clickuppersonaltoken/clickuppersonaltoken.go index a7a5df90b835..5370b8f701b4 100644 --- a/pkg/detectors/clickuppersonaltoken/clickuppersonaltoken.go +++ b/pkg/detectors/clickuppersonaltoken/clickuppersonaltoken.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/cliengo/cliengo.go b/pkg/detectors/cliengo/cliengo.go index 06bb93a1c0ca..23ab0a908ee4 100644 --- a/pkg/detectors/cliengo/cliengo.go +++ b/pkg/detectors/cliengo/cliengo.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/clinchpad/clinchpad.go b/pkg/detectors/clinchpad/clinchpad.go index 72d774f76ae7..02707d6993a2 100644 --- a/pkg/detectors/clinchpad/clinchpad.go +++ b/pkg/detectors/clinchpad/clinchpad.go @@ -73,5 +73,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/clockify/clockify.go b/pkg/detectors/clockify/clockify.go index 6d332e193a8d..dd8679fe9ba0 100644 --- a/pkg/detectors/clockify/clockify.go +++ b/pkg/detectors/clockify/clockify.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/clockworksms/clockworksms.go b/pkg/detectors/clockworksms/clockworksms.go index 84763da53935..6427d855df2d 100644 --- a/pkg/detectors/clockworksms/clockworksms.go +++ b/pkg/detectors/clockworksms/clockworksms.go @@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/closecrm/close.go b/pkg/detectors/closecrm/close.go index 3cbc6f7d211e..549be399b786 100644 --- a/pkg/detectors/closecrm/close.go +++ b/pkg/detectors/closecrm/close.go @@ -74,5 +74,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/cloudconvert/cloudconvert.go b/pkg/detectors/cloudconvert/cloudconvert.go index 16f0f83304ce..5575a184bbcd 100644 --- a/pkg/detectors/cloudconvert/cloudconvert.go +++ b/pkg/detectors/cloudconvert/cloudconvert.go @@ -20,7 +20,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"cloudconvert"}) + common.BuildRegexJWT("30,34", "200,500", "600,700")) ) @@ -59,7 +59,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, 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,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/cloudelements/cloudelements.go b/pkg/detectors/cloudelements/cloudelements.go index dcd066cb70ab..1ac83f6fb28a 100644 --- a/pkg/detectors/cloudelements/cloudelements.go +++ b/pkg/detectors/cloudelements/cloudelements.go @@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/cloudflareapitoken/cloudflareapitoken.go b/pkg/detectors/cloudflareapitoken/cloudflareapitoken.go index 365feabc67e8..9358f5d3553b 100644 --- a/pkg/detectors/cloudflareapitoken/cloudflareapitoken.go +++ b/pkg/detectors/cloudflareapitoken/cloudflareapitoken.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/cloudflarecakey/cloudflarecakey.go b/pkg/detectors/cloudflarecakey/cloudflarecakey.go index 75d3bdea87ff..e7db953ef3a2 100644 --- a/pkg/detectors/cloudflarecakey/cloudflarecakey.go +++ b/pkg/detectors/cloudflarecakey/cloudflarecakey.go @@ -73,5 +73,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/cloudflareglobalapikey/cloudflareglobalapikey.go b/pkg/detectors/cloudflareglobalapikey/cloudflareglobalapikey.go index 23fbb1e50870..4f14796de2ab 100644 --- a/pkg/detectors/cloudflareglobalapikey/cloudflareglobalapikey.go +++ b/pkg/detectors/cloudflareglobalapikey/cloudflareglobalapikey.go @@ -85,5 +85,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/cloudimage/cloudimage.go b/pkg/detectors/cloudimage/cloudimage.go index 3df903f63915..948e979e1d82 100644 --- a/pkg/detectors/cloudimage/cloudimage.go +++ b/pkg/detectors/cloudimage/cloudimage.go @@ -75,5 +75,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/cloudmersive/cloudmersive.go b/pkg/detectors/cloudmersive/cloudmersive.go index b2441250df93..8687e2f1619a 100644 --- a/pkg/detectors/cloudmersive/cloudmersive.go +++ b/pkg/detectors/cloudmersive/cloudmersive.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/cloudplan/cloudplan.go b/pkg/detectors/cloudplan/cloudplan.go index b28a41e72f0b..8be944638620 100644 --- a/pkg/detectors/cloudplan/cloudplan.go +++ b/pkg/detectors/cloudplan/cloudplan.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/cloudsmith/cloudsmith.go b/pkg/detectors/cloudsmith/cloudsmith.go index 5b799b86590c..f3499aabaa6a 100644 --- a/pkg/detectors/cloudsmith/cloudsmith.go +++ b/pkg/detectors/cloudsmith/cloudsmith.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/cloverly/cloverly.go b/pkg/detectors/cloverly/cloverly.go index 80421e5b2ec4..e7cfff9322b0 100644 --- a/pkg/detectors/cloverly/cloverly.go +++ b/pkg/detectors/cloverly/cloverly.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/cloze/cloze.go b/pkg/detectors/cloze/cloze.go index 215b788cc388..c87d7716a3d0 100644 --- a/pkg/detectors/cloze/cloze.go +++ b/pkg/detectors/cloze/cloze.go @@ -84,5 +84,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/clustdoc/clustdoc.go b/pkg/detectors/clustdoc/clustdoc.go index def8bf563581..58e76957d0d9 100644 --- a/pkg/detectors/clustdoc/clustdoc.go +++ b/pkg/detectors/clustdoc/clustdoc.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/codacy/codacy.go b/pkg/detectors/codacy/codacy.go index 01c7643d41fe..fc3d64139056 100644 --- a/pkg/detectors/codacy/codacy.go +++ b/pkg/detectors/codacy/codacy.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/codeclimate/codeclimate.go b/pkg/detectors/codeclimate/codeclimate.go index 5106a968ad9a..dad7789894c3 100644 --- a/pkg/detectors/codeclimate/codeclimate.go +++ b/pkg/detectors/codeclimate/codeclimate.go @@ -2,13 +2,13 @@ package codeclimate import ( "context" - "net/http" - "regexp" - "strings" -"fmt" + "fmt" "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "net/http" + "regexp" + "strings" ) type Scanner struct{} @@ -19,7 +19,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"codeclimate"}) + `\b([a-f0-9]{40})\b`) ) @@ -59,7 +59,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, 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,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/codemagic/codemagic.go b/pkg/detectors/codemagic/codemagic.go index ae7d945f2792..bb7fbe71ed5a 100644 --- a/pkg/detectors/codemagic/codemagic.go +++ b/pkg/detectors/codemagic/codemagic.go @@ -19,7 +19,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"codemagic"}) + common.BuildRegex(common.AlphaNumPattern, "_", 43)) ) @@ -59,7 +59,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, 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,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/codequiry/codequiry.go b/pkg/detectors/codequiry/codequiry.go index ddd2f693cf27..b1afeee746af 100644 --- a/pkg/detectors/codequiry/codequiry.go +++ b/pkg/detectors/codequiry/codequiry.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/coinapi/coinapi.go b/pkg/detectors/coinapi/coinapi.go index 6e3f34f530ca..89fa3ebf3c88 100644 --- a/pkg/detectors/coinapi/coinapi.go +++ b/pkg/detectors/coinapi/coinapi.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/coinbase/coinbase.go b/pkg/detectors/coinbase/coinbase.go index 0ac4fbe5d06d..b7ce1d3606d9 100644 --- a/pkg/detectors/coinbase/coinbase.go +++ b/pkg/detectors/coinbase/coinbase.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/coinlayer/coinlayer.go b/pkg/detectors/coinlayer/coinlayer.go index 47623dd25243..1c0c5469908d 100644 --- a/pkg/detectors/coinlayer/coinlayer.go +++ b/pkg/detectors/coinlayer/coinlayer.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/coinlib/coinlib.go b/pkg/detectors/coinlib/coinlib.go index 2c2dce67d462..4b65e6dc9a27 100644 --- a/pkg/detectors/coinlib/coinlib.go +++ b/pkg/detectors/coinlib/coinlib.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/collect2/collect2.go b/pkg/detectors/collect2/collect2.go index c2667b568f21..501b39a88a36 100644 --- a/pkg/detectors/collect2/collect2.go +++ b/pkg/detectors/collect2/collect2.go @@ -20,7 +20,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"collect2"}) + `\b([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\b`) ) @@ -59,7 +59,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, 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,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/column/column.go b/pkg/detectors/column/column.go index e54bf3557836..920be082277a 100644 --- a/pkg/detectors/column/column.go +++ b/pkg/detectors/column/column.go @@ -55,7 +55,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if err != nil { continue } - //req.SetBasicAuth(resMatch, "") + // req.SetBasicAuth(resMatch, "") req.Header.Add("Authorization", fmt.Sprintf("Basic %s", base64.StdEncoding.EncodeToString([]byte(resMatch)))) res, err := client.Do(req) if err == nil { @@ -75,5 +75,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/commercejs/commercejs.go b/pkg/detectors/commercejs/commercejs.go index afb0018eee36..78de42832533 100644 --- a/pkg/detectors/commercejs/commercejs.go +++ b/pkg/detectors/commercejs/commercejs.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/commodities/commodities.go b/pkg/detectors/commodities/commodities.go index 6f4a8285f27e..fcf58d216235 100644 --- a/pkg/detectors/commodities/commodities.go +++ b/pkg/detectors/commodities/commodities.go @@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/companyhub/companyhub.go b/pkg/detectors/companyhub/companyhub.go index 2fa8e3f99156..28e2a7c24cb9 100644 --- a/pkg/detectors/companyhub/companyhub.go +++ b/pkg/detectors/companyhub/companyhub.go @@ -82,5 +82,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/confluent/confluent.go b/pkg/detectors/confluent/confluent.go index 685f08811526..56d42d93cc95 100644 --- a/pkg/detectors/confluent/confluent.go +++ b/pkg/detectors/confluent/confluent.go @@ -84,5 +84,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/contentfulpersonalaccesstoken/contentfulpersonalaccesstoken.go b/pkg/detectors/contentfulpersonalaccesstoken/contentfulpersonalaccesstoken.go index 91941d2509b5..0226c91325f2 100644 --- a/pkg/detectors/contentfulpersonalaccesstoken/contentfulpersonalaccesstoken.go +++ b/pkg/detectors/contentfulpersonalaccesstoken/contentfulpersonalaccesstoken.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/conversiontools/conversiontools.go b/pkg/detectors/conversiontools/conversiontools.go index 84c51e8d6b2f..4dcd83ed4fbb 100644 --- a/pkg/detectors/conversiontools/conversiontools.go +++ b/pkg/detectors/conversiontools/conversiontools.go @@ -72,5 +72,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/convertapi/convertapi.go b/pkg/detectors/convertapi/convertapi.go index f26eaf517f19..9dc1ef118ca1 100644 --- a/pkg/detectors/convertapi/convertapi.go +++ b/pkg/detectors/convertapi/convertapi.go @@ -20,7 +20,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"convertapi"}) + `\b([0-9a-zA-Z]{16})\b`) ) @@ -58,7 +58,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) { continue } @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/convertkit/convertkit.go b/pkg/detectors/convertkit/convertkit.go index 90a3cdf1a471..94c56c8e0504 100644 --- a/pkg/detectors/convertkit/convertkit.go +++ b/pkg/detectors/convertkit/convertkit.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/convier/convier.go b/pkg/detectors/convier/convier.go index c4ce78f8fbd2..d8cbd71fb786 100644 --- a/pkg/detectors/convier/convier.go +++ b/pkg/detectors/convier/convier.go @@ -84,5 +84,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/copper/copper.go b/pkg/detectors/copper/copper.go index 054a42b75893..e38d3e7b2477 100644 --- a/pkg/detectors/copper/copper.go +++ b/pkg/detectors/copper/copper.go @@ -88,5 +88,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/countrylayer/countrylayer.go b/pkg/detectors/countrylayer/countrylayer.go index 2ab26348b699..0be12aec508d 100644 --- a/pkg/detectors/countrylayer/countrylayer.go +++ b/pkg/detectors/countrylayer/countrylayer.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/courier/courier.go b/pkg/detectors/courier/courier.go index c25bb98ad379..b60f0052219d 100644 --- a/pkg/detectors/courier/courier.go +++ b/pkg/detectors/courier/courier.go @@ -66,5 +66,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/coveralls/coveralls.go b/pkg/detectors/coveralls/coveralls.go index 49b1aff0c7dc..c845d1127d9a 100644 --- a/pkg/detectors/coveralls/coveralls.go +++ b/pkg/detectors/coveralls/coveralls.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/craftmypdf/craftmypdf.go b/pkg/detectors/craftmypdf/craftmypdf.go index 6cd7336e7231..54511ec5386a 100644 --- a/pkg/detectors/craftmypdf/craftmypdf.go +++ b/pkg/detectors/craftmypdf/craftmypdf.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/crossbrowsertesting/crossbrowsertesting.go b/pkg/detectors/crossbrowsertesting/crossbrowsertesting.go index c6b12f40f9c2..53337bf3cd38 100644 --- a/pkg/detectors/crossbrowsertesting/crossbrowsertesting.go +++ b/pkg/detectors/crossbrowsertesting/crossbrowsertesting.go @@ -78,5 +78,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/crowdin/crowdin.go b/pkg/detectors/crowdin/crowdin.go index 82abb7b12387..97e3bfbb3edc 100644 --- a/pkg/detectors/crowdin/crowdin.go +++ b/pkg/detectors/crowdin/crowdin.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/cryptocompare/cryptocompare.go b/pkg/detectors/cryptocompare/cryptocompare.go index 65f952d0cb15..82b278b41c8b 100644 --- a/pkg/detectors/cryptocompare/cryptocompare.go +++ b/pkg/detectors/cryptocompare/cryptocompare.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/currencycloud/currencycloud.go b/pkg/detectors/currencycloud/currencycloud.go index d13710559421..46db8e0cd63f 100644 --- a/pkg/detectors/currencycloud/currencycloud.go +++ b/pkg/detectors/currencycloud/currencycloud.go @@ -85,5 +85,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/currencyfreaks/currencyfreaks.go b/pkg/detectors/currencyfreaks/currencyfreaks.go index ad2d300dca84..474323400d83 100644 --- a/pkg/detectors/currencyfreaks/currencyfreaks.go +++ b/pkg/detectors/currencyfreaks/currencyfreaks.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/currencylayer/currencylayer.go b/pkg/detectors/currencylayer/currencylayer.go index eb339a913667..bb4ac2b5b539 100644 --- a/pkg/detectors/currencylayer/currencylayer.go +++ b/pkg/detectors/currencylayer/currencylayer.go @@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/currencyscoop/currencyscoop.go b/pkg/detectors/currencyscoop/currencyscoop.go index 151098729385..a2f87364026a 100644 --- a/pkg/detectors/currencyscoop/currencyscoop.go +++ b/pkg/detectors/currencyscoop/currencyscoop.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/currentsapi/currentsapi.go b/pkg/detectors/currentsapi/currentsapi.go index 9126cef9cc25..81be4a702f2c 100644 --- a/pkg/detectors/currentsapi/currentsapi.go +++ b/pkg/detectors/currentsapi/currentsapi.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/customerguru/customerguru.go b/pkg/detectors/customerguru/customerguru.go index 51c3e6a75d9c..e47ba1e0ae08 100644 --- a/pkg/detectors/customerguru/customerguru.go +++ b/pkg/detectors/customerguru/customerguru.go @@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/customerio/customerio.go b/pkg/detectors/customerio/customerio.go index 3dfd173f29a1..b0ce152adc72 100644 --- a/pkg/detectors/customerio/customerio.go +++ b/pkg/detectors/customerio/customerio.go @@ -86,5 +86,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/d7network/d7network.go b/pkg/detectors/d7network/d7network.go index 839bbcef059a..c567fbc6bc2f 100644 --- a/pkg/detectors/d7network/d7network.go +++ b/pkg/detectors/d7network/d7network.go @@ -66,5 +66,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/dailyco/dailyco.go b/pkg/detectors/dailyco/dailyco.go index 5a0e80c8708d..3dd8a8de52fc 100644 --- a/pkg/detectors/dailyco/dailyco.go +++ b/pkg/detectors/dailyco/dailyco.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/dandelion/dandelion.go b/pkg/detectors/dandelion/dandelion.go index dec310281d4d..aedbecb76054 100644 --- a/pkg/detectors/dandelion/dandelion.go +++ b/pkg/detectors/dandelion/dandelion.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/dareboost/dareboost.go b/pkg/detectors/dareboost/dareboost.go index 14162ba75f5a..cda9fe18a42b 100644 --- a/pkg/detectors/dareboost/dareboost.go +++ b/pkg/detectors/dareboost/dareboost.go @@ -84,5 +84,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/databox/databox.go b/pkg/detectors/databox/databox.go index a6d0eb426dea..c310cb7e149f 100644 --- a/pkg/detectors/databox/databox.go +++ b/pkg/detectors/databox/databox.go @@ -21,7 +21,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"databox"}) + common.BuildRegex(common.RegexPattern, "", 21)) ) @@ -72,7 +72,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) { continue } @@ -83,5 +83,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/datadogtoken/datadogtoken.go b/pkg/detectors/datadogtoken/datadogtoken.go index 962371923742..be8624cac683 100644 --- a/pkg/detectors/datadogtoken/datadogtoken.go +++ b/pkg/detectors/datadogtoken/datadogtoken.go @@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/datafire/datafire.go b/pkg/detectors/datafire/datafire.go index a39ed3009f39..88188999909a 100644 --- a/pkg/detectors/datafire/datafire.go +++ b/pkg/detectors/datafire/datafire.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/datagov/datagov.go b/pkg/detectors/datagov/datagov.go index 1b8b27636cbd..f36e9a4146a1 100644 --- a/pkg/detectors/datagov/datagov.go +++ b/pkg/detectors/datagov/datagov.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/debounce/debounce.go b/pkg/detectors/debounce/debounce.go index c0cf2b73183f..95c2dbdebd70 100644 --- a/pkg/detectors/debounce/debounce.go +++ b/pkg/detectors/debounce/debounce.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/deepai/deepai.go b/pkg/detectors/deepai/deepai.go index 376660b8b277..7a38317c5904 100644 --- a/pkg/detectors/deepai/deepai.go +++ b/pkg/detectors/deepai/deepai.go @@ -84,5 +84,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/deepgram/deepgram.go b/pkg/detectors/deepgram/deepgram.go index 8107ce3f48a0..2280e8f99460 100644 --- a/pkg/detectors/deepgram/deepgram.go +++ b/pkg/detectors/deepgram/deepgram.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/delighted/delighted.go b/pkg/detectors/delighted/delighted.go index 5c7d13ae61d3..4c49e8a8f51b 100644 --- a/pkg/detectors/delighted/delighted.go +++ b/pkg/detectors/delighted/delighted.go @@ -78,5 +78,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/demio/demio.go b/pkg/detectors/demio/demio.go index 6ca8aa61e025..86e2a4cc1e2d 100644 --- a/pkg/detectors/demio/demio.go +++ b/pkg/detectors/demio/demio.go @@ -2,13 +2,13 @@ package demio import ( "context" - "net/http" - "regexp" - "strings" "fmt" "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "net/http" + "regexp" + "strings" ) type Scanner struct{} @@ -19,10 +19,9 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives - keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"demio"}) + `\b([a-z0-9A-Z]{32})\b`) + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives + keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"demio"}) + `\b([a-z0-9A-Z]{32})\b`) secretPat = regexp.MustCompile(detectors.PrefixRegex([]string{"demio"}) + `\b([a-z0-9A-Z]{10,20})\b`) - ) // Keywords are used for efficiently pre-filtering chunks. @@ -52,9 +51,9 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result DetectorType: detectorspb.DetectorType_Demio, Raw: []byte(resMatch), } - + if verify { - url := fmt.Sprintf("https://my.demio.com/api/v1/ping/query?api_key=%s&api_secret=%s",resMatch,resIdMatch) + url := fmt.Sprintf("https://my.demio.com/api/v1/ping/query?api_key=%s&api_secret=%s", resMatch, resIdMatch) req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { continue @@ -65,18 +64,18 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, 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 detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/deputy/deputy.go b/pkg/detectors/deputy/deputy.go index aa87dd9584c3..815175a57dc8 100644 --- a/pkg/detectors/deputy/deputy.go +++ b/pkg/detectors/deputy/deputy.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/detectify/detectify.go b/pkg/detectors/detectify/detectify.go index d2502b5bd1d0..4a8b9d0945d1 100644 --- a/pkg/detectors/detectify/detectify.go +++ b/pkg/detectors/detectify/detectify.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/detectlanguage/detectlanguage.go b/pkg/detectors/detectlanguage/detectlanguage.go index 15dcb788af01..71a5ca44664b 100644 --- a/pkg/detectors/detectlanguage/detectlanguage.go +++ b/pkg/detectors/detectlanguage/detectlanguage.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/detectors.go b/pkg/detectors/detectors.go index eced5903cdc7..478767121f59 100644 --- a/pkg/detectors/detectors.go +++ b/pkg/detectors/detectors.go @@ -64,33 +64,6 @@ func CopyMetadata(chunk *sources.Chunk, result Result) ResultWithMetadata { } } -// CleanResults returns all verified secrets, and if there are no verified secrets, -// just one unverified secret if there are any. -func CleanResults(results []Result) []Result { - if len(results) == 0 { - return results - } - - var cleaned = make(map[string]Result, 0) - - for _, s := range results { - if s.Verified { - cleaned[s.Redacted] = s - } - } - - if len(cleaned) == 0 { - return results[:1] - } - - results = results[:0] - for _, r := range cleaned { - results = append(results, r) - } - - return results -} - // PrefixRegex ensures that at least one of the given keywords is within // 20 characters of the capturing group that follows. // This can help prevent false positives. diff --git a/pkg/detectors/dfuse/dfuse.go b/pkg/detectors/dfuse/dfuse.go index 0011535eab03..6f2b19da9a86 100644 --- a/pkg/detectors/dfuse/dfuse.go +++ b/pkg/detectors/dfuse/dfuse.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/diffbot/diffbot.go b/pkg/detectors/diffbot/diffbot.go index 1ae1e9d7d569..cca0f4145fd8 100644 --- a/pkg/detectors/diffbot/diffbot.go +++ b/pkg/detectors/diffbot/diffbot.go @@ -82,5 +82,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/diggernaut/diggernaut.go b/pkg/detectors/diggernaut/diggernaut.go index 5311f519f9ca..adc7d1fc1597 100644 --- a/pkg/detectors/diggernaut/diggernaut.go +++ b/pkg/detectors/diggernaut/diggernaut.go @@ -20,7 +20,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"diggernaut"}) + `\b([0-9a-z]{40})\b`) ) @@ -60,7 +60,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) { continue } @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/digitaloceantoken/digitaloceantoken.go b/pkg/detectors/digitaloceantoken/digitaloceantoken.go index c31232aa7629..c34ad65af6e3 100644 --- a/pkg/detectors/digitaloceantoken/digitaloceantoken.go +++ b/pkg/detectors/digitaloceantoken/digitaloceantoken.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/digitaloceanv2/digitaloceanv2.go b/pkg/detectors/digitaloceanv2/digitaloceanv2.go index daba6ad9ed41..8a2e83087b72 100644 --- a/pkg/detectors/digitaloceanv2/digitaloceanv2.go +++ b/pkg/detectors/digitaloceanv2/digitaloceanv2.go @@ -102,5 +102,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/discordbottoken/discordbottoken.go b/pkg/detectors/discordbottoken/discordbottoken.go index b3d2390a46f4..201b79bf309d 100644 --- a/pkg/detectors/discordbottoken/discordbottoken.go +++ b/pkg/detectors/discordbottoken/discordbottoken.go @@ -78,5 +78,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/discordwebhook/discordwebhook.go b/pkg/detectors/discordwebhook/discordwebhook.go index 809168266ae3..5b32e704625f 100644 --- a/pkg/detectors/discordwebhook/discordwebhook.go +++ b/pkg/detectors/discordwebhook/discordwebhook.go @@ -63,5 +63,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/disqus/disqus.go b/pkg/detectors/disqus/disqus.go index 5f869da527da..9d21072cf555 100644 --- a/pkg/detectors/disqus/disqus.go +++ b/pkg/detectors/disqus/disqus.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/ditto/ditto.go b/pkg/detectors/ditto/ditto.go index 089be1fa2f1e..99cb1712ff86 100644 --- a/pkg/detectors/ditto/ditto.go +++ b/pkg/detectors/ditto/ditto.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/dnscheck/dnscheck.go b/pkg/detectors/dnscheck/dnscheck.go index dbbd9f3d3f13..51a80cea5543 100644 --- a/pkg/detectors/dnscheck/dnscheck.go +++ b/pkg/detectors/dnscheck/dnscheck.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/docparser/docparser.go b/pkg/detectors/docparser/docparser.go index 595dff59a4fc..931b9db0a6aa 100644 --- a/pkg/detectors/docparser/docparser.go +++ b/pkg/detectors/docparser/docparser.go @@ -20,7 +20,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"docparser"}) + `\b([a-f0-9]{40})\b`) ) @@ -60,7 +60,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) { continue } @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/documo/documo.go b/pkg/detectors/documo/documo.go index 86ae5cfe4e6f..8887501c13ca 100644 --- a/pkg/detectors/documo/documo.go +++ b/pkg/detectors/documo/documo.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/doppler/doppler.go b/pkg/detectors/doppler/doppler.go index b55b0fc7cf90..dabe13d54936 100644 --- a/pkg/detectors/doppler/doppler.go +++ b/pkg/detectors/doppler/doppler.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/dotmailer/dotmailer.go b/pkg/detectors/dotmailer/dotmailer.go index 225f1ad311c5..71384177c510 100644 --- a/pkg/detectors/dotmailer/dotmailer.go +++ b/pkg/detectors/dotmailer/dotmailer.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/dovico/dovico.go b/pkg/detectors/dovico/dovico.go index 94cb8d3a852d..6e4124108f41 100644 --- a/pkg/detectors/dovico/dovico.go +++ b/pkg/detectors/dovico/dovico.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/dronahq/dronahq.go b/pkg/detectors/dronahq/dronahq.go index 74686bd14c02..8113b2a9257b 100644 --- a/pkg/detectors/dronahq/dronahq.go +++ b/pkg/detectors/dronahq/dronahq.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/droneci/droneci.go b/pkg/detectors/droneci/droneci.go index cec6c5208813..b9d1df6da67f 100644 --- a/pkg/detectors/droneci/droneci.go +++ b/pkg/detectors/droneci/droneci.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/duply/duply.go b/pkg/detectors/duply/duply.go index 52612f9f4976..ec4bcaed4c87 100644 --- a/pkg/detectors/duply/duply.go +++ b/pkg/detectors/duply/duply.go @@ -20,7 +20,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"duply"}) + `\b([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\b`) idPat = regexp.MustCompile(detectors.PrefixRegex([]string{"duply"}) + `\b([0-9A-Z]{7}-[0-9A-Z]{7}-[0-9A-Z]{7}-[0-9A-Z]{7})\b`) ) @@ -71,7 +71,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) { continue } @@ -83,5 +83,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/dwolla/dwolla.go b/pkg/detectors/dwolla/dwolla.go index 81059b372f89..5d2dd88dc7fb 100644 --- a/pkg/detectors/dwolla/dwolla.go +++ b/pkg/detectors/dwolla/dwolla.go @@ -89,5 +89,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/dynalist/dynalist.go b/pkg/detectors/dynalist/dynalist.go index b84c19b02066..6343dc09925b 100644 --- a/pkg/detectors/dynalist/dynalist.go +++ b/pkg/detectors/dynalist/dynalist.go @@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/dyspatch/dyspatch.go b/pkg/detectors/dyspatch/dyspatch.go index 949e67653f8a..41bd1141b94e 100644 --- a/pkg/detectors/dyspatch/dyspatch.go +++ b/pkg/detectors/dyspatch/dyspatch.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/eagleeyenetworks/eagleeyenetworks.go b/pkg/detectors/eagleeyenetworks/eagleeyenetworks.go index c5121278f97d..3d661da40e1c 100644 --- a/pkg/detectors/eagleeyenetworks/eagleeyenetworks.go +++ b/pkg/detectors/eagleeyenetworks/eagleeyenetworks.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/easyinsight/easyinsight.go b/pkg/detectors/easyinsight/easyinsight.go index f60b02718457..e789feacb121 100644 --- a/pkg/detectors/easyinsight/easyinsight.go +++ b/pkg/detectors/easyinsight/easyinsight.go @@ -86,5 +86,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/ecostruxureit/ecostruxureit.go b/pkg/detectors/ecostruxureit/ecostruxureit.go index 454ff000aa03..b33c4ae69131 100644 --- a/pkg/detectors/ecostruxureit/ecostruxureit.go +++ b/pkg/detectors/ecostruxureit/ecostruxureit.go @@ -20,7 +20,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"ecostruxureit"}) + `\b(AK1[0-9a-zA-Z\/]{50,55})\b`) ) @@ -60,7 +60,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) { continue } @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/edamam/edamam.go b/pkg/detectors/edamam/edamam.go index f2ccc3d5b557..9fd5394059fd 100644 --- a/pkg/detectors/edamam/edamam.go +++ b/pkg/detectors/edamam/edamam.go @@ -78,5 +78,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/edenai/edenai.go b/pkg/detectors/edenai/edenai.go index 12d9db146a0c..b2f360b669cc 100644 --- a/pkg/detectors/edenai/edenai.go +++ b/pkg/detectors/edenai/edenai.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/eightxeight/eightxeight.go b/pkg/detectors/eightxeight/eightxeight.go index ffbd6fa164b0..3d53ede5275d 100644 --- a/pkg/detectors/eightxeight/eightxeight.go +++ b/pkg/detectors/eightxeight/eightxeight.go @@ -85,5 +85,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/elasticemail/elasticemail.go b/pkg/detectors/elasticemail/elasticemail.go index e392fdb7ab74..778e50a6e0d3 100644 --- a/pkg/detectors/elasticemail/elasticemail.go +++ b/pkg/detectors/elasticemail/elasticemail.go @@ -75,5 +75,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/enablex/enablex.go b/pkg/detectors/enablex/enablex.go index 3c800d4fec29..6992f59137fc 100644 --- a/pkg/detectors/enablex/enablex.go +++ b/pkg/detectors/enablex/enablex.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/enigma/enigma.go b/pkg/detectors/enigma/enigma.go index 160d31ed1c27..912d0c6d5868 100644 --- a/pkg/detectors/enigma/enigma.go +++ b/pkg/detectors/enigma/enigma.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/ethplorer/ethplorer.go b/pkg/detectors/ethplorer/ethplorer.go index 7a899a3904b6..5d757c5f7df3 100644 --- a/pkg/detectors/ethplorer/ethplorer.go +++ b/pkg/detectors/ethplorer/ethplorer.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/etsyapikey/etsyapikey.go b/pkg/detectors/etsyapikey/etsyapikey.go index 8a5f85e25342..3fd8e6d7527b 100644 --- a/pkg/detectors/etsyapikey/etsyapikey.go +++ b/pkg/detectors/etsyapikey/etsyapikey.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/everhour/everhour.go b/pkg/detectors/everhour/everhour.go index 827d63ad89cd..dce45ee0b959 100644 --- a/pkg/detectors/everhour/everhour.go +++ b/pkg/detectors/everhour/everhour.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/exchangerateapi/exchangerateapi.go b/pkg/detectors/exchangerateapi/exchangerateapi.go index 4ea1d3affe1a..313a4074c533 100644 --- a/pkg/detectors/exchangerateapi/exchangerateapi.go +++ b/pkg/detectors/exchangerateapi/exchangerateapi.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/exchangeratesapi/exchangeratesapi.go b/pkg/detectors/exchangeratesapi/exchangeratesapi.go index da8005cc6368..f5f7866e24b4 100644 --- a/pkg/detectors/exchangeratesapi/exchangeratesapi.go +++ b/pkg/detectors/exchangeratesapi/exchangeratesapi.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/exportsdk/exportsdk.go b/pkg/detectors/exportsdk/exportsdk.go index 35debc893304..1241908ffd2e 100644 --- a/pkg/detectors/exportsdk/exportsdk.go +++ b/pkg/detectors/exportsdk/exportsdk.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/extractorapi/extractorapi.go b/pkg/detectors/extractorapi/extractorapi.go index c01dd5a8f2f6..e93f154a7c5b 100644 --- a/pkg/detectors/extractorapi/extractorapi.go +++ b/pkg/detectors/extractorapi/extractorapi.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/facebookoauth/facebookoauth.go b/pkg/detectors/facebookoauth/facebookoauth.go index c797416487ad..dde60c8462fd 100644 --- a/pkg/detectors/facebookoauth/facebookoauth.go +++ b/pkg/detectors/facebookoauth/facebookoauth.go @@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/faceplusplus/faceplusplus.go b/pkg/detectors/faceplusplus/faceplusplus.go index 025865674934..5480a7495e6a 100644 --- a/pkg/detectors/faceplusplus/faceplusplus.go +++ b/pkg/detectors/faceplusplus/faceplusplus.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/fakejson/fakejson.go b/pkg/detectors/fakejson/fakejson.go index 74121ddb3a5d..912039d1fd12 100644 --- a/pkg/detectors/fakejson/fakejson.go +++ b/pkg/detectors/fakejson/fakejson.go @@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/fastforex/fastforex.go b/pkg/detectors/fastforex/fastforex.go index de0759bce63b..cc3412b85461 100644 --- a/pkg/detectors/fastforex/fastforex.go +++ b/pkg/detectors/fastforex/fastforex.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/fastlypersonaltoken/fastlypersonaltoken.go b/pkg/detectors/fastlypersonaltoken/fastlypersonaltoken.go index 80c0f63dff59..59f3051d71e9 100644 --- a/pkg/detectors/fastlypersonaltoken/fastlypersonaltoken.go +++ b/pkg/detectors/fastlypersonaltoken/fastlypersonaltoken.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/feedier/feedier.go b/pkg/detectors/feedier/feedier.go index 81624641ce20..b707c6f2f702 100644 --- a/pkg/detectors/feedier/feedier.go +++ b/pkg/detectors/feedier/feedier.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/fetchrss/fetchrss.go b/pkg/detectors/fetchrss/fetchrss.go index d47d2f82bf10..6069c50c4af4 100644 --- a/pkg/detectors/fetchrss/fetchrss.go +++ b/pkg/detectors/fetchrss/fetchrss.go @@ -75,5 +75,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/fibery/fibery.go b/pkg/detectors/fibery/fibery.go index 391772069876..8ad91a0251e1 100644 --- a/pkg/detectors/fibery/fibery.go +++ b/pkg/detectors/fibery/fibery.go @@ -84,5 +84,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/figmapersonalaccesstoken/figmapersonalaccesstoken.go b/pkg/detectors/figmapersonalaccesstoken/figmapersonalaccesstoken.go index 8375eaa99428..20a804461369 100644 --- a/pkg/detectors/figmapersonalaccesstoken/figmapersonalaccesstoken.go +++ b/pkg/detectors/figmapersonalaccesstoken/figmapersonalaccesstoken.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/fileio/fileio.go b/pkg/detectors/fileio/fileio.go index 4ea1dc6ee329..db9242ee1574 100644 --- a/pkg/detectors/fileio/fileio.go +++ b/pkg/detectors/fileio/fileio.go @@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/finage/finage.go b/pkg/detectors/finage/finage.go index c7bc1739ee70..336452839067 100644 --- a/pkg/detectors/finage/finage.go +++ b/pkg/detectors/finage/finage.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/financialmodelingprep/financialmodelingprep.go b/pkg/detectors/financialmodelingprep/financialmodelingprep.go index bc9cd3abeff6..c4c211b48073 100644 --- a/pkg/detectors/financialmodelingprep/financialmodelingprep.go +++ b/pkg/detectors/financialmodelingprep/financialmodelingprep.go @@ -82,5 +82,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/findl/findl.go b/pkg/detectors/findl/findl.go index e593f2897172..7a4eb4ee163c 100644 --- a/pkg/detectors/findl/findl.go +++ b/pkg/detectors/findl/findl.go @@ -72,5 +72,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/finnhub/finnhub.go b/pkg/detectors/finnhub/finnhub.go index 043c403108ce..a4d92a3db4c8 100644 --- a/pkg/detectors/finnhub/finnhub.go +++ b/pkg/detectors/finnhub/finnhub.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/fixerio/fixerio.go b/pkg/detectors/fixerio/fixerio.go index 3666fd9bd4dd..99577b82b9db 100644 --- a/pkg/detectors/fixerio/fixerio.go +++ b/pkg/detectors/fixerio/fixerio.go @@ -83,5 +83,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/flatio/flatio.go b/pkg/detectors/flatio/flatio.go index 6c2bd1f6ca8b..e62ec15ccf37 100644 --- a/pkg/detectors/flatio/flatio.go +++ b/pkg/detectors/flatio/flatio.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/fleetbase/fleetbase.go b/pkg/detectors/fleetbase/fleetbase.go index 19f938d4f7b6..5ea6c6f3d729 100644 --- a/pkg/detectors/fleetbase/fleetbase.go +++ b/pkg/detectors/fleetbase/fleetbase.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/flickr/flickr.go b/pkg/detectors/flickr/flickr.go index 106405c37347..85b0a87c9607 100644 --- a/pkg/detectors/flickr/flickr.go +++ b/pkg/detectors/flickr/flickr.go @@ -76,5 +76,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/flightapi/flightapi.go b/pkg/detectors/flightapi/flightapi.go index 167d5337b666..3aeae8e819e6 100644 --- a/pkg/detectors/flightapi/flightapi.go +++ b/pkg/detectors/flightapi/flightapi.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/flightlabs/flightlabs.go b/pkg/detectors/flightlabs/flightlabs.go index f17f2daac3ec..98d454f28768 100644 --- a/pkg/detectors/flightlabs/flightlabs.go +++ b/pkg/detectors/flightlabs/flightlabs.go @@ -77,5 +77,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/flightstats/flightstats.go b/pkg/detectors/flightstats/flightstats.go index 303c8ad574e1..40f118841ec9 100644 --- a/pkg/detectors/flightstats/flightstats.go +++ b/pkg/detectors/flightstats/flightstats.go @@ -86,5 +86,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/float/float.go b/pkg/detectors/float/float.go index 60b8eb51be64..c3ce640f71dc 100644 --- a/pkg/detectors/float/float.go +++ b/pkg/detectors/float/float.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/flowdash/flowdash.go b/pkg/detectors/flowdash/flowdash.go index dc54ec151ab8..f2701a3064a5 100644 --- a/pkg/detectors/flowdash/flowdash.go +++ b/pkg/detectors/flowdash/flowdash.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/flowdock/flowdock.go b/pkg/detectors/flowdock/flowdock.go index f8cc960dadd7..638ac096a949 100644 --- a/pkg/detectors/flowdock/flowdock.go +++ b/pkg/detectors/flowdock/flowdock.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/flowflu/flowflu.go b/pkg/detectors/flowflu/flowflu.go index 960c9a414e73..f9369efa4ee8 100644 --- a/pkg/detectors/flowflu/flowflu.go +++ b/pkg/detectors/flowflu/flowflu.go @@ -92,5 +92,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/flutterwave/flutterwave.go b/pkg/detectors/flutterwave/flutterwave.go index 6184281b84a6..4ee7a9d42545 100644 --- a/pkg/detectors/flutterwave/flutterwave.go +++ b/pkg/detectors/flutterwave/flutterwave.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/fmfw/fmfw.go b/pkg/detectors/fmfw/fmfw.go index bef7a66abccc..47cfb03ed09e 100644 --- a/pkg/detectors/fmfw/fmfw.go +++ b/pkg/detectors/fmfw/fmfw.go @@ -82,5 +82,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/formbucket/formbucket.go b/pkg/detectors/formbucket/formbucket.go index cc3ef787eb94..cc1061d41601 100644 --- a/pkg/detectors/formbucket/formbucket.go +++ b/pkg/detectors/formbucket/formbucket.go @@ -81,7 +81,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } type Response struct { diff --git a/pkg/detectors/formcraft/formcraft.go b/pkg/detectors/formcraft/formcraft.go index 7943c9c77125..5084c31cf3cc 100644 --- a/pkg/detectors/formcraft/formcraft.go +++ b/pkg/detectors/formcraft/formcraft.go @@ -73,5 +73,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/formio/formio.go b/pkg/detectors/formio/formio.go index dec2c7559b66..78feb9067dc1 100644 --- a/pkg/detectors/formio/formio.go +++ b/pkg/detectors/formio/formio.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/formsite/formsite.go b/pkg/detectors/formsite/formsite.go index 1c9bae7c67a5..b102c653bcc2 100644 --- a/pkg/detectors/formsite/formsite.go +++ b/pkg/detectors/formsite/formsite.go @@ -20,10 +20,10 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives - keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"formsite"}) + `\b([a-zA-Z0-9]{32})\b`) + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives + keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"formsite"}) + `\b([a-zA-Z0-9]{32})\b`) serverPat = regexp.MustCompile(detectors.PrefixRegex([]string{"formsite"}) + `\b(fs[0-9]{1,4})\b`) - userPat = regexp.MustCompile(detectors.PrefixRegex([]string{"formsite"}) + `\b([a-zA-Z0-9]{6})\b`) + userPat = regexp.MustCompile(detectors.PrefixRegex([]string{"formsite"}) + `\b([a-zA-Z0-9]{6})\b`) ) // Keywords are used for efficiently pre-filtering chunks. @@ -59,9 +59,9 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result DetectorType: detectorspb.DetectorType_Formsite, Raw: []byte(resMatch), } - + if verify { - req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s.formsite.com/api/v2/%s/forms",resServerMatch,resUserMatch), nil) + req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s.formsite.com/api/v2/%s/forms", resServerMatch, resUserMatch), nil) if err != nil { continue } @@ -72,19 +72,19 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, 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 detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/foursquare/foursquare.go b/pkg/detectors/foursquare/foursquare.go index a1a9ab599dc3..8237f3ab118d 100644 --- a/pkg/detectors/foursquare/foursquare.go +++ b/pkg/detectors/foursquare/foursquare.go @@ -78,5 +78,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/frameio/frameio.go b/pkg/detectors/frameio/frameio.go index 4275cea1ed8a..81215a86e705 100644 --- a/pkg/detectors/frameio/frameio.go +++ b/pkg/detectors/frameio/frameio.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/freshbooks/freshbooks.go b/pkg/detectors/freshbooks/freshbooks.go index 8fafe7407847..73eba03351dd 100644 --- a/pkg/detectors/freshbooks/freshbooks.go +++ b/pkg/detectors/freshbooks/freshbooks.go @@ -83,5 +83,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/freshdesk/freshdesk.go b/pkg/detectors/freshdesk/freshdesk.go index 9dcf6e5a4d45..748b158b556e 100644 --- a/pkg/detectors/freshdesk/freshdesk.go +++ b/pkg/detectors/freshdesk/freshdesk.go @@ -82,5 +82,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/front/front.go b/pkg/detectors/front/front.go index 16a2d6cb49e0..fcf253730031 100644 --- a/pkg/detectors/front/front.go +++ b/pkg/detectors/front/front.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/fulcrum/fulcrum.go b/pkg/detectors/fulcrum/fulcrum.go index 1339cba820e3..fcc5dde70eb6 100644 --- a/pkg/detectors/fulcrum/fulcrum.go +++ b/pkg/detectors/fulcrum/fulcrum.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/fullstory/fullstory.go b/pkg/detectors/fullstory/fullstory.go index f6cb3b82216a..5ddf7978aaf6 100644 --- a/pkg/detectors/fullstory/fullstory.go +++ b/pkg/detectors/fullstory/fullstory.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/fusebill/fusebill.go b/pkg/detectors/fusebill/fusebill.go index 6299234c2799..f88814b667fe 100644 --- a/pkg/detectors/fusebill/fusebill.go +++ b/pkg/detectors/fusebill/fusebill.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/fxmarket/fxmarket.go b/pkg/detectors/fxmarket/fxmarket.go index 87480bafeabc..429862031080 100644 --- a/pkg/detectors/fxmarket/fxmarket.go +++ b/pkg/detectors/fxmarket/fxmarket.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/geckoboard/geckoboard.go b/pkg/detectors/geckoboard/geckoboard.go index 969a8f4f1126..008cfa2bf7ab 100644 --- a/pkg/detectors/geckoboard/geckoboard.go +++ b/pkg/detectors/geckoboard/geckoboard.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/gemini/gemini.go b/pkg/detectors/gemini/gemini.go index a2d67c6d077b..f7d0992edc1d 100644 --- a/pkg/detectors/gemini/gemini.go +++ b/pkg/detectors/gemini/gemini.go @@ -87,7 +87,7 @@ func (s Scanner) FromData(_ context.Context, verify bool, data []byte) (results } } - return detectors.CleanResults(results), nil + return results, nil } func constructRequest(secret, keyID string) (*http.Request, error) { diff --git a/pkg/detectors/gengo/gengo.go b/pkg/detectors/gengo/gengo.go index 129dd5cf66cc..48fb0c64fc09 100644 --- a/pkg/detectors/gengo/gengo.go +++ b/pkg/detectors/gengo/gengo.go @@ -105,7 +105,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } type Response struct { diff --git a/pkg/detectors/geoapify/geoapify.go b/pkg/detectors/geoapify/geoapify.go index c4c2543a67f8..45336f8def3b 100644 --- a/pkg/detectors/geoapify/geoapify.go +++ b/pkg/detectors/geoapify/geoapify.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/geocode/geocode.go b/pkg/detectors/geocode/geocode.go index b67590abfce4..4e56b12c166d 100644 --- a/pkg/detectors/geocode/geocode.go +++ b/pkg/detectors/geocode/geocode.go @@ -78,5 +78,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/geocodify/geocodify.go b/pkg/detectors/geocodify/geocodify.go index 3a5845a7e3da..ea0bf533b09f 100644 --- a/pkg/detectors/geocodify/geocodify.go +++ b/pkg/detectors/geocodify/geocodify.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/geocodio/geocodio.go b/pkg/detectors/geocodio/geocodio.go index c4f071ae315e..4d9ab5b1c170 100644 --- a/pkg/detectors/geocodio/geocodio.go +++ b/pkg/detectors/geocodio/geocodio.go @@ -77,5 +77,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/geoipifi/geoipifi.go b/pkg/detectors/geoipifi/geoipifi.go index c74b9d8a537e..97f02005bef6 100644 --- a/pkg/detectors/geoipifi/geoipifi.go +++ b/pkg/detectors/geoipifi/geoipifi.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/getemail/getemail.go b/pkg/detectors/getemail/getemail.go index 3ee4d624da00..f1e1d5042626 100644 --- a/pkg/detectors/getemail/getemail.go +++ b/pkg/detectors/getemail/getemail.go @@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/getemails/getemails.go b/pkg/detectors/getemails/getemails.go index 5b49f7e5643d..7e8f4e42c98f 100644 --- a/pkg/detectors/getemails/getemails.go +++ b/pkg/detectors/getemails/getemails.go @@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/getgeoapi/getgeoapi.go b/pkg/detectors/getgeoapi/getgeoapi.go index 858469edece5..00d7b64bf483 100644 --- a/pkg/detectors/getgeoapi/getgeoapi.go +++ b/pkg/detectors/getgeoapi/getgeoapi.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/getgist/getgist.go b/pkg/detectors/getgist/getgist.go index dd1f34082330..8e04f16051d7 100644 --- a/pkg/detectors/getgist/getgist.go +++ b/pkg/detectors/getgist/getgist.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/getresponse/getresponse.go b/pkg/detectors/getresponse/getresponse.go index 69e9447a19b5..01e7216e9a53 100644 --- a/pkg/detectors/getresponse/getresponse.go +++ b/pkg/detectors/getresponse/getresponse.go @@ -20,7 +20,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"getresponse"}) + `\b([a-z0-9]{32})\b`) ) @@ -59,7 +59,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, 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,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/getsandbox/getsandbox.go b/pkg/detectors/getsandbox/getsandbox.go index ecb2cb1ca86b..e58033c89124 100644 --- a/pkg/detectors/getsandbox/getsandbox.go +++ b/pkg/detectors/getsandbox/getsandbox.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/github_old/github_old.go b/pkg/detectors/github_old/github_old.go index 14582be46789..33a0cbb0a2a1 100644 --- a/pkg/detectors/github_old/github_old.go +++ b/pkg/detectors/github_old/github_old.go @@ -22,7 +22,7 @@ var ( // https://developer.github.com/v3/#oauth2-token-sent-in-a-header keyPat = regexp.MustCompile(`(?i)(?:github)[^\.].{0,40}[ =:'"]+([a-f0-9]{40})\b`) - //TODO: Oauth2 client_id and client_secret + // TODO: Oauth2 client_id and client_secret // https://developer.github.com/v3/#oauth2-keysecret ) @@ -94,5 +94,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/githubapp/githubapp.go b/pkg/detectors/githubapp/githubapp.go index 088a8582f3af..348dd64f79ac 100644 --- a/pkg/detectors/githubapp/githubapp.go +++ b/pkg/detectors/githubapp/githubapp.go @@ -63,7 +63,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if err != nil { continue } - //issued at time + // issued at time iat := time.Now().Add(-60 * time.Second) exp := time.Now().Add(9 * 60 * time.Second) @@ -77,7 +77,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if err != nil { continue } - //end get token + // end get token req, err := http.NewRequestWithContext(ctx, "GET", "https://api.github.com/app", nil) if err != nil { @@ -100,5 +100,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/gitlab/gitlab.go b/pkg/detectors/gitlab/gitlab.go index 612960ffb650..a21ff4cb47e4 100644 --- a/pkg/detectors/gitlab/gitlab.go +++ b/pkg/detectors/gitlab/gitlab.go @@ -82,5 +82,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, secret) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/gitter/gitter.go b/pkg/detectors/gitter/gitter.go index 342b09dd0b3d..1f514c2dfe7b 100644 --- a/pkg/detectors/gitter/gitter.go +++ b/pkg/detectors/gitter/gitter.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/glassnode/glassnode.go b/pkg/detectors/glassnode/glassnode.go index 9c2cffd3ff49..eca2418735b6 100644 --- a/pkg/detectors/glassnode/glassnode.go +++ b/pkg/detectors/glassnode/glassnode.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/glitterlyapi/glitterlyapi.go b/pkg/detectors/glitterlyapi/glitterlyapi.go index ac4d5f4581fc..9695ab857e42 100644 --- a/pkg/detectors/glitterlyapi/glitterlyapi.go +++ b/pkg/detectors/glitterlyapi/glitterlyapi.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/gocanvas/gocanvas.go b/pkg/detectors/gocanvas/gocanvas.go index a24297457dc9..86accf237097 100644 --- a/pkg/detectors/gocanvas/gocanvas.go +++ b/pkg/detectors/gocanvas/gocanvas.go @@ -96,7 +96,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } type Response struct { diff --git a/pkg/detectors/gocardless/gocardless.go b/pkg/detectors/gocardless/gocardless.go index 56e39ea47096..2beb7d13bdbf 100644 --- a/pkg/detectors/gocardless/gocardless.go +++ b/pkg/detectors/gocardless/gocardless.go @@ -21,7 +21,7 @@ var ( client = common.SaneHttpClient() // Make sure that your group is surrounded in boundary characters such as below to reduce false positives. - //Removed bounds at the end of the regex since there are some cases that the token ends with an underscore (_) or a dash (-) + // Removed bounds at the end of the regex since there are some cases that the token ends with an underscore (_) or a dash (-) keyPat = regexp.MustCompile(`\b(live_[0-9A-Za-z\_\-]{40}[ "'\r\n]{1})`) ) @@ -73,5 +73,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/goodday/goodday.go b/pkg/detectors/goodday/goodday.go index 1e711210c289..d0199df96adb 100644 --- a/pkg/detectors/goodday/goodday.go +++ b/pkg/detectors/goodday/goodday.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/graphcms/graphcms.go b/pkg/detectors/graphcms/graphcms.go index 5e08fd88dc95..0f22d26f2b9e 100644 --- a/pkg/detectors/graphcms/graphcms.go +++ b/pkg/detectors/graphcms/graphcms.go @@ -84,5 +84,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/graphhopper/graphhopper.go b/pkg/detectors/graphhopper/graphhopper.go index 04b51ef85030..a355c56c37f3 100644 --- a/pkg/detectors/graphhopper/graphhopper.go +++ b/pkg/detectors/graphhopper/graphhopper.go @@ -65,5 +65,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/groovehq/groovehq.go b/pkg/detectors/groovehq/groovehq.go index a428c2f02bb4..f28892ea2b26 100644 --- a/pkg/detectors/groovehq/groovehq.go +++ b/pkg/detectors/groovehq/groovehq.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/gtmetrix/gtmetrix.go b/pkg/detectors/gtmetrix/gtmetrix.go index 107e3ac9266d..df55b2bf1e13 100644 --- a/pkg/detectors/gtmetrix/gtmetrix.go +++ b/pkg/detectors/gtmetrix/gtmetrix.go @@ -19,7 +19,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"gtmetrix"}) + `\b([0-9a-f]{32})\b`) ) @@ -58,7 +58,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) { continue } @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/guardianapi/guardianapi.go b/pkg/detectors/guardianapi/guardianapi.go index d0a5373e0571..d8c8317eeadf 100644 --- a/pkg/detectors/guardianapi/guardianapi.go +++ b/pkg/detectors/guardianapi/guardianapi.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/gumroad/gumroad.go b/pkg/detectors/gumroad/gumroad.go index 4ded29079009..9b1c8e4061f0 100644 --- a/pkg/detectors/gumroad/gumroad.go +++ b/pkg/detectors/gumroad/gumroad.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/guru/guru.go b/pkg/detectors/guru/guru.go index 06b1f12fdfa3..e7e1c1773e34 100644 --- a/pkg/detectors/guru/guru.go +++ b/pkg/detectors/guru/guru.go @@ -85,5 +85,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/gyazo/gyazo.go b/pkg/detectors/gyazo/gyazo.go index 25b2bdb1fed8..29bc68f5cced 100644 --- a/pkg/detectors/gyazo/gyazo.go +++ b/pkg/detectors/gyazo/gyazo.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/happi/happi.go b/pkg/detectors/happi/happi.go index 2d1add0f9765..29b30608894a 100644 --- a/pkg/detectors/happi/happi.go +++ b/pkg/detectors/happi/happi.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/happyscribe/happyscribe.go b/pkg/detectors/happyscribe/happyscribe.go index 98420cab8b98..ddb446d944e3 100644 --- a/pkg/detectors/happyscribe/happyscribe.go +++ b/pkg/detectors/happyscribe/happyscribe.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/harvest/harvest.go b/pkg/detectors/harvest/harvest.go index 91d66bde9f50..084d0ad6e51d 100644 --- a/pkg/detectors/harvest/harvest.go +++ b/pkg/detectors/harvest/harvest.go @@ -77,5 +77,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/heatmapapi/heatmapapi.go b/pkg/detectors/heatmapapi/heatmapapi.go index bcd2659579d0..0c086237bbdd 100644 --- a/pkg/detectors/heatmapapi/heatmapapi.go +++ b/pkg/detectors/heatmapapi/heatmapapi.go @@ -75,5 +75,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/hellosign/hellosign.go b/pkg/detectors/hellosign/hellosign.go index fb28f86c97e7..112327eb26bc 100644 --- a/pkg/detectors/hellosign/hellosign.go +++ b/pkg/detectors/hellosign/hellosign.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/helpcrunch/helpcrunch.go b/pkg/detectors/helpcrunch/helpcrunch.go index 22b95a0b1b3c..503db1ac0db3 100644 --- a/pkg/detectors/helpcrunch/helpcrunch.go +++ b/pkg/detectors/helpcrunch/helpcrunch.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/helpscout/helpscout.go b/pkg/detectors/helpscout/helpscout.go index 1b5b29f24f3e..242271e932de 100644 --- a/pkg/detectors/helpscout/helpscout.go +++ b/pkg/detectors/helpscout/helpscout.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/hereapi/hereapi.go b/pkg/detectors/hereapi/hereapi.go index 853fa4344ecf..1d3a440738d2 100644 --- a/pkg/detectors/hereapi/hereapi.go +++ b/pkg/detectors/hereapi/hereapi.go @@ -66,5 +66,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/heroku/heroku.go b/pkg/detectors/heroku/heroku.go index c4be7d0be548..dc5861c3656a 100644 --- a/pkg/detectors/heroku/heroku.go +++ b/pkg/detectors/heroku/heroku.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/hive/hive.go b/pkg/detectors/hive/hive.go index a71406f9dc7e..f12c53aa301c 100644 --- a/pkg/detectors/hive/hive.go +++ b/pkg/detectors/hive/hive.go @@ -78,5 +78,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/hiveage/hiveage.go b/pkg/detectors/hiveage/hiveage.go index 611ac72ead7d..5065349f8fd0 100644 --- a/pkg/detectors/hiveage/hiveage.go +++ b/pkg/detectors/hiveage/hiveage.go @@ -74,5 +74,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/holidayapi/holidayapi.go b/pkg/detectors/holidayapi/holidayapi.go index 2fbece910ae6..f40381266920 100644 --- a/pkg/detectors/holidayapi/holidayapi.go +++ b/pkg/detectors/holidayapi/holidayapi.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/holistic/holistic.go b/pkg/detectors/holistic/holistic.go index 7ec06246107b..042bd28b08c8 100644 --- a/pkg/detectors/holistic/holistic.go +++ b/pkg/detectors/holistic/holistic.go @@ -78,5 +78,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/honeycomb/honeycomb.go b/pkg/detectors/honeycomb/honeycomb.go index 74b41d8c50e4..d397db1b44a8 100644 --- a/pkg/detectors/honeycomb/honeycomb.go +++ b/pkg/detectors/honeycomb/honeycomb.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/host/host.go b/pkg/detectors/host/host.go index 418859c4aff9..631b91e82e6d 100644 --- a/pkg/detectors/host/host.go +++ b/pkg/detectors/host/host.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/html2pdf/html2pdf.go b/pkg/detectors/html2pdf/html2pdf.go index 42656b90e7dd..21b9369df477 100644 --- a/pkg/detectors/html2pdf/html2pdf.go +++ b/pkg/detectors/html2pdf/html2pdf.go @@ -75,5 +75,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/hubspotapikey/hubspotapikey.go b/pkg/detectors/hubspotapikey/hubspotapikey.go index a6fefc046b43..79753ec8aef6 100644 --- a/pkg/detectors/hubspotapikey/hubspotapikey.go +++ b/pkg/detectors/hubspotapikey/hubspotapikey.go @@ -66,5 +66,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/humanity/humanity.go b/pkg/detectors/humanity/humanity.go index 8465044bdba2..a03c0d4348d5 100644 --- a/pkg/detectors/humanity/humanity.go +++ b/pkg/detectors/humanity/humanity.go @@ -77,5 +77,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/hunter/hunter.go b/pkg/detectors/hunter/hunter.go index ad61c070e88e..94838ab01a82 100644 --- a/pkg/detectors/hunter/hunter.go +++ b/pkg/detectors/hunter/hunter.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/hybiscus/hybiscus.go b/pkg/detectors/hybiscus/hybiscus.go index 7accbd52b045..4cd79abbfe9f 100644 --- a/pkg/detectors/hybiscus/hybiscus.go +++ b/pkg/detectors/hybiscus/hybiscus.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/hypertrack/hypertrack.go b/pkg/detectors/hypertrack/hypertrack.go index 849725faa6c8..ceea372b55c9 100644 --- a/pkg/detectors/hypertrack/hypertrack.go +++ b/pkg/detectors/hypertrack/hypertrack.go @@ -84,5 +84,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/ibmclouduserkey/ibmclouduserkey.go b/pkg/detectors/ibmclouduserkey/ibmclouduserkey.go index 9269604f4fb9..bd219a85ac83 100644 --- a/pkg/detectors/ibmclouduserkey/ibmclouduserkey.go +++ b/pkg/detectors/ibmclouduserkey/ibmclouduserkey.go @@ -72,5 +72,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/iconfinder/iconfinder.go b/pkg/detectors/iconfinder/iconfinder.go index c94241156559..a54f61db2873 100644 --- a/pkg/detectors/iconfinder/iconfinder.go +++ b/pkg/detectors/iconfinder/iconfinder.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/iexapis/iexapis.go b/pkg/detectors/iexapis/iexapis.go index 36a7364f973d..7d10d54090a4 100644 --- a/pkg/detectors/iexapis/iexapis.go +++ b/pkg/detectors/iexapis/iexapis.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/iexcloud/iexcloud.go b/pkg/detectors/iexcloud/iexcloud.go index db8465cd232e..7392df057072 100644 --- a/pkg/detectors/iexcloud/iexcloud.go +++ b/pkg/detectors/iexcloud/iexcloud.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/image4/image4.go b/pkg/detectors/image4/image4.go index 61369523149a..20c71add2707 100644 --- a/pkg/detectors/image4/image4.go +++ b/pkg/detectors/image4/image4.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/imagekit/imagekit.go b/pkg/detectors/imagekit/imagekit.go index 048e44332d02..a9a8dc8a45d9 100644 --- a/pkg/detectors/imagekit/imagekit.go +++ b/pkg/detectors/imagekit/imagekit.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/imagga/imagga.go b/pkg/detectors/imagga/imagga.go index 9a0a828d5962..3a307e383a51 100644 --- a/pkg/detectors/imagga/imagga.go +++ b/pkg/detectors/imagga/imagga.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/impala/impala.go b/pkg/detectors/impala/impala.go index 214dc090fe3c..6060be31e9a5 100644 --- a/pkg/detectors/impala/impala.go +++ b/pkg/detectors/impala/impala.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/insightly/insightly.go b/pkg/detectors/insightly/insightly.go index 06729399a6b2..15011f89b317 100644 --- a/pkg/detectors/insightly/insightly.go +++ b/pkg/detectors/insightly/insightly.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/instabot/instabot.go b/pkg/detectors/instabot/instabot.go index efb2d8ab1de9..9e6e85f88f6b 100644 --- a/pkg/detectors/instabot/instabot.go +++ b/pkg/detectors/instabot/instabot.go @@ -19,7 +19,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"instabot"}) + `\b([0-9a-zA-Z=+\/]{43}[0-9a-zA-Z+\/=]{1})`) ) @@ -57,7 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) { continue } @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/integromat/integromat.go b/pkg/detectors/integromat/integromat.go index ea8d310d9147..2aa65068dcfc 100644 --- a/pkg/detectors/integromat/integromat.go +++ b/pkg/detectors/integromat/integromat.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/intercom/intercom.go b/pkg/detectors/intercom/intercom.go index 05a2759ee8ab..66cc3ac3ba2b 100644 --- a/pkg/detectors/intercom/intercom.go +++ b/pkg/detectors/intercom/intercom.go @@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/interseller/interseller.go b/pkg/detectors/interseller/interseller.go index 1191146bbfdb..077ddeeef931 100644 --- a/pkg/detectors/interseller/interseller.go +++ b/pkg/detectors/interseller/interseller.go @@ -2,12 +2,12 @@ package interseller import ( "context" - "net/http" - "regexp" - "strings" "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "net/http" + "regexp" + "strings" ) type Scanner struct{} @@ -18,7 +18,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"interseller"}) + `\b([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\b`) ) @@ -57,7 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key // if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) { // continue // } @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/intrinio/intrinio.go b/pkg/detectors/intrinio/intrinio.go index 7fbf23ec1ac3..03f86bb753b5 100644 --- a/pkg/detectors/intrinio/intrinio.go +++ b/pkg/detectors/intrinio/intrinio.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/invoiceocean/invoiceocean.go b/pkg/detectors/invoiceocean/invoiceocean.go index cc4e4e1b3abd..54119f31260f 100644 --- a/pkg/detectors/invoiceocean/invoiceocean.go +++ b/pkg/detectors/invoiceocean/invoiceocean.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/ipapi/ipapi.go b/pkg/detectors/ipapi/ipapi.go index 6d761bdae92b..f6c1c3b8477b 100644 --- a/pkg/detectors/ipapi/ipapi.go +++ b/pkg/detectors/ipapi/ipapi.go @@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/ipgeolocation/ipgeolocation.go b/pkg/detectors/ipgeolocation/ipgeolocation.go index 7d9b233bc937..a4202d769bf0 100644 --- a/pkg/detectors/ipgeolocation/ipgeolocation.go +++ b/pkg/detectors/ipgeolocation/ipgeolocation.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/ipify/ipify.go b/pkg/detectors/ipify/ipify.go index 62afb12b0b85..4e11b348df15 100644 --- a/pkg/detectors/ipify/ipify.go +++ b/pkg/detectors/ipify/ipify.go @@ -72,5 +72,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/ipinfodb/ipinfodb.go b/pkg/detectors/ipinfodb/ipinfodb.go index 07b6676be271..0998f822d302 100644 --- a/pkg/detectors/ipinfodb/ipinfodb.go +++ b/pkg/detectors/ipinfodb/ipinfodb.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/ipquality/ipquality.go b/pkg/detectors/ipquality/ipquality.go index 53273a47416f..c819d6c749cc 100644 --- a/pkg/detectors/ipquality/ipquality.go +++ b/pkg/detectors/ipquality/ipquality.go @@ -77,5 +77,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/ipstack/ipstack.go b/pkg/detectors/ipstack/ipstack.go index 82a7d0a7e7e0..ded3710fb469 100644 --- a/pkg/detectors/ipstack/ipstack.go +++ b/pkg/detectors/ipstack/ipstack.go @@ -75,5 +75,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/jiratoken/jiratoken.go b/pkg/detectors/jiratoken/jiratoken.go index e62219ff8e11..83177131bc5b 100644 --- a/pkg/detectors/jiratoken/jiratoken.go +++ b/pkg/detectors/jiratoken/jiratoken.go @@ -94,5 +94,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/jotform/jotform.go b/pkg/detectors/jotform/jotform.go index b7991a9de5f6..8973a8fb76c7 100644 --- a/pkg/detectors/jotform/jotform.go +++ b/pkg/detectors/jotform/jotform.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/jumpcloud/jumpcloud.go b/pkg/detectors/jumpcloud/jumpcloud.go index 5eb2edf7920c..a1045d42ee4b 100644 --- a/pkg/detectors/jumpcloud/jumpcloud.go +++ b/pkg/detectors/jumpcloud/jumpcloud.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/juro/juro.go b/pkg/detectors/juro/juro.go index be3a899fd08c..237530422a5b 100644 --- a/pkg/detectors/juro/juro.go +++ b/pkg/detectors/juro/juro.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/kanban/kanban.go b/pkg/detectors/kanban/kanban.go index f5861e73bbeb..21112a24f482 100644 --- a/pkg/detectors/kanban/kanban.go +++ b/pkg/detectors/kanban/kanban.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/kanbantool/kanbantool.go b/pkg/detectors/kanbantool/kanbantool.go index 0f6e8bb6a0c9..843a8873f7f5 100644 --- a/pkg/detectors/kanbantool/kanbantool.go +++ b/pkg/detectors/kanbantool/kanbantool.go @@ -20,7 +20,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"kanbantool"}) + `\b([0-9A-Z]{12})\b`) domainPat = regexp.MustCompile(detectors.PrefixRegex([]string{"kanbantool"}) + `\b([a-z0-9A-Z]{2,22})\b`) ) @@ -66,7 +66,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) { continue } @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/karmacrm/karmacrm.go b/pkg/detectors/karmacrm/karmacrm.go index cd2901e031b2..c64d19b2ada5 100644 --- a/pkg/detectors/karmacrm/karmacrm.go +++ b/pkg/detectors/karmacrm/karmacrm.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/keenio/keenio.go b/pkg/detectors/keenio/keenio.go index 409599ea47a9..951981ba9b77 100644 --- a/pkg/detectors/keenio/keenio.go +++ b/pkg/detectors/keenio/keenio.go @@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/kickbox/kickbox.go b/pkg/detectors/kickbox/kickbox.go index 6ecd9dfdb5d4..83e1536114db 100644 --- a/pkg/detectors/kickbox/kickbox.go +++ b/pkg/detectors/kickbox/kickbox.go @@ -63,5 +63,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/klipfolio/klipfolio.go b/pkg/detectors/klipfolio/klipfolio.go index fc941ed69d7a..c0d00511e407 100644 --- a/pkg/detectors/klipfolio/klipfolio.go +++ b/pkg/detectors/klipfolio/klipfolio.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/knapsackpro/knapsackpro.go b/pkg/detectors/knapsackpro/knapsackpro.go index 07cf6adbbebb..3eb743484175 100644 --- a/pkg/detectors/knapsackpro/knapsackpro.go +++ b/pkg/detectors/knapsackpro/knapsackpro.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/kontent/kontent.go b/pkg/detectors/kontent/kontent.go index 085e74e65703..8409d0e1297c 100644 --- a/pkg/detectors/kontent/kontent.go +++ b/pkg/detectors/kontent/kontent.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/kraken/kraken.go b/pkg/detectors/kraken/kraken.go index cf94d714822f..1b2b52611488 100644 --- a/pkg/detectors/kraken/kraken.go +++ b/pkg/detectors/kraken/kraken.go @@ -103,7 +103,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } // Code from https://docs.kraken.com/rest/#section/Authentication/Headers-and-Signature diff --git a/pkg/detectors/kucoin/kucoin.go b/pkg/detectors/kucoin/kucoin.go index b1cbc4ded26f..23a46b1dec40 100644 --- a/pkg/detectors/kucoin/kucoin.go +++ b/pkg/detectors/kucoin/kucoin.go @@ -112,7 +112,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } func getKucoinPassphrase(apiSecret string, apiPassphrase string) string { diff --git a/pkg/detectors/kylas/kylas.go b/pkg/detectors/kylas/kylas.go index 80addd612494..0a8fef5f44f6 100644 --- a/pkg/detectors/kylas/kylas.go +++ b/pkg/detectors/kylas/kylas.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/languagelayer/languagelayer.go b/pkg/detectors/languagelayer/languagelayer.go index 17799ec2a0d4..9c452d0b4942 100644 --- a/pkg/detectors/languagelayer/languagelayer.go +++ b/pkg/detectors/languagelayer/languagelayer.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/lastfm/lastfm.go b/pkg/detectors/lastfm/lastfm.go index ae6a98b9d1a0..e8daecc83f93 100644 --- a/pkg/detectors/lastfm/lastfm.go +++ b/pkg/detectors/lastfm/lastfm.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/launchdarkly/launchdarkly.go b/pkg/detectors/launchdarkly/launchdarkly.go index 5a03538bc739..a391173b3f8f 100644 --- a/pkg/detectors/launchdarkly/launchdarkly.go +++ b/pkg/detectors/launchdarkly/launchdarkly.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/leadfeeder/leadfeeder.go b/pkg/detectors/leadfeeder/leadfeeder.go index f3db199296ad..7ba66c7db7d5 100644 --- a/pkg/detectors/leadfeeder/leadfeeder.go +++ b/pkg/detectors/leadfeeder/leadfeeder.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/lemlist/lemlist.go b/pkg/detectors/lemlist/lemlist.go index fec70464af30..29cf91057b1d 100644 --- a/pkg/detectors/lemlist/lemlist.go +++ b/pkg/detectors/lemlist/lemlist.go @@ -2,14 +2,14 @@ package lemlist import ( "context" - "fmt" - "net/http" - "regexp" - "strings" b64 "encoding/base64" + "fmt" "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" + "net/http" + "regexp" + "strings" ) type Scanner struct{} @@ -20,7 +20,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"lemlist"}) + `\b([a-f0-9]{32})\b`) ) @@ -61,7 +61,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) { continue } @@ -72,5 +72,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/lendflow/lendflow.go b/pkg/detectors/lendflow/lendflow.go index 8133ddbfbbe2..815e9da5de15 100644 --- a/pkg/detectors/lendflow/lendflow.go +++ b/pkg/detectors/lendflow/lendflow.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/lessannoyingcrm/lessannoyingcrm.go b/pkg/detectors/lessannoyingcrm/lessannoyingcrm.go index d57c5b4f3c55..6b8da97639b5 100644 --- a/pkg/detectors/lessannoyingcrm/lessannoyingcrm.go +++ b/pkg/detectors/lessannoyingcrm/lessannoyingcrm.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/lexigram/lexigram.go b/pkg/detectors/lexigram/lexigram.go index 9fb192bb6be4..15c92cff79c0 100644 --- a/pkg/detectors/lexigram/lexigram.go +++ b/pkg/detectors/lexigram/lexigram.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/linearapi/linearapi.go b/pkg/detectors/linearapi/linearapi.go index a1f5920aa975..977e8ff4ca48 100644 --- a/pkg/detectors/linearapi/linearapi.go +++ b/pkg/detectors/linearapi/linearapi.go @@ -78,5 +78,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/linemessaging/linemessaging.go b/pkg/detectors/linemessaging/linemessaging.go index 30464fe2bd2f..84ff2a72e03f 100644 --- a/pkg/detectors/linemessaging/linemessaging.go +++ b/pkg/detectors/linemessaging/linemessaging.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/linenotify/linenotify.go b/pkg/detectors/linenotify/linenotify.go index 837e279fbd8c..a26238f03a86 100644 --- a/pkg/detectors/linenotify/linenotify.go +++ b/pkg/detectors/linenotify/linenotify.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/linkpreview/linkpreview.go b/pkg/detectors/linkpreview/linkpreview.go index 6337a0d17617..d4116a52bd75 100644 --- a/pkg/detectors/linkpreview/linkpreview.go +++ b/pkg/detectors/linkpreview/linkpreview.go @@ -65,5 +65,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/liveagent/liveagent.go b/pkg/detectors/liveagent/liveagent.go index 43a3c34b3e4e..3ab5ffa1a969 100644 --- a/pkg/detectors/liveagent/liveagent.go +++ b/pkg/detectors/liveagent/liveagent.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/livestorm/livestorm.go b/pkg/detectors/livestorm/livestorm.go index 047e7b6e2863..c33c3bacdade 100644 --- a/pkg/detectors/livestorm/livestorm.go +++ b/pkg/detectors/livestorm/livestorm.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/loadmill/loadmill.go b/pkg/detectors/loadmill/loadmill.go index ec005783674a..eabc408f8c6f 100644 --- a/pkg/detectors/loadmill/loadmill.go +++ b/pkg/detectors/loadmill/loadmill.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/lob/lob.go b/pkg/detectors/lob/lob.go index 1400b4db8d2e..03f72b752345 100644 --- a/pkg/detectors/lob/lob.go +++ b/pkg/detectors/lob/lob.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/locationiq/locationiq.go b/pkg/detectors/locationiq/locationiq.go index d0627a4b1062..1b05ce8d0cb7 100644 --- a/pkg/detectors/locationiq/locationiq.go +++ b/pkg/detectors/locationiq/locationiq.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/loginradius/loginradius.go b/pkg/detectors/loginradius/loginradius.go index 517fd41419fb..fce58b292a10 100644 --- a/pkg/detectors/loginradius/loginradius.go +++ b/pkg/detectors/loginradius/loginradius.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/lokalisetoken/lokalisetoken.go b/pkg/detectors/lokalisetoken/lokalisetoken.go index 199e4219630f..b90cb04887d5 100644 --- a/pkg/detectors/lokalisetoken/lokalisetoken.go +++ b/pkg/detectors/lokalisetoken/lokalisetoken.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/loyverse/loyverse.go b/pkg/detectors/loyverse/loyverse.go index 4b9a4f95ca58..fb05c0cb52c1 100644 --- a/pkg/detectors/loyverse/loyverse.go +++ b/pkg/detectors/loyverse/loyverse.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/lunchmoney/lunchmoney.go b/pkg/detectors/lunchmoney/lunchmoney.go index ae5b915c2a40..5a5b3f504847 100644 --- a/pkg/detectors/lunchmoney/lunchmoney.go +++ b/pkg/detectors/lunchmoney/lunchmoney.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/luno/luno.go b/pkg/detectors/luno/luno.go index 6d5ceb6a9abe..d1d308de7f86 100644 --- a/pkg/detectors/luno/luno.go +++ b/pkg/detectors/luno/luno.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/m3o/m3o.go b/pkg/detectors/m3o/m3o.go index 10806f6421e3..f556215395e3 100644 --- a/pkg/detectors/m3o/m3o.go +++ b/pkg/detectors/m3o/m3o.go @@ -75,5 +75,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/macaddress/macaddress.go b/pkg/detectors/macaddress/macaddress.go index 2dac49a876f4..36fb41ee34aa 100644 --- a/pkg/detectors/macaddress/macaddress.go +++ b/pkg/detectors/macaddress/macaddress.go @@ -67,5 +67,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/madkudu/madkudu.go b/pkg/detectors/madkudu/madkudu.go index e8abc0306842..f2a94591877b 100644 --- a/pkg/detectors/madkudu/madkudu.go +++ b/pkg/detectors/madkudu/madkudu.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/magicbell/magicbell.go b/pkg/detectors/magicbell/magicbell.go index 70e785e978ae..a00bf9111660 100644 --- a/pkg/detectors/magicbell/magicbell.go +++ b/pkg/detectors/magicbell/magicbell.go @@ -83,5 +83,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/magnetic/magnetic.go b/pkg/detectors/magnetic/magnetic.go index a5b7466263f9..68962c0b680a 100644 --- a/pkg/detectors/magnetic/magnetic.go +++ b/pkg/detectors/magnetic/magnetic.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/mailboxlayer/mailboxlayer.go b/pkg/detectors/mailboxlayer/mailboxlayer.go index d51484f99e93..b2e9e26f512e 100644 --- a/pkg/detectors/mailboxlayer/mailboxlayer.go +++ b/pkg/detectors/mailboxlayer/mailboxlayer.go @@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/mailerlite/mailerlite.go b/pkg/detectors/mailerlite/mailerlite.go index 1cd0d12d6ec4..09ff49bc3d1c 100644 --- a/pkg/detectors/mailerlite/mailerlite.go +++ b/pkg/detectors/mailerlite/mailerlite.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/mailgun/mailgun.go b/pkg/detectors/mailgun/mailgun.go index e6f61582241c..2b0e4bc2edcf 100644 --- a/pkg/detectors/mailgun/mailgun.go +++ b/pkg/detectors/mailgun/mailgun.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/mailjetbasicauth/mailjetbasicauth.go b/pkg/detectors/mailjetbasicauth/mailjetbasicauth.go index 7cad082dd9ae..3b8badcd6a55 100644 --- a/pkg/detectors/mailjetbasicauth/mailjetbasicauth.go +++ b/pkg/detectors/mailjetbasicauth/mailjetbasicauth.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/mailjetsms/mailjetsms.go b/pkg/detectors/mailjetsms/mailjetsms.go index d47cd8d82b8e..a72a4f10e493 100644 --- a/pkg/detectors/mailjetsms/mailjetsms.go +++ b/pkg/detectors/mailjetsms/mailjetsms.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/mailmodo/mailmodo.go b/pkg/detectors/mailmodo/mailmodo.go index aa2c301df20f..a7d3524b0fda 100644 --- a/pkg/detectors/mailmodo/mailmodo.go +++ b/pkg/detectors/mailmodo/mailmodo.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/mailsac/mailsac.go b/pkg/detectors/mailsac/mailsac.go index 2106fdc66360..642eb7b58646 100644 --- a/pkg/detectors/mailsac/mailsac.go +++ b/pkg/detectors/mailsac/mailsac.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/mandrill/mandrill.go b/pkg/detectors/mandrill/mandrill.go index 8c597ee4b082..5f53135d185b 100644 --- a/pkg/detectors/mandrill/mandrill.go +++ b/pkg/detectors/mandrill/mandrill.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/manifest/manifest.go b/pkg/detectors/manifest/manifest.go index 97c8acc49ace..8906bab28a21 100644 --- a/pkg/detectors/manifest/manifest.go +++ b/pkg/detectors/manifest/manifest.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/mapbox/mapbox.go b/pkg/detectors/mapbox/mapbox.go index 11b09a9eaa35..b9bf51f5d736 100644 --- a/pkg/detectors/mapbox/mapbox.go +++ b/pkg/detectors/mapbox/mapbox.go @@ -74,5 +74,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/mapquest/mapquest.go b/pkg/detectors/mapquest/mapquest.go index 92a309d78395..2000c846c571 100644 --- a/pkg/detectors/mapquest/mapquest.go +++ b/pkg/detectors/mapquest/mapquest.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/marketstack/marketstack.go b/pkg/detectors/marketstack/marketstack.go index e3120e02022b..424589bd4866 100644 --- a/pkg/detectors/marketstack/marketstack.go +++ b/pkg/detectors/marketstack/marketstack.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken.go b/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken.go index 2b0241557cae..87babaa5a812 100644 --- a/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken.go +++ b/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken.go @@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/mavenlink/mavenlink.go b/pkg/detectors/mavenlink/mavenlink.go index 84c90ba8857e..059bd2c634a7 100644 --- a/pkg/detectors/mavenlink/mavenlink.go +++ b/pkg/detectors/mavenlink/mavenlink.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/maxmindlicense/maxmindlicense.go b/pkg/detectors/maxmindlicense/maxmindlicense.go index 8650d55a3ef3..4131e020c0d1 100644 --- a/pkg/detectors/maxmindlicense/maxmindlicense.go +++ b/pkg/detectors/maxmindlicense/maxmindlicense.go @@ -74,5 +74,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/meaningcloud/meaningcloud.go b/pkg/detectors/meaningcloud/meaningcloud.go index 86170ae6a43a..5d121f64a5c7 100644 --- a/pkg/detectors/meaningcloud/meaningcloud.go +++ b/pkg/detectors/meaningcloud/meaningcloud.go @@ -91,5 +91,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/mediastack/mediastack.go b/pkg/detectors/mediastack/mediastack.go index d9f90451d9be..c5a0aede3cee 100644 --- a/pkg/detectors/mediastack/mediastack.go +++ b/pkg/detectors/mediastack/mediastack.go @@ -72,5 +72,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/meistertask/meistertask.go b/pkg/detectors/meistertask/meistertask.go index 9a545f5d0bbf..45dd09f3e94f 100644 --- a/pkg/detectors/meistertask/meistertask.go +++ b/pkg/detectors/meistertask/meistertask.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/mesibo/mesibo.go b/pkg/detectors/mesibo/mesibo.go index 541a444efba9..b80a637c9bbf 100644 --- a/pkg/detectors/mesibo/mesibo.go +++ b/pkg/detectors/mesibo/mesibo.go @@ -75,5 +75,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/messagebird/messagebird.go b/pkg/detectors/messagebird/messagebird.go index b4a5ce2be23c..f70363174e99 100644 --- a/pkg/detectors/messagebird/messagebird.go +++ b/pkg/detectors/messagebird/messagebird.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/metaapi/metaapi.go b/pkg/detectors/metaapi/metaapi.go index e2ca68644693..3acf1b58aa27 100644 --- a/pkg/detectors/metaapi/metaapi.go +++ b/pkg/detectors/metaapi/metaapi.go @@ -87,5 +87,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/metrilo/metrilo.go b/pkg/detectors/metrilo/metrilo.go index abe472741732..b2b0d2351563 100644 --- a/pkg/detectors/metrilo/metrilo.go +++ b/pkg/detectors/metrilo/metrilo.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/microsoftteamswebhook/microsoftteamswebhook.go b/pkg/detectors/microsoftteamswebhook/microsoftteamswebhook.go index 76ef21c7400e..60d07c93f7f9 100644 --- a/pkg/detectors/microsoftteamswebhook/microsoftteamswebhook.go +++ b/pkg/detectors/microsoftteamswebhook/microsoftteamswebhook.go @@ -72,5 +72,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/mindmeister/mindmeister.go b/pkg/detectors/mindmeister/mindmeister.go index bbeca142b652..548f212cf2d1 100644 --- a/pkg/detectors/mindmeister/mindmeister.go +++ b/pkg/detectors/mindmeister/mindmeister.go @@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/miro/miro.go b/pkg/detectors/miro/miro.go index 19fed88ffbc2..3c5f1f0e24db 100644 --- a/pkg/detectors/miro/miro.go +++ b/pkg/detectors/miro/miro.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/mite/mite.go b/pkg/detectors/mite/mite.go index d408cbd6c9f9..154abbc267cf 100644 --- a/pkg/detectors/mite/mite.go +++ b/pkg/detectors/mite/mite.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/mixmax/mixmax.go b/pkg/detectors/mixmax/mixmax.go index f4302c71aeb6..37f0b207665f 100644 --- a/pkg/detectors/mixmax/mixmax.go +++ b/pkg/detectors/mixmax/mixmax.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/mixpanel/mixpanel.go b/pkg/detectors/mixpanel/mixpanel.go index c9de0ffb16ee..e2d620d8c3a9 100644 --- a/pkg/detectors/mixpanel/mixpanel.go +++ b/pkg/detectors/mixpanel/mixpanel.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/mockaroo/mockaroo.go b/pkg/detectors/mockaroo/mockaroo.go index fb7e201ba1e5..c150ecbab5c7 100644 --- a/pkg/detectors/mockaroo/mockaroo.go +++ b/pkg/detectors/mockaroo/mockaroo.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/moderation/moderation.go b/pkg/detectors/moderation/moderation.go index e96683b91107..452df0835a30 100644 --- a/pkg/detectors/moderation/moderation.go +++ b/pkg/detectors/moderation/moderation.go @@ -76,5 +76,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/monday/monday.go b/pkg/detectors/monday/monday.go index 027b03941a96..17179316a28d 100644 --- a/pkg/detectors/monday/monday.go +++ b/pkg/detectors/monday/monday.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/mongodb/mongodb.go b/pkg/detectors/mongodb/mongodb.go index 3d65a4806fb4..357f8130c18a 100644 --- a/pkg/detectors/mongodb/mongodb.go +++ b/pkg/detectors/mongodb/mongodb.go @@ -67,5 +67,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/monkeylearn/monkeylearn.go b/pkg/detectors/monkeylearn/monkeylearn.go index 14ef9c18abbf..fc33592359f4 100644 --- a/pkg/detectors/monkeylearn/monkeylearn.go +++ b/pkg/detectors/monkeylearn/monkeylearn.go @@ -20,7 +20,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"monkeylearn"}) + `\b([0-9a-f]{40})\b`) ) @@ -60,7 +60,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) { continue } @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/moonclerck/moonclerck.go b/pkg/detectors/moonclerck/moonclerck.go index 2dbbcb0bb39c..53a5c5476ece 100644 --- a/pkg/detectors/moonclerck/moonclerck.go +++ b/pkg/detectors/moonclerck/moonclerck.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/moonclerk/moonclerk.go b/pkg/detectors/moonclerk/moonclerk.go index 980b19f198f8..5605097b1d0b 100644 --- a/pkg/detectors/moonclerk/moonclerk.go +++ b/pkg/detectors/moonclerk/moonclerk.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/moosend/moosend.go b/pkg/detectors/moosend/moosend.go index e3f8c24c120f..b5eaeb1fe33d 100644 --- a/pkg/detectors/moosend/moosend.go +++ b/pkg/detectors/moosend/moosend.go @@ -74,5 +74,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/mrticktock/mrticktock.go b/pkg/detectors/mrticktock/mrticktock.go index fbebf2d72cfe..4132d7dd54d0 100644 --- a/pkg/detectors/mrticktock/mrticktock.go +++ b/pkg/detectors/mrticktock/mrticktock.go @@ -85,5 +85,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/mux/mux.go b/pkg/detectors/mux/mux.go index 4648296b079b..b0badfd2c55c 100644 --- a/pkg/detectors/mux/mux.go +++ b/pkg/detectors/mux/mux.go @@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/myfreshworks/myfreshworks.go b/pkg/detectors/myfreshworks/myfreshworks.go index 1dd149d6e0c5..f6afde1f95f5 100644 --- a/pkg/detectors/myfreshworks/myfreshworks.go +++ b/pkg/detectors/myfreshworks/myfreshworks.go @@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/myintervals/myintervals.go b/pkg/detectors/myintervals/myintervals.go index d3d1b105e85c..f0443cee9caa 100644 --- a/pkg/detectors/myintervals/myintervals.go +++ b/pkg/detectors/myintervals/myintervals.go @@ -74,5 +74,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/nasdaqdatalink/nasdaqdatalink.go b/pkg/detectors/nasdaqdatalink/nasdaqdatalink.go index b8e22cdb30f7..9ebf02cf1b9e 100644 --- a/pkg/detectors/nasdaqdatalink/nasdaqdatalink.go +++ b/pkg/detectors/nasdaqdatalink/nasdaqdatalink.go @@ -72,5 +72,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/nethunt/nethunt.go b/pkg/detectors/nethunt/nethunt.go index 057ab3ac3c44..006cb0311050 100644 --- a/pkg/detectors/nethunt/nethunt.go +++ b/pkg/detectors/nethunt/nethunt.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/netlify/netlify.go b/pkg/detectors/netlify/netlify.go index 7c3491c9e23f..d935d270320f 100644 --- a/pkg/detectors/netlify/netlify.go +++ b/pkg/detectors/netlify/netlify.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/neutrinoapi/neutrinoapi.go b/pkg/detectors/neutrinoapi/neutrinoapi.go index 7fedd9e88321..b2c4f7193aa5 100644 --- a/pkg/detectors/neutrinoapi/neutrinoapi.go +++ b/pkg/detectors/neutrinoapi/neutrinoapi.go @@ -94,5 +94,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/newrelicpersonalapikey/newrelicpersonalapikey.go b/pkg/detectors/newrelicpersonalapikey/newrelicpersonalapikey.go index bc7bd65223c0..b22b18712666 100644 --- a/pkg/detectors/newrelicpersonalapikey/newrelicpersonalapikey.go +++ b/pkg/detectors/newrelicpersonalapikey/newrelicpersonalapikey.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/newsapi/newsapi.go b/pkg/detectors/newsapi/newsapi.go index 099db602a1f2..67f7381465d0 100644 --- a/pkg/detectors/newsapi/newsapi.go +++ b/pkg/detectors/newsapi/newsapi.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/newscatcher/newscatcher.go b/pkg/detectors/newscatcher/newscatcher.go index 47ebffa6ad03..eb5fe55b9ecb 100644 --- a/pkg/detectors/newscatcher/newscatcher.go +++ b/pkg/detectors/newscatcher/newscatcher.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/nexmoapikey/nexmoapikey.go b/pkg/detectors/nexmoapikey/nexmoapikey.go index 8460c891fe30..40fc662966b5 100644 --- a/pkg/detectors/nexmoapikey/nexmoapikey.go +++ b/pkg/detectors/nexmoapikey/nexmoapikey.go @@ -78,5 +78,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/nftport/nftport.go b/pkg/detectors/nftport/nftport.go index 940ac0c64932..dfb8cf5d0b15 100644 --- a/pkg/detectors/nftport/nftport.go +++ b/pkg/detectors/nftport/nftport.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/ngc/ngc.go b/pkg/detectors/ngc/ngc.go index 5088e66f1da6..e1b7dda9e987 100644 --- a/pkg/detectors/ngc/ngc.go +++ b/pkg/detectors/ngc/ngc.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/nicereply/nicereply.go b/pkg/detectors/nicereply/nicereply.go index a44eeab3c8b3..e7f34deed2f7 100644 --- a/pkg/detectors/nicereply/nicereply.go +++ b/pkg/detectors/nicereply/nicereply.go @@ -73,5 +73,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/nightfall/nightfall.go b/pkg/detectors/nightfall/nightfall.go index df8f4a36ae03..6e04697689c5 100644 --- a/pkg/detectors/nightfall/nightfall.go +++ b/pkg/detectors/nightfall/nightfall.go @@ -73,5 +73,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/nimble/nimble.go b/pkg/detectors/nimble/nimble.go index c04afaadc5b6..649095dc9bfe 100644 --- a/pkg/detectors/nimble/nimble.go +++ b/pkg/detectors/nimble/nimble.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/nitro/nitro.go b/pkg/detectors/nitro/nitro.go index b215c10539a7..30aee486324e 100644 --- a/pkg/detectors/nitro/nitro.go +++ b/pkg/detectors/nitro/nitro.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/noticeable/noticeable.go b/pkg/detectors/noticeable/noticeable.go index f8c3ae26c244..0ae22a2f947a 100644 --- a/pkg/detectors/noticeable/noticeable.go +++ b/pkg/detectors/noticeable/noticeable.go @@ -72,5 +72,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/notion/notion.go b/pkg/detectors/notion/notion.go index 10945ed25222..9b31dedd5650 100644 --- a/pkg/detectors/notion/notion.go +++ b/pkg/detectors/notion/notion.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/nozbeteams/nozbeteams.go b/pkg/detectors/nozbeteams/nozbeteams.go index 9ea8e3bcbe37..1399e074d80e 100644 --- a/pkg/detectors/nozbeteams/nozbeteams.go +++ b/pkg/detectors/nozbeteams/nozbeteams.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/numverify/numverify.go b/pkg/detectors/numverify/numverify.go index 2a6e5a779b1e..83203f780918 100644 --- a/pkg/detectors/numverify/numverify.go +++ b/pkg/detectors/numverify/numverify.go @@ -73,5 +73,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/nutritionix/nutritionix.go b/pkg/detectors/nutritionix/nutritionix.go index f3eb8b645eae..413b41da9d78 100644 --- a/pkg/detectors/nutritionix/nutritionix.go +++ b/pkg/detectors/nutritionix/nutritionix.go @@ -82,5 +82,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/nylas/nylas.go b/pkg/detectors/nylas/nylas.go index 3e481a03680a..b4569998b83c 100644 --- a/pkg/detectors/nylas/nylas.go +++ b/pkg/detectors/nylas/nylas.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/nytimes/nytimes.go b/pkg/detectors/nytimes/nytimes.go index b743ea7fecbf..3585642eca4f 100644 --- a/pkg/detectors/nytimes/nytimes.go +++ b/pkg/detectors/nytimes/nytimes.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/oanda/oanda.go b/pkg/detectors/oanda/oanda.go index 4b784b8ac44e..7d9f3892b2e6 100644 --- a/pkg/detectors/oanda/oanda.go +++ b/pkg/detectors/oanda/oanda.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/omnisend/omnisend.go b/pkg/detectors/omnisend/omnisend.go index 536884871c23..f4adf8bf4c87 100644 --- a/pkg/detectors/omnisend/omnisend.go +++ b/pkg/detectors/omnisend/omnisend.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/onedesk/onedesk.go b/pkg/detectors/onedesk/onedesk.go index 8d1411ac028e..73dda5e402df 100644 --- a/pkg/detectors/onedesk/onedesk.go +++ b/pkg/detectors/onedesk/onedesk.go @@ -84,5 +84,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/onelogin/onelogin.go b/pkg/detectors/onelogin/onelogin.go index e8a87e2e8372..7e8b754ebf5e 100644 --- a/pkg/detectors/onelogin/onelogin.go +++ b/pkg/detectors/onelogin/onelogin.go @@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/onepagecrm/onepagecrm.go b/pkg/detectors/onepagecrm/onepagecrm.go index 9a1d033fff7c..00bdd75ae290 100644 --- a/pkg/detectors/onepagecrm/onepagecrm.go +++ b/pkg/detectors/onepagecrm/onepagecrm.go @@ -77,5 +77,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/onesignal/onesignal.go b/pkg/detectors/onesignal/onesignal.go index 2fa984610452..786264425e69 100644 --- a/pkg/detectors/onesignal/onesignal.go +++ b/pkg/detectors/onesignal/onesignal.go @@ -21,7 +21,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"onesignal"}) + common.UUIDPattern) ) @@ -63,7 +63,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) { continue } @@ -74,5 +74,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/onwaterio/onwaterio.go b/pkg/detectors/onwaterio/onwaterio.go index 7e731a8362b7..a5a793d036b5 100644 --- a/pkg/detectors/onwaterio/onwaterio.go +++ b/pkg/detectors/onwaterio/onwaterio.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/oopspam/oopspam.go b/pkg/detectors/oopspam/oopspam.go index 20ebd683fe42..cb44917cdf46 100644 --- a/pkg/detectors/oopspam/oopspam.go +++ b/pkg/detectors/oopspam/oopspam.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/opencagedata/opencagedata.go b/pkg/detectors/opencagedata/opencagedata.go index ce8d21712da4..f009ab474c64 100644 --- a/pkg/detectors/opencagedata/opencagedata.go +++ b/pkg/detectors/opencagedata/opencagedata.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/opengraphr/opengraphr.go b/pkg/detectors/opengraphr/opengraphr.go index bba66c680d16..4d8110da12cc 100644 --- a/pkg/detectors/opengraphr/opengraphr.go +++ b/pkg/detectors/opengraphr/opengraphr.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/openuv/openuv.go b/pkg/detectors/openuv/openuv.go index 218c7586e9c1..e12be710d27a 100644 --- a/pkg/detectors/openuv/openuv.go +++ b/pkg/detectors/openuv/openuv.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/openweather/openweather.go b/pkg/detectors/openweather/openweather.go index f35b27c38cd5..8741eaf34d65 100644 --- a/pkg/detectors/openweather/openweather.go +++ b/pkg/detectors/openweather/openweather.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/optimizely/optimizely.go b/pkg/detectors/optimizely/optimizely.go index d8fcaeb49fc5..0a49b7291dd9 100644 --- a/pkg/detectors/optimizely/optimizely.go +++ b/pkg/detectors/optimizely/optimizely.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/owlbot/owlbot.go b/pkg/detectors/owlbot/owlbot.go index a5f5c3ca9973..ba05488cd39b 100644 --- a/pkg/detectors/owlbot/owlbot.go +++ b/pkg/detectors/owlbot/owlbot.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/packagecloud/packagecloud.go b/pkg/detectors/packagecloud/packagecloud.go index fb6d8504e42b..01fae5c94b6b 100644 --- a/pkg/detectors/packagecloud/packagecloud.go +++ b/pkg/detectors/packagecloud/packagecloud.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/pagerdutyapikey/pagerdutyapikey.go b/pkg/detectors/pagerdutyapikey/pagerdutyapikey.go index 94fa814f9629..6b793f7b1025 100644 --- a/pkg/detectors/pagerdutyapikey/pagerdutyapikey.go +++ b/pkg/detectors/pagerdutyapikey/pagerdutyapikey.go @@ -73,5 +73,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/pandadoc/pandadoc.go b/pkg/detectors/pandadoc/pandadoc.go index e36446d18e53..f5b48c477d37 100644 --- a/pkg/detectors/pandadoc/pandadoc.go +++ b/pkg/detectors/pandadoc/pandadoc.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/pandascore/pandascore.go b/pkg/detectors/pandascore/pandascore.go index 17809597eeaa..cc549bb94068 100644 --- a/pkg/detectors/pandascore/pandascore.go +++ b/pkg/detectors/pandascore/pandascore.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/paperform/paperform.go b/pkg/detectors/paperform/paperform.go index 04c6352fc729..b13f6ffcf5d2 100644 --- a/pkg/detectors/paperform/paperform.go +++ b/pkg/detectors/paperform/paperform.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/paralleldots/paralleldots.go b/pkg/detectors/paralleldots/paralleldots.go index acf566c3a2ea..5500aa54cc62 100644 --- a/pkg/detectors/paralleldots/paralleldots.go +++ b/pkg/detectors/paralleldots/paralleldots.go @@ -96,5 +96,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/parsehub/parsehub.go b/pkg/detectors/parsehub/parsehub.go index 70b5aa17de3d..70009e967f86 100644 --- a/pkg/detectors/parsehub/parsehub.go +++ b/pkg/detectors/parsehub/parsehub.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/parsers/parsers.go b/pkg/detectors/parsers/parsers.go index 4bc466e75f7a..026bbe869fe7 100644 --- a/pkg/detectors/parsers/parsers.go +++ b/pkg/detectors/parsers/parsers.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/parseur/parseur.go b/pkg/detectors/parseur/parseur.go index 82aa4f214617..ac9f70b9c3f4 100644 --- a/pkg/detectors/parseur/parseur.go +++ b/pkg/detectors/parseur/parseur.go @@ -20,7 +20,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"parseur"}) + `\b([a-f0-9]{40})\b`) ) @@ -59,7 +59,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, 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,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/partnerstack/partnerstack.go b/pkg/detectors/partnerstack/partnerstack.go index 0a010ab13916..80626c07896e 100644 --- a/pkg/detectors/partnerstack/partnerstack.go +++ b/pkg/detectors/partnerstack/partnerstack.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/passbase/passbase.go b/pkg/detectors/passbase/passbase.go index 6957bfa50c42..b990e1815abe 100644 --- a/pkg/detectors/passbase/passbase.go +++ b/pkg/detectors/passbase/passbase.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/pastebin/pastebin.go b/pkg/detectors/pastebin/pastebin.go index 5a163b505481..473b6177b348 100644 --- a/pkg/detectors/pastebin/pastebin.go +++ b/pkg/detectors/pastebin/pastebin.go @@ -99,5 +99,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/paydirtapp/paydirtapp.go b/pkg/detectors/paydirtapp/paydirtapp.go index 0adde9fd974f..d3ca5ea321c3 100644 --- a/pkg/detectors/paydirtapp/paydirtapp.go +++ b/pkg/detectors/paydirtapp/paydirtapp.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/paymoapp/paymoapp.go b/pkg/detectors/paymoapp/paymoapp.go index c0c0b5b21c60..95e4b9eecd41 100644 --- a/pkg/detectors/paymoapp/paymoapp.go +++ b/pkg/detectors/paymoapp/paymoapp.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/paymongo/paymongo.go b/pkg/detectors/paymongo/paymongo.go index cbcbbc309a36..d9af80b6cdfd 100644 --- a/pkg/detectors/paymongo/paymongo.go +++ b/pkg/detectors/paymongo/paymongo.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/paypaloauth/paypaloauth.go b/pkg/detectors/paypaloauth/paypaloauth.go index e63ecbd16337..1608238d46a4 100644 --- a/pkg/detectors/paypaloauth/paypaloauth.go +++ b/pkg/detectors/paypaloauth/paypaloauth.go @@ -86,5 +86,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/paystack/paystack.go b/pkg/detectors/paystack/paystack.go index 9a5dc38525da..b45220f27654 100644 --- a/pkg/detectors/paystack/paystack.go +++ b/pkg/detectors/paystack/paystack.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/pdflayer/pdflayer.go b/pkg/detectors/pdflayer/pdflayer.go index c64325462e76..8168769f5b68 100644 --- a/pkg/detectors/pdflayer/pdflayer.go +++ b/pkg/detectors/pdflayer/pdflayer.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/pdfshift/pdfshift.go b/pkg/detectors/pdfshift/pdfshift.go index eb418c3e4071..d1afaa1b5274 100644 --- a/pkg/detectors/pdfshift/pdfshift.go +++ b/pkg/detectors/pdfshift/pdfshift.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/peopledatalabs/peopledatalabs.go b/pkg/detectors/peopledatalabs/peopledatalabs.go index 75921b2488c3..84cdb78eba0d 100644 --- a/pkg/detectors/peopledatalabs/peopledatalabs.go +++ b/pkg/detectors/peopledatalabs/peopledatalabs.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/pepipost/pepipost.go b/pkg/detectors/pepipost/pepipost.go index 89345eaf5426..4a56bfbb1bfc 100644 --- a/pkg/detectors/pepipost/pepipost.go +++ b/pkg/detectors/pepipost/pepipost.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/pinata/pinata.go b/pkg/detectors/pinata/pinata.go index 9ab2046f76ed..afe999837ddd 100644 --- a/pkg/detectors/pinata/pinata.go +++ b/pkg/detectors/pinata/pinata.go @@ -84,5 +84,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/pipedream/pipedream.go b/pkg/detectors/pipedream/pipedream.go index 4d0a5f911ef5..2b6559d0e03c 100644 --- a/pkg/detectors/pipedream/pipedream.go +++ b/pkg/detectors/pipedream/pipedream.go @@ -73,5 +73,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/pipedrive/pipedrive.go b/pkg/detectors/pipedrive/pipedrive.go index 56c93af02dfc..6c66b6662eb2 100644 --- a/pkg/detectors/pipedrive/pipedrive.go +++ b/pkg/detectors/pipedrive/pipedrive.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/pivotaltracker/pivotaltracker.go b/pkg/detectors/pivotaltracker/pivotaltracker.go index f68e462af3f4..054776222831 100644 --- a/pkg/detectors/pivotaltracker/pivotaltracker.go +++ b/pkg/detectors/pivotaltracker/pivotaltracker.go @@ -72,5 +72,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/pixabay/pixabay.go b/pkg/detectors/pixabay/pixabay.go index 5a54ec7be209..edae0de8bbb6 100644 --- a/pkg/detectors/pixabay/pixabay.go +++ b/pkg/detectors/pixabay/pixabay.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/plaidkey/plaidkey.go b/pkg/detectors/plaidkey/plaidkey.go index 7355065cbfa1..2976d0f1c122 100644 --- a/pkg/detectors/plaidkey/plaidkey.go +++ b/pkg/detectors/plaidkey/plaidkey.go @@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/planviewleankit/planviewleankit.go b/pkg/detectors/planviewleankit/planviewleankit.go index d3cea2b075fb..5c8a2a7cc8d5 100644 --- a/pkg/detectors/planviewleankit/planviewleankit.go +++ b/pkg/detectors/planviewleankit/planviewleankit.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/planyo/planyo.go b/pkg/detectors/planyo/planyo.go index 6291d1d97d17..8e2d5b65cdae 100644 --- a/pkg/detectors/planyo/planyo.go +++ b/pkg/detectors/planyo/planyo.go @@ -77,5 +77,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/plivo/plivo.go b/pkg/detectors/plivo/plivo.go index 29125f8fe4a8..6823341553ac 100644 --- a/pkg/detectors/plivo/plivo.go +++ b/pkg/detectors/plivo/plivo.go @@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/podio/podio.go b/pkg/detectors/podio/podio.go index 8e86c3cccde6..ca41786d5bcc 100644 --- a/pkg/detectors/podio/podio.go +++ b/pkg/detectors/podio/podio.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/pollsapi/pollsapi.go b/pkg/detectors/pollsapi/pollsapi.go index 2fee8b54e6b3..4ee17e78ab24 100644 --- a/pkg/detectors/pollsapi/pollsapi.go +++ b/pkg/detectors/pollsapi/pollsapi.go @@ -19,7 +19,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"pollsapi"}) + `\b([A-Z0-9]{28})\b`) ) @@ -58,7 +58,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) { continue } @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/poloniex/poloniex.go b/pkg/detectors/poloniex/poloniex.go index 3470a499a680..e95d50b4f662 100644 --- a/pkg/detectors/poloniex/poloniex.go +++ b/pkg/detectors/poloniex/poloniex.go @@ -100,7 +100,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } func getPoloniexSignature(secret string, payload string) string { diff --git a/pkg/detectors/polygon/polygon.go b/pkg/detectors/polygon/polygon.go index 2a45620df348..57ac37634631 100644 --- a/pkg/detectors/polygon/polygon.go +++ b/pkg/detectors/polygon/polygon.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/positionstack/positionstack.go b/pkg/detectors/positionstack/positionstack.go index df7f120335a7..3f209773f3d0 100644 --- a/pkg/detectors/positionstack/positionstack.go +++ b/pkg/detectors/positionstack/positionstack.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/postageapp/postageapp.go b/pkg/detectors/postageapp/postageapp.go index 9cd79fbfb0b1..661c0dfcc075 100644 --- a/pkg/detectors/postageapp/postageapp.go +++ b/pkg/detectors/postageapp/postageapp.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/postbacks/postbacks.go b/pkg/detectors/postbacks/postbacks.go index 83ed272ae152..3018ff58e43f 100644 --- a/pkg/detectors/postbacks/postbacks.go +++ b/pkg/detectors/postbacks/postbacks.go @@ -20,7 +20,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"postbacks"}) + `\b([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\b`) ) @@ -63,7 +63,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) { continue } @@ -74,5 +74,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/posthog/posthog.go b/pkg/detectors/posthog/posthog.go index ee63f655cbb9..ef194762653d 100644 --- a/pkg/detectors/posthog/posthog.go +++ b/pkg/detectors/posthog/posthog.go @@ -73,5 +73,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/postman/postman.go b/pkg/detectors/postman/postman.go index 76a655c09cbc..db2f613a86e5 100644 --- a/pkg/detectors/postman/postman.go +++ b/pkg/detectors/postman/postman.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/postmark/postmark.go b/pkg/detectors/postmark/postmark.go index 6f0d1e16627c..2394b553b65b 100644 --- a/pkg/detectors/postmark/postmark.go +++ b/pkg/detectors/postmark/postmark.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/powrbot/powrbot.go b/pkg/detectors/powrbot/powrbot.go index 1880450a86b5..624c9ff0a758 100644 --- a/pkg/detectors/powrbot/powrbot.go +++ b/pkg/detectors/powrbot/powrbot.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/prodpad/prodpad.go b/pkg/detectors/prodpad/prodpad.go index 237190d43c07..30ef2429eafc 100644 --- a/pkg/detectors/prodpad/prodpad.go +++ b/pkg/detectors/prodpad/prodpad.go @@ -20,7 +20,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"prodpad"}) + `\b([a-f0-9]{64})\b`) ) @@ -60,7 +60,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) { continue } @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/prospectcrm/prospectcrm.go b/pkg/detectors/prospectcrm/prospectcrm.go index e80ccdc9e63b..15c357c448f3 100644 --- a/pkg/detectors/prospectcrm/prospectcrm.go +++ b/pkg/detectors/prospectcrm/prospectcrm.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/prospectio/prospectio.go b/pkg/detectors/prospectio/prospectio.go index ca72ecdd4e3f..e2af0d6239ab 100644 --- a/pkg/detectors/prospectio/prospectio.go +++ b/pkg/detectors/prospectio/prospectio.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/protocolsio/protocolsio.go b/pkg/detectors/protocolsio/protocolsio.go index b7e7965514a8..11207a416812 100644 --- a/pkg/detectors/protocolsio/protocolsio.go +++ b/pkg/detectors/protocolsio/protocolsio.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/proxycrawl/proxycrawl.go b/pkg/detectors/proxycrawl/proxycrawl.go index 6f58ca61c849..98a75d2f4be6 100644 --- a/pkg/detectors/proxycrawl/proxycrawl.go +++ b/pkg/detectors/proxycrawl/proxycrawl.go @@ -72,5 +72,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/pubnubpublishkey/pubnubpublishkey.go b/pkg/detectors/pubnubpublishkey/pubnubpublishkey.go index 2122fdd4cc54..5ee8ef8affa9 100644 --- a/pkg/detectors/pubnubpublishkey/pubnubpublishkey.go +++ b/pkg/detectors/pubnubpublishkey/pubnubpublishkey.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/pubnubsubscriptionkey/pubnubsubscriptionkey.go b/pkg/detectors/pubnubsubscriptionkey/pubnubsubscriptionkey.go index 3d93dfd769ea..81bbd062926e 100644 --- a/pkg/detectors/pubnubsubscriptionkey/pubnubsubscriptionkey.go +++ b/pkg/detectors/pubnubsubscriptionkey/pubnubsubscriptionkey.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/purestake/purestake.go b/pkg/detectors/purestake/purestake.go index 88f310f98ba2..6c3ce426f8cb 100644 --- a/pkg/detectors/purestake/purestake.go +++ b/pkg/detectors/purestake/purestake.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/pushbulletapikey/pushbulletapikey.go b/pkg/detectors/pushbulletapikey/pushbulletapikey.go index f8d6890111eb..dc64f230e0e8 100644 --- a/pkg/detectors/pushbulletapikey/pushbulletapikey.go +++ b/pkg/detectors/pushbulletapikey/pushbulletapikey.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/pusherchannelkey/pusherchannelkey.go b/pkg/detectors/pusherchannelkey/pusherchannelkey.go index 3fb4f9bbf670..b3f4e2b564f8 100644 --- a/pkg/detectors/pusherchannelkey/pusherchannelkey.go +++ b/pkg/detectors/pusherchannelkey/pusherchannelkey.go @@ -127,7 +127,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } func hmacBytes(toSign, secret []byte) []byte { _authSignature := hmac.New(sha256.New, secret) diff --git a/pkg/detectors/qase/qase.go b/pkg/detectors/qase/qase.go index 89a98ae7bd04..7a2e294a4cbb 100644 --- a/pkg/detectors/qase/qase.go +++ b/pkg/detectors/qase/qase.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/qualaroo/qualaroo.go b/pkg/detectors/qualaroo/qualaroo.go index f31b83c7755d..4c695c2b7d9e 100644 --- a/pkg/detectors/qualaroo/qualaroo.go +++ b/pkg/detectors/qualaroo/qualaroo.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/qubole/qubole.go b/pkg/detectors/qubole/qubole.go index ffb9fa67f6b0..5ece33949385 100644 --- a/pkg/detectors/qubole/qubole.go +++ b/pkg/detectors/qubole/qubole.go @@ -72,5 +72,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/quickmetrics/quickmetrics.go b/pkg/detectors/quickmetrics/quickmetrics.go index e4e158457b59..037bab488833 100644 --- a/pkg/detectors/quickmetrics/quickmetrics.go +++ b/pkg/detectors/quickmetrics/quickmetrics.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/rapidapi/rapidapi.go b/pkg/detectors/rapidapi/rapidapi.go index 1f4cc04558c3..013ef1380447 100644 --- a/pkg/detectors/rapidapi/rapidapi.go +++ b/pkg/detectors/rapidapi/rapidapi.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/raven/raven.go b/pkg/detectors/raven/raven.go index e866a6e0c22a..2425507f94e3 100644 --- a/pkg/detectors/raven/raven.go +++ b/pkg/detectors/raven/raven.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/rawg/rawg.go b/pkg/detectors/rawg/rawg.go index c6182a677675..5e1fceb8a0c8 100644 --- a/pkg/detectors/rawg/rawg.go +++ b/pkg/detectors/rawg/rawg.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/reachmail/reachmail.go b/pkg/detectors/reachmail/reachmail.go index 7e94b320ba20..ef3e78701ab7 100644 --- a/pkg/detectors/reachmail/reachmail.go +++ b/pkg/detectors/reachmail/reachmail.go @@ -72,5 +72,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/readme/readme.go b/pkg/detectors/readme/readme.go index 47d498a9e184..d0bcbedae61d 100644 --- a/pkg/detectors/readme/readme.go +++ b/pkg/detectors/readme/readme.go @@ -6,7 +6,6 @@ import ( "regexp" "strings" - "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" ) @@ -69,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/reallysimplesystems/reallysimplesystems.go b/pkg/detectors/reallysimplesystems/reallysimplesystems.go index d3bee2f14b93..8f3563756414 100644 --- a/pkg/detectors/reallysimplesystems/reallysimplesystems.go +++ b/pkg/detectors/reallysimplesystems/reallysimplesystems.go @@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/rebrandly/rebrandly.go b/pkg/detectors/rebrandly/rebrandly.go index bdfd823fe34a..58edd5679930 100644 --- a/pkg/detectors/rebrandly/rebrandly.go +++ b/pkg/detectors/rebrandly/rebrandly.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/rechargepayments/rechargepayments.go b/pkg/detectors/rechargepayments/rechargepayments.go index 73ea2f1cadd1..5502a03d62d7 100644 --- a/pkg/detectors/rechargepayments/rechargepayments.go +++ b/pkg/detectors/rechargepayments/rechargepayments.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/refiner/refiner.go b/pkg/detectors/refiner/refiner.go index 95f9c0864bf3..47725650ce43 100644 --- a/pkg/detectors/refiner/refiner.go +++ b/pkg/detectors/refiner/refiner.go @@ -72,5 +72,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/rentman/rentman.go b/pkg/detectors/rentman/rentman.go index 51c8e302d58b..b11dd7b87c77 100644 --- a/pkg/detectors/rentman/rentman.go +++ b/pkg/detectors/rentman/rentman.go @@ -20,7 +20,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"rentman"}) + `\b(ey[a-zA-Z0-9]{34}.ey[a-zA-Z0-9._-]{250,300})\b`) ) @@ -60,7 +60,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) { continue } @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/repairshopr/repairshopr.go b/pkg/detectors/repairshopr/repairshopr.go index 03c3da54ecc9..f0600699f5d0 100644 --- a/pkg/detectors/repairshopr/repairshopr.go +++ b/pkg/detectors/repairshopr/repairshopr.go @@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/restpack/restpack.go b/pkg/detectors/restpack/restpack.go index 2b4e3ba8c76a..3a26717a7523 100644 --- a/pkg/detectors/restpack/restpack.go +++ b/pkg/detectors/restpack/restpack.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/restpackhtmltopdfapi/restpackhtmltopdfapi.go b/pkg/detectors/restpackhtmltopdfapi/restpackhtmltopdfapi.go index f4d2a86ae4e3..f7db1641ffb8 100644 --- a/pkg/detectors/restpackhtmltopdfapi/restpackhtmltopdfapi.go +++ b/pkg/detectors/restpackhtmltopdfapi/restpackhtmltopdfapi.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/restpackscreenshotapi/restpackscreenshotapi.go b/pkg/detectors/restpackscreenshotapi/restpackscreenshotapi.go index 7aad0c7f5a9a..ea35c195402e 100644 --- a/pkg/detectors/restpackscreenshotapi/restpackscreenshotapi.go +++ b/pkg/detectors/restpackscreenshotapi/restpackscreenshotapi.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/rev/rev.go b/pkg/detectors/rev/rev.go index e23e2378adc4..85e19cb78f27 100644 --- a/pkg/detectors/rev/rev.go +++ b/pkg/detectors/rev/rev.go @@ -83,5 +83,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/revampcrm/revampcrm.go b/pkg/detectors/revampcrm/revampcrm.go index 53931001ac28..5de3f1ccdf8c 100644 --- a/pkg/detectors/revampcrm/revampcrm.go +++ b/pkg/detectors/revampcrm/revampcrm.go @@ -78,5 +78,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/ringcentral/ringcentral.go b/pkg/detectors/ringcentral/ringcentral.go index 6505f9d134ea..2fbf316ca96c 100644 --- a/pkg/detectors/ringcentral/ringcentral.go +++ b/pkg/detectors/ringcentral/ringcentral.go @@ -78,5 +78,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/ritekit/ritekit.go b/pkg/detectors/ritekit/ritekit.go index daf493999577..bb4992180456 100644 --- a/pkg/detectors/ritekit/ritekit.go +++ b/pkg/detectors/ritekit/ritekit.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/roaring/roaring.go b/pkg/detectors/roaring/roaring.go index c92317687743..86ca807ffb7e 100644 --- a/pkg/detectors/roaring/roaring.go +++ b/pkg/detectors/roaring/roaring.go @@ -84,5 +84,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/rocketreach/rocketreach.go b/pkg/detectors/rocketreach/rocketreach.go index 0ac22a91aae3..0c259b75f178 100644 --- a/pkg/detectors/rocketreach/rocketreach.go +++ b/pkg/detectors/rocketreach/rocketreach.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/rockset/rockset.go b/pkg/detectors/rockset/rockset.go index 524087dd56ef..3ba2665c14fd 100644 --- a/pkg/detectors/rockset/rockset.go +++ b/pkg/detectors/rockset/rockset.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/roninapp/roninapp.go b/pkg/detectors/roninapp/roninapp.go index 3b57bae6cedd..5d7a2af5ad8a 100644 --- a/pkg/detectors/roninapp/roninapp.go +++ b/pkg/detectors/roninapp/roninapp.go @@ -84,5 +84,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/route4me/route4me.go b/pkg/detectors/route4me/route4me.go index b0fbbff575f4..b42d4325332b 100644 --- a/pkg/detectors/route4me/route4me.go +++ b/pkg/detectors/route4me/route4me.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/rownd/rownd.go b/pkg/detectors/rownd/rownd.go index 2a03c9a98d8c..adcbb00e494e 100644 --- a/pkg/detectors/rownd/rownd.go +++ b/pkg/detectors/rownd/rownd.go @@ -91,5 +91,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/rubygems/rubygems.go b/pkg/detectors/rubygems/rubygems.go index 855f6b3495d1..2a07cac7e389 100644 --- a/pkg/detectors/rubygems/rubygems.go +++ b/pkg/detectors/rubygems/rubygems.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/runrunit/runrunit.go b/pkg/detectors/runrunit/runrunit.go index 0dd1b50d6625..d0bddd318c99 100644 --- a/pkg/detectors/runrunit/runrunit.go +++ b/pkg/detectors/runrunit/runrunit.go @@ -83,5 +83,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/salesblink/salesblink.go b/pkg/detectors/salesblink/salesblink.go index 47e1ff8dbb87..a5f0a907ed9b 100644 --- a/pkg/detectors/salesblink/salesblink.go +++ b/pkg/detectors/salesblink/salesblink.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/salescookie/salescookie.go b/pkg/detectors/salescookie/salescookie.go index bb9139fe2680..862b5d01b675 100644 --- a/pkg/detectors/salescookie/salescookie.go +++ b/pkg/detectors/salescookie/salescookie.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/salesflare/salesflare.go b/pkg/detectors/salesflare/salesflare.go index 0ec14a3378d7..70e1b724f6a3 100644 --- a/pkg/detectors/salesflare/salesflare.go +++ b/pkg/detectors/salesflare/salesflare.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/salesmate/salesmate.go b/pkg/detectors/salesmate/salesmate.go index 83b94522b9a2..c9e7477ad202 100644 --- a/pkg/detectors/salesmate/salesmate.go +++ b/pkg/detectors/salesmate/salesmate.go @@ -20,8 +20,8 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives - keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"salesmate"}) + `\b([0-9Aa-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\b`) + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives + keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"salesmate"}) + `\b([0-9Aa-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\b`) domainPat = regexp.MustCompile(detectors.PrefixRegex([]string{"salesmate"}) + `\b([a-z0-9A-Z]{3,22})\b`) ) @@ -52,14 +52,14 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result DetectorType: detectorspb.DetectorType_Salesmate, Raw: []byte(resMatch), } - + if verify { - url := fmt.Sprintf("https://%s.salesmate.io/apis/v3/companies/1?trackingRecentSearch=true",resIdMatch) + url := fmt.Sprintf("https://%s.salesmate.io/apis/v3/companies/1?trackingRecentSearch=true", resIdMatch) req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { continue } - + req.Header.Add("Content-Type", "application/json") req.Header.Add("sessionToken", resMatch) res, err := client.Do(req) @@ -68,18 +68,18 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, 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 detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/satismeterprojectkey/satismeterprojectkey.go b/pkg/detectors/satismeterprojectkey/satismeterprojectkey.go index 3496bcfc3b92..8966988726c1 100644 --- a/pkg/detectors/satismeterprojectkey/satismeterprojectkey.go +++ b/pkg/detectors/satismeterprojectkey/satismeterprojectkey.go @@ -95,5 +95,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/satismeterwritekey/satismeterwritekey.go b/pkg/detectors/satismeterwritekey/satismeterwritekey.go index 1fb5df904f51..a50b14e24226 100644 --- a/pkg/detectors/satismeterwritekey/satismeterwritekey.go +++ b/pkg/detectors/satismeterwritekey/satismeterwritekey.go @@ -75,5 +75,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/saucelabs/saucelabs.go b/pkg/detectors/saucelabs/saucelabs.go index 796321cc31f5..488fd10aeb7c 100644 --- a/pkg/detectors/saucelabs/saucelabs.go +++ b/pkg/detectors/saucelabs/saucelabs.go @@ -66,7 +66,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result continue } req.Header.Add("Authorization", fmt.Sprintf("Basic %s", encoded)) - //req.SetBasicAuth(idMatch, keyMatch) + // req.SetBasicAuth(idMatch, keyMatch) res, err := client.Do(req) if err == nil { defer res.Body.Close() @@ -85,5 +85,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/scalewaykey/scalewaykey.go b/pkg/detectors/scalewaykey/scalewaykey.go index f0f1de83b7b5..1e5a44acb2f5 100644 --- a/pkg/detectors/scalewaykey/scalewaykey.go +++ b/pkg/detectors/scalewaykey/scalewaykey.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/scalr/scalr.go b/pkg/detectors/scalr/scalr.go index baaf74e09109..2330ab2c2471 100644 --- a/pkg/detectors/scalr/scalr.go +++ b/pkg/detectors/scalr/scalr.go @@ -20,9 +20,9 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"scalr"}) + `\b([0-9a-zA-Z._]{136})`) - idPat = regexp.MustCompile(detectors.PrefixRegex([]string{"scalr"}) + `\b([0-9a-z]{4,50})\b`) + idPat = regexp.MustCompile(detectors.PrefixRegex([]string{"scalr"}) + `\b([0-9a-z]{4,50})\b`) ) // Keywords are used for efficiently pre-filtering chunks. @@ -52,34 +52,34 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result DetectorType: detectorspb.DetectorType_Scalr, Raw: []byte(resMatch), } - + if verify { - url := fmt.Sprintf("https://%s.scalr.io/api/iacp/v3/agents",resIdMatch) + url := fmt.Sprintf("https://%s.scalr.io/api/iacp/v3/agents", resIdMatch) req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { continue } - req.Header.Add("Authorization", fmt.Sprintf("Bearer %s",resMatch)) + req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch)) req.Header.Add("Content-Type", "application/vnd.api+json") req.Header.Add("Prefer", "profile=preview") res, err := client.Do(req) if err == nil { defer res.Body.Close() if res.StatusCode >= 200 && res.StatusCode < 300 { - s1.Verified = 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 + // This function will check false positives for common test words, 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 detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/scrapeowl/scrapeowl.go b/pkg/detectors/scrapeowl/scrapeowl.go index c55c76b1d1a9..bbf681cad7fc 100644 --- a/pkg/detectors/scrapeowl/scrapeowl.go +++ b/pkg/detectors/scrapeowl/scrapeowl.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/scraperapi/scraperapi.go b/pkg/detectors/scraperapi/scraperapi.go index 82b85f9c4977..e71d8e252a75 100644 --- a/pkg/detectors/scraperapi/scraperapi.go +++ b/pkg/detectors/scraperapi/scraperapi.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/scraperbox/scraperbox.go b/pkg/detectors/scraperbox/scraperbox.go index d50afc59e17b..d9d0f6b7a335 100644 --- a/pkg/detectors/scraperbox/scraperbox.go +++ b/pkg/detectors/scraperbox/scraperbox.go @@ -72,5 +72,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/scrapersite/scrapersite.go b/pkg/detectors/scrapersite/scrapersite.go index 2b14a3b9a43b..e7b6c55274f3 100644 --- a/pkg/detectors/scrapersite/scrapersite.go +++ b/pkg/detectors/scrapersite/scrapersite.go @@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/scrapestack/scrapestack.go b/pkg/detectors/scrapestack/scrapestack.go index 41eb3f5d790f..7ff5b29b976b 100644 --- a/pkg/detectors/scrapestack/scrapestack.go +++ b/pkg/detectors/scrapestack/scrapestack.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/scrapfly/scrapfly.go b/pkg/detectors/scrapfly/scrapfly.go index 4c9352c1aa33..c0fa5cf7c1a0 100644 --- a/pkg/detectors/scrapfly/scrapfly.go +++ b/pkg/detectors/scrapfly/scrapfly.go @@ -72,5 +72,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/scrapingant/scrapingant.go b/pkg/detectors/scrapingant/scrapingant.go index 9d57e6ab93a5..f19e3ea4744f 100644 --- a/pkg/detectors/scrapingant/scrapingant.go +++ b/pkg/detectors/scrapingant/scrapingant.go @@ -72,5 +72,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/scrapingbee/scrapingbee.go b/pkg/detectors/scrapingbee/scrapingbee.go index e31771962357..61ca862e50ad 100644 --- a/pkg/detectors/scrapingbee/scrapingbee.go +++ b/pkg/detectors/scrapingbee/scrapingbee.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/screenshotapi/screenshotapi.go b/pkg/detectors/screenshotapi/screenshotapi.go index 5c701138ac29..0420b0d8f87a 100644 --- a/pkg/detectors/screenshotapi/screenshotapi.go +++ b/pkg/detectors/screenshotapi/screenshotapi.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/screenshotlayer/screenshotlayer.go b/pkg/detectors/screenshotlayer/screenshotlayer.go index 8fa64590c129..ace60d55dcb7 100644 --- a/pkg/detectors/screenshotlayer/screenshotlayer.go +++ b/pkg/detectors/screenshotlayer/screenshotlayer.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/scrutinizerci/scrutinizerci.go b/pkg/detectors/scrutinizerci/scrutinizerci.go index 003f24a99fcb..612bd69303c7 100644 --- a/pkg/detectors/scrutinizerci/scrutinizerci.go +++ b/pkg/detectors/scrutinizerci/scrutinizerci.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/securitytrails/securitytrails.go b/pkg/detectors/securitytrails/securitytrails.go index 0c777dd259b8..aab33272e8d2 100644 --- a/pkg/detectors/securitytrails/securitytrails.go +++ b/pkg/detectors/securitytrails/securitytrails.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/segmentapikey/segmentapikey.go b/pkg/detectors/segmentapikey/segmentapikey.go index 8ab80d6d3726..89865f89717c 100644 --- a/pkg/detectors/segmentapikey/segmentapikey.go +++ b/pkg/detectors/segmentapikey/segmentapikey.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/selectpdf/selectpdf.go b/pkg/detectors/selectpdf/selectpdf.go index 8716d2f22e53..c8c39f81e9df 100644 --- a/pkg/detectors/selectpdf/selectpdf.go +++ b/pkg/detectors/selectpdf/selectpdf.go @@ -72,5 +72,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/semaphore/semaphore.go b/pkg/detectors/semaphore/semaphore.go index bddecc80b86b..763911ae9fe6 100644 --- a/pkg/detectors/semaphore/semaphore.go +++ b/pkg/detectors/semaphore/semaphore.go @@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/sendbird/sendbird.go b/pkg/detectors/sendbird/sendbird.go index e21b147255ad..a9abb4775fff 100644 --- a/pkg/detectors/sendbird/sendbird.go +++ b/pkg/detectors/sendbird/sendbird.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/sendbirdorganizationapi/sendbirdorganizationapi.go b/pkg/detectors/sendbirdorganizationapi/sendbirdorganizationapi.go index dfd227df8cbb..46e270c25b8e 100644 --- a/pkg/detectors/sendbirdorganizationapi/sendbirdorganizationapi.go +++ b/pkg/detectors/sendbirdorganizationapi/sendbirdorganizationapi.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/sendinbluev2/sendinbluev2.go b/pkg/detectors/sendinbluev2/sendinbluev2.go index 27e87e3da88d..be1533ad2e6f 100644 --- a/pkg/detectors/sendinbluev2/sendinbluev2.go +++ b/pkg/detectors/sendinbluev2/sendinbluev2.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/sentiment/sentiment.go b/pkg/detectors/sentiment/sentiment.go index 0155bb39b995..9b7ed6728d72 100644 --- a/pkg/detectors/sentiment/sentiment.go +++ b/pkg/detectors/sentiment/sentiment.go @@ -84,5 +84,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/sentrytoken/sentrytoken.go b/pkg/detectors/sentrytoken/sentrytoken.go index 6822f063f050..12f9b6b72e55 100644 --- a/pkg/detectors/sentrytoken/sentrytoken.go +++ b/pkg/detectors/sentrytoken/sentrytoken.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/serphouse/serphouse.go b/pkg/detectors/serphouse/serphouse.go index f7263761e653..88693aa5acde 100644 --- a/pkg/detectors/serphouse/serphouse.go +++ b/pkg/detectors/serphouse/serphouse.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/serpstack/serpstack.go b/pkg/detectors/serpstack/serpstack.go index 8fac9dcfae57..9d8a39991346 100644 --- a/pkg/detectors/serpstack/serpstack.go +++ b/pkg/detectors/serpstack/serpstack.go @@ -82,5 +82,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/sheety/sheety.go b/pkg/detectors/sheety/sheety.go index 99dcf8dc0f71..73a78c2a466b 100644 --- a/pkg/detectors/sheety/sheety.go +++ b/pkg/detectors/sheety/sheety.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/sherpadesk/sherpadesk.go b/pkg/detectors/sherpadesk/sherpadesk.go index 3e4bab1cced6..455dbebc5ec1 100644 --- a/pkg/detectors/sherpadesk/sherpadesk.go +++ b/pkg/detectors/sherpadesk/sherpadesk.go @@ -74,5 +74,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/shipday/shipday.go b/pkg/detectors/shipday/shipday.go index 883b8cdef951..841e4fdda028 100644 --- a/pkg/detectors/shipday/shipday.go +++ b/pkg/detectors/shipday/shipday.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/shodankey/shodankey.go b/pkg/detectors/shodankey/shodankey.go index 358eeafca137..624823f33bf8 100644 --- a/pkg/detectors/shodankey/shodankey.go +++ b/pkg/detectors/shodankey/shodankey.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/shortcut/shortcut.go b/pkg/detectors/shortcut/shortcut.go index 3e9194855d26..a8a4ebdb90da 100644 --- a/pkg/detectors/shortcut/shortcut.go +++ b/pkg/detectors/shortcut/shortcut.go @@ -78,5 +78,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/shotstack/shotstack.go b/pkg/detectors/shotstack/shotstack.go index 2f6e7640bfaa..b926b028fa1e 100644 --- a/pkg/detectors/shotstack/shotstack.go +++ b/pkg/detectors/shotstack/shotstack.go @@ -101,5 +101,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/shutterstock/shutterstock.go b/pkg/detectors/shutterstock/shutterstock.go index 3597fc006989..519ed89ad5b5 100644 --- a/pkg/detectors/shutterstock/shutterstock.go +++ b/pkg/detectors/shutterstock/shutterstock.go @@ -83,5 +83,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/shutterstockoauth/shutterstockoauth.go b/pkg/detectors/shutterstockoauth/shutterstockoauth.go index 4850036bedff..a90f530fac69 100644 --- a/pkg/detectors/shutterstockoauth/shutterstockoauth.go +++ b/pkg/detectors/shutterstockoauth/shutterstockoauth.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/signable/signable.go b/pkg/detectors/signable/signable.go index fdd909084ee3..dd4182d44461 100644 --- a/pkg/detectors/signable/signable.go +++ b/pkg/detectors/signable/signable.go @@ -75,5 +75,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/signalwire/signalwire.go b/pkg/detectors/signalwire/signalwire.go index 6a2e2a7ddaeb..d800f5e5baec 100644 --- a/pkg/detectors/signalwire/signalwire.go +++ b/pkg/detectors/signalwire/signalwire.go @@ -92,5 +92,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/signaturit/signaturit.go b/pkg/detectors/signaturit/signaturit.go index b00ccb3620d1..c7b2955ff064 100644 --- a/pkg/detectors/signaturit/signaturit.go +++ b/pkg/detectors/signaturit/signaturit.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/signupgenius/signupgenius.go b/pkg/detectors/signupgenius/signupgenius.go index b24f69c0669b..7818a2e6edbc 100644 --- a/pkg/detectors/signupgenius/signupgenius.go +++ b/pkg/detectors/signupgenius/signupgenius.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/sigopt/sigopt.go b/pkg/detectors/sigopt/sigopt.go index 6e9188e34344..e076f9fca6ad 100644 --- a/pkg/detectors/sigopt/sigopt.go +++ b/pkg/detectors/sigopt/sigopt.go @@ -74,5 +74,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/simfin/simfin.go b/pkg/detectors/simfin/simfin.go index 45b8b038e2b1..3d60d560444e 100644 --- a/pkg/detectors/simfin/simfin.go +++ b/pkg/detectors/simfin/simfin.go @@ -77,5 +77,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/simplesat/simplesat.go b/pkg/detectors/simplesat/simplesat.go index 9c86b82ddbd4..6109941b6972 100644 --- a/pkg/detectors/simplesat/simplesat.go +++ b/pkg/detectors/simplesat/simplesat.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/simplynoted/simplynoted.go b/pkg/detectors/simplynoted/simplynoted.go index e85b07d0df0b..3e801269c4ed 100644 --- a/pkg/detectors/simplynoted/simplynoted.go +++ b/pkg/detectors/simplynoted/simplynoted.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/simvoly/simvoly.go b/pkg/detectors/simvoly/simvoly.go index 5fa997fb820b..494b60608f8e 100644 --- a/pkg/detectors/simvoly/simvoly.go +++ b/pkg/detectors/simvoly/simvoly.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/sinchmessage/sinchmessage.go b/pkg/detectors/sinchmessage/sinchmessage.go index 31de4b5c25e3..c33fc54b3686 100644 --- a/pkg/detectors/sinchmessage/sinchmessage.go +++ b/pkg/detectors/sinchmessage/sinchmessage.go @@ -86,5 +86,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/sirv/sirv.go b/pkg/detectors/sirv/sirv.go index aa5c0cbb7929..82af5d7c73fd 100644 --- a/pkg/detectors/sirv/sirv.go +++ b/pkg/detectors/sirv/sirv.go @@ -83,5 +83,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/siteleaf/siteleaf.go b/pkg/detectors/siteleaf/siteleaf.go index e33227ca9c21..115c8bd2a820 100644 --- a/pkg/detectors/siteleaf/siteleaf.go +++ b/pkg/detectors/siteleaf/siteleaf.go @@ -85,5 +85,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/skrappio/skrappio.go b/pkg/detectors/skrappio/skrappio.go index bad489d574cf..5cef5975de66 100644 --- a/pkg/detectors/skrappio/skrappio.go +++ b/pkg/detectors/skrappio/skrappio.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/skybiometry/skybiometry.go b/pkg/detectors/skybiometry/skybiometry.go index e2727b7a1929..ce4dcf9e17a6 100644 --- a/pkg/detectors/skybiometry/skybiometry.go +++ b/pkg/detectors/skybiometry/skybiometry.go @@ -87,5 +87,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/slackwebhook/slackwebhook.go b/pkg/detectors/slackwebhook/slackwebhook.go index 739ba721c49a..3d977f5b0922 100644 --- a/pkg/detectors/slackwebhook/slackwebhook.go +++ b/pkg/detectors/slackwebhook/slackwebhook.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/smartsheets/smartsheets.go b/pkg/detectors/smartsheets/smartsheets.go index ac82df31eb1a..6ca344f7079c 100644 --- a/pkg/detectors/smartsheets/smartsheets.go +++ b/pkg/detectors/smartsheets/smartsheets.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/smartystreets/smartystreets.go b/pkg/detectors/smartystreets/smartystreets.go index 2d3ba927c42c..dc023e546bb1 100644 --- a/pkg/detectors/smartystreets/smartystreets.go +++ b/pkg/detectors/smartystreets/smartystreets.go @@ -78,5 +78,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/smooch/smooch.go b/pkg/detectors/smooch/smooch.go index 5f2b5249e9b1..796c48b02b19 100644 --- a/pkg/detectors/smooch/smooch.go +++ b/pkg/detectors/smooch/smooch.go @@ -83,5 +83,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/snipcart/snipcart.go b/pkg/detectors/snipcart/snipcart.go index be18c9652b34..6c549b193c92 100644 --- a/pkg/detectors/snipcart/snipcart.go +++ b/pkg/detectors/snipcart/snipcart.go @@ -74,5 +74,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/snykkey/snykkey.go b/pkg/detectors/snykkey/snykkey.go index b52cc4954994..76c83a3e1790 100644 --- a/pkg/detectors/snykkey/snykkey.go +++ b/pkg/detectors/snykkey/snykkey.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/sonarcloud/sonarcloud.go b/pkg/detectors/sonarcloud/sonarcloud.go index 39e1c1ea22a3..b057b2a49ef4 100644 --- a/pkg/detectors/sonarcloud/sonarcloud.go +++ b/pkg/detectors/sonarcloud/sonarcloud.go @@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/speechtextai/speechtextai.go b/pkg/detectors/speechtextai/speechtextai.go index 4a750a68c45f..d45b0ef50505 100644 --- a/pkg/detectors/speechtextai/speechtextai.go +++ b/pkg/detectors/speechtextai/speechtextai.go @@ -20,7 +20,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"speechtext"}) + common.BuildRegex(common.HexPattern, "", 32)) ) @@ -62,7 +62,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) { continue } @@ -73,5 +73,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/splunkobservabilitytoken/splunkobservabilitytoken.go b/pkg/detectors/splunkobservabilitytoken/splunkobservabilitytoken.go index 42f2e0a68843..a891f9d18862 100644 --- a/pkg/detectors/splunkobservabilitytoken/splunkobservabilitytoken.go +++ b/pkg/detectors/splunkobservabilitytoken/splunkobservabilitytoken.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/spoonacular/spoonacular.go b/pkg/detectors/spoonacular/spoonacular.go index abd33fb9ac43..45982f135332 100644 --- a/pkg/detectors/spoonacular/spoonacular.go +++ b/pkg/detectors/spoonacular/spoonacular.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/sportradar/sportradar.go b/pkg/detectors/sportradar/sportradar.go index 9d4440ca286e..54c79f9b50db 100644 --- a/pkg/detectors/sportradar/sportradar.go +++ b/pkg/detectors/sportradar/sportradar.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/sportsmonk/sportsmonk.go b/pkg/detectors/sportsmonk/sportsmonk.go index ddb921535e69..c3f1f3306502 100644 --- a/pkg/detectors/sportsmonk/sportsmonk.go +++ b/pkg/detectors/sportsmonk/sportsmonk.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/spotifykey/spotifykey.go b/pkg/detectors/spotifykey/spotifykey.go index fa386efcd506..f097ffaf9c11 100644 --- a/pkg/detectors/spotifykey/spotifykey.go +++ b/pkg/detectors/spotifykey/spotifykey.go @@ -75,5 +75,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/squarespace/squarespace.go b/pkg/detectors/squarespace/squarespace.go index 6525f13debee..74112c71c6d2 100644 --- a/pkg/detectors/squarespace/squarespace.go +++ b/pkg/detectors/squarespace/squarespace.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/squareup/squareup.go b/pkg/detectors/squareup/squareup.go index e131f2340b61..1a07a86e0cd1 100644 --- a/pkg/detectors/squareup/squareup.go +++ b/pkg/detectors/squareup/squareup.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/sslmate/sslmate.go b/pkg/detectors/sslmate/sslmate.go index b965df804d56..2dee72eed249 100644 --- a/pkg/detectors/sslmate/sslmate.go +++ b/pkg/detectors/sslmate/sslmate.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/statuscake/statuscake.go b/pkg/detectors/statuscake/statuscake.go index 0650251237d2..5afbaa52c573 100644 --- a/pkg/detectors/statuscake/statuscake.go +++ b/pkg/detectors/statuscake/statuscake.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/statuspage/statuspage.go b/pkg/detectors/statuspage/statuspage.go index f72fe3dbead0..f01ee06e5e28 100644 --- a/pkg/detectors/statuspage/statuspage.go +++ b/pkg/detectors/statuspage/statuspage.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/statuspal/statuspal.go b/pkg/detectors/statuspal/statuspal.go index fc98cb527ba0..6c89796729b4 100644 --- a/pkg/detectors/statuspal/statuspal.go +++ b/pkg/detectors/statuspal/statuspal.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/stitchdata/stitchdata.go b/pkg/detectors/stitchdata/stitchdata.go index edb342fd025f..7052c409b82b 100644 --- a/pkg/detectors/stitchdata/stitchdata.go +++ b/pkg/detectors/stitchdata/stitchdata.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/stockdata/stockdata.go b/pkg/detectors/stockdata/stockdata.go index 43345efd0620..27b0102b6653 100644 --- a/pkg/detectors/stockdata/stockdata.go +++ b/pkg/detectors/stockdata/stockdata.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/storecove/storecove.go b/pkg/detectors/storecove/storecove.go index 15edb2d58e7a..468a00be9fb0 100644 --- a/pkg/detectors/storecove/storecove.go +++ b/pkg/detectors/storecove/storecove.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/stormboard/stormboard.go b/pkg/detectors/stormboard/stormboard.go index af83b3338f0d..90f5d2e93dfc 100644 --- a/pkg/detectors/stormboard/stormboard.go +++ b/pkg/detectors/stormboard/stormboard.go @@ -19,7 +19,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"stormboard"}) + `\b([a-f0-9]{40})\b`) ) @@ -51,14 +51,14 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if err != nil { continue } - req.Header.Add("X-API-Key",resMatch) + req.Header.Add("X-API-Key", resMatch) res, err := client.Do(req) if err == nil { defer res.Body.Close() if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) { continue } @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/storyblok/storyblok.go b/pkg/detectors/storyblok/storyblok.go index 5d2682b3b3f5..2db3576b1faf 100644 --- a/pkg/detectors/storyblok/storyblok.go +++ b/pkg/detectors/storyblok/storyblok.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/storychief/storychief.go b/pkg/detectors/storychief/storychief.go index d85a9348cbd0..c72db30d3337 100644 --- a/pkg/detectors/storychief/storychief.go +++ b/pkg/detectors/storychief/storychief.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/strava/strava.go b/pkg/detectors/strava/strava.go index 1de0356c98f0..795f81f488b4 100644 --- a/pkg/detectors/strava/strava.go +++ b/pkg/detectors/strava/strava.go @@ -90,5 +90,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/streak/streak.go b/pkg/detectors/streak/streak.go index c3adcbf97906..529e798ee72b 100644 --- a/pkg/detectors/streak/streak.go +++ b/pkg/detectors/streak/streak.go @@ -73,5 +73,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/stytch/stytch.go b/pkg/detectors/stytch/stytch.go index f5b5a09e66ba..8befdddb56b2 100644 --- a/pkg/detectors/stytch/stytch.go +++ b/pkg/detectors/stytch/stytch.go @@ -77,5 +77,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/sugester/sugester.go b/pkg/detectors/sugester/sugester.go index cce6be9eec1a..b241969e8e0e 100644 --- a/pkg/detectors/sugester/sugester.go +++ b/pkg/detectors/sugester/sugester.go @@ -78,5 +78,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/sumologickey/sumologickey.go b/pkg/detectors/sumologickey/sumologickey.go index 50b4ebbafb6e..499b323ef878 100644 --- a/pkg/detectors/sumologickey/sumologickey.go +++ b/pkg/detectors/sumologickey/sumologickey.go @@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/supernotesapi/supernotesapi.go b/pkg/detectors/supernotesapi/supernotesapi.go index 20ca55f2b61d..5762455d661f 100644 --- a/pkg/detectors/supernotesapi/supernotesapi.go +++ b/pkg/detectors/supernotesapi/supernotesapi.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/surveyanyplace/surveyanyplace.go b/pkg/detectors/surveyanyplace/surveyanyplace.go index f74e8690d805..30a644a614ef 100644 --- a/pkg/detectors/surveyanyplace/surveyanyplace.go +++ b/pkg/detectors/surveyanyplace/surveyanyplace.go @@ -87,5 +87,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/surveybot/surveybot.go b/pkg/detectors/surveybot/surveybot.go index 9aa9289092ee..4f19dde24578 100644 --- a/pkg/detectors/surveybot/surveybot.go +++ b/pkg/detectors/surveybot/surveybot.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/surveysparrow/surveysparrow.go b/pkg/detectors/surveysparrow/surveysparrow.go index 698e71e5068c..e74cf40f09b3 100644 --- a/pkg/detectors/surveysparrow/surveysparrow.go +++ b/pkg/detectors/surveysparrow/surveysparrow.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/survicate/survicate.go b/pkg/detectors/survicate/survicate.go index 8ef4884aa355..a474d2819714 100644 --- a/pkg/detectors/survicate/survicate.go +++ b/pkg/detectors/survicate/survicate.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/swell/swell.go b/pkg/detectors/swell/swell.go index 2682cc09902c..a50e42db1bd7 100644 --- a/pkg/detectors/swell/swell.go +++ b/pkg/detectors/swell/swell.go @@ -77,5 +77,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/swiftype/swiftype.go b/pkg/detectors/swiftype/swiftype.go index 3a36c420b11a..e4f5fc87a839 100644 --- a/pkg/detectors/swiftype/swiftype.go +++ b/pkg/detectors/swiftype/swiftype.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/tallyfy/tallyfy.go b/pkg/detectors/tallyfy/tallyfy.go index 533b70d13a96..e91f3c1fa3c9 100644 --- a/pkg/detectors/tallyfy/tallyfy.go +++ b/pkg/detectors/tallyfy/tallyfy.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/tatumio/tatumio.go b/pkg/detectors/tatumio/tatumio.go index 8063e94ccb45..885f7b370ae9 100644 --- a/pkg/detectors/tatumio/tatumio.go +++ b/pkg/detectors/tatumio/tatumio.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/taxjar/taxjar.go b/pkg/detectors/taxjar/taxjar.go index 385b706b072f..7d7b3507ed4d 100644 --- a/pkg/detectors/taxjar/taxjar.go +++ b/pkg/detectors/taxjar/taxjar.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/teamgate/teamgate.go b/pkg/detectors/teamgate/teamgate.go index c76304d63227..4957519205c1 100644 --- a/pkg/detectors/teamgate/teamgate.go +++ b/pkg/detectors/teamgate/teamgate.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/teamworkcrm/teamworkcrm.go b/pkg/detectors/teamworkcrm/teamworkcrm.go index 88eeee9dd384..a34aabd477a0 100644 --- a/pkg/detectors/teamworkcrm/teamworkcrm.go +++ b/pkg/detectors/teamworkcrm/teamworkcrm.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/teamworkdesk/teamworkdesk.go b/pkg/detectors/teamworkdesk/teamworkdesk.go index 3421d27f47ef..4df974edf40d 100644 --- a/pkg/detectors/teamworkdesk/teamworkdesk.go +++ b/pkg/detectors/teamworkdesk/teamworkdesk.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/teamworkspaces/teamworkspaces.go b/pkg/detectors/teamworkspaces/teamworkspaces.go index 253705e7d27f..4c27fa062a7b 100644 --- a/pkg/detectors/teamworkspaces/teamworkspaces.go +++ b/pkg/detectors/teamworkspaces/teamworkspaces.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/technicalanalysisapi/technicalanalysisapi.go b/pkg/detectors/technicalanalysisapi/technicalanalysisapi.go index c2812f86e65a..05e756432dd2 100644 --- a/pkg/detectors/technicalanalysisapi/technicalanalysisapi.go +++ b/pkg/detectors/technicalanalysisapi/technicalanalysisapi.go @@ -72,5 +72,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/tefter/tefter.go b/pkg/detectors/tefter/tefter.go index 9767c3c993b7..9f7085de2b30 100644 --- a/pkg/detectors/tefter/tefter.go +++ b/pkg/detectors/tefter/tefter.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/telegrambottoken/telegrambottoken.go b/pkg/detectors/telegrambottoken/telegrambottoken.go index 7e560baeca20..149a760eb052 100644 --- a/pkg/detectors/telegrambottoken/telegrambottoken.go +++ b/pkg/detectors/telegrambottoken/telegrambottoken.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/teletype/teletype.go b/pkg/detectors/teletype/teletype.go index 905bf6a8d3f1..5bd0130c0c7b 100644 --- a/pkg/detectors/teletype/teletype.go +++ b/pkg/detectors/teletype/teletype.go @@ -83,5 +83,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/telnyx/telnyx.go b/pkg/detectors/telnyx/telnyx.go index 7da32ae995d4..d40be13e37f7 100644 --- a/pkg/detectors/telnyx/telnyx.go +++ b/pkg/detectors/telnyx/telnyx.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/terraformcloudpersonaltoken/terraformcloudpersonaltoken.go b/pkg/detectors/terraformcloudpersonaltoken/terraformcloudpersonaltoken.go index 5f211b1f4d04..30bd7d01522f 100644 --- a/pkg/detectors/terraformcloudpersonaltoken/terraformcloudpersonaltoken.go +++ b/pkg/detectors/terraformcloudpersonaltoken/terraformcloudpersonaltoken.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/testdetector/testdetector.go b/pkg/detectors/testdetector/testdetector.go index 8d610bc4d707..be41da31ae16 100644 --- a/pkg/detectors/testdetector/testdetector.go +++ b/pkg/detectors/testdetector/testdetector.go @@ -51,5 +51,5 @@ func (d Detector) FromData(ctx context.Context, verify bool, data []byte) (resul results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/testingbot/testingbot.go b/pkg/detectors/testingbot/testingbot.go index cc85568aa35e..75977274a102 100644 --- a/pkg/detectors/testingbot/testingbot.go +++ b/pkg/detectors/testingbot/testingbot.go @@ -77,5 +77,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/text2data/text2data.go b/pkg/detectors/text2data/text2data.go index 2e5ed68fdb82..7429d971d0e8 100644 --- a/pkg/detectors/text2data/text2data.go +++ b/pkg/detectors/text2data/text2data.go @@ -85,7 +85,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } type Response struct { diff --git a/pkg/detectors/textmagic/textmagic.go b/pkg/detectors/textmagic/textmagic.go index fc1839987423..50995fa30141 100644 --- a/pkg/detectors/textmagic/textmagic.go +++ b/pkg/detectors/textmagic/textmagic.go @@ -84,5 +84,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/theoddsapi/theoddsapi.go b/pkg/detectors/theoddsapi/theoddsapi.go index 482f422c0820..9915635966f2 100644 --- a/pkg/detectors/theoddsapi/theoddsapi.go +++ b/pkg/detectors/theoddsapi/theoddsapi.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/thinkific/thinkific.go b/pkg/detectors/thinkific/thinkific.go index 11e96f9c036d..d7343b0f7f1d 100644 --- a/pkg/detectors/thinkific/thinkific.go +++ b/pkg/detectors/thinkific/thinkific.go @@ -89,5 +89,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/thousandeyes/thousandeyes.go b/pkg/detectors/thousandeyes/thousandeyes.go index 9ad83f464d92..fee648071c6d 100644 --- a/pkg/detectors/thousandeyes/thousandeyes.go +++ b/pkg/detectors/thousandeyes/thousandeyes.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/ticketmaster/ticketmaster.go b/pkg/detectors/ticketmaster/ticketmaster.go index 3d1dee97f8c4..34c274cfa82e 100644 --- a/pkg/detectors/ticketmaster/ticketmaster.go +++ b/pkg/detectors/ticketmaster/ticketmaster.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/tickettailor/tickettailor.go b/pkg/detectors/tickettailor/tickettailor.go index 3aa53c956ec0..96b78d7aed7c 100644 --- a/pkg/detectors/tickettailor/tickettailor.go +++ b/pkg/detectors/tickettailor/tickettailor.go @@ -2,11 +2,11 @@ package tickettailor import ( "context" + b64 "encoding/base64" "fmt" "net/http" "regexp" "strings" - b64 "encoding/base64" "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" @@ -21,7 +21,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"tickettailor"}) + `\b(sk[a-fA-Z0-9_]{45})\b`) ) @@ -63,7 +63,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) { continue } @@ -74,5 +74,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/tiingo/tiingo.go b/pkg/detectors/tiingo/tiingo.go index 579118d314b1..4e71dd680d4c 100644 --- a/pkg/detectors/tiingo/tiingo.go +++ b/pkg/detectors/tiingo/tiingo.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/timecamp/timecamp.go b/pkg/detectors/timecamp/timecamp.go index 5211f89c3a68..b75745080f8a 100644 --- a/pkg/detectors/timecamp/timecamp.go +++ b/pkg/detectors/timecamp/timecamp.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/timezoneapi/timezoneapi.go b/pkg/detectors/timezoneapi/timezoneapi.go index 06d3d3b87a86..a35002aca018 100644 --- a/pkg/detectors/timezoneapi/timezoneapi.go +++ b/pkg/detectors/timezoneapi/timezoneapi.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/tly/tly.go b/pkg/detectors/tly/tly.go index d600b769d915..b2866de0b164 100644 --- a/pkg/detectors/tly/tly.go +++ b/pkg/detectors/tly/tly.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/tmetric/tmetric.go b/pkg/detectors/tmetric/tmetric.go index a29bb5d418d9..d9f023b76a15 100644 --- a/pkg/detectors/tmetric/tmetric.go +++ b/pkg/detectors/tmetric/tmetric.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/todoist/todoist.go b/pkg/detectors/todoist/todoist.go index e7815bd796c1..1cfd41f45957 100644 --- a/pkg/detectors/todoist/todoist.go +++ b/pkg/detectors/todoist/todoist.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/toggltrack/toggltrack.go b/pkg/detectors/toggltrack/toggltrack.go index 7d1d8c912fbd..a71112d674fc 100644 --- a/pkg/detectors/toggltrack/toggltrack.go +++ b/pkg/detectors/toggltrack/toggltrack.go @@ -74,5 +74,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/tokeet/tokeet.go b/pkg/detectors/tokeet/tokeet.go index 8ee4ff039215..035d3f9cad57 100644 --- a/pkg/detectors/tokeet/tokeet.go +++ b/pkg/detectors/tokeet/tokeet.go @@ -20,10 +20,9 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"tokeet"}) + `\b([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\b`) - idPat = regexp.MustCompile(detectors.PrefixRegex([]string{"tokeet"}) + `\b([0-9]{10}.[0-9]{4})\b`) - + idPat = regexp.MustCompile(detectors.PrefixRegex([]string{"tokeet"}) + `\b([0-9]{10}.[0-9]{4})\b`) ) // Keywords are used for efficiently pre-filtering chunks. @@ -61,25 +60,25 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result continue } req.Header.Add("Accept", "application/json") - req.Header.Add("Authorization",resMatch) + req.Header.Add("Authorization", resMatch) res, err := client.Do(req) if err == nil { defer res.Body.Close() if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, 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 detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/tomorrowio/tomorrowio.go b/pkg/detectors/tomorrowio/tomorrowio.go index 12a6508f7763..5f34fd3c79c0 100644 --- a/pkg/detectors/tomorrowio/tomorrowio.go +++ b/pkg/detectors/tomorrowio/tomorrowio.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/tomtom/tomtom.go b/pkg/detectors/tomtom/tomtom.go index cd138ab18ea2..1b3ef36c7c2c 100644 --- a/pkg/detectors/tomtom/tomtom.go +++ b/pkg/detectors/tomtom/tomtom.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/tradier/tradier.go b/pkg/detectors/tradier/tradier.go index 72ee44bae0e7..1f0fe7f38b7a 100644 --- a/pkg/detectors/tradier/tradier.go +++ b/pkg/detectors/tradier/tradier.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/transferwise/transferwise.go b/pkg/detectors/transferwise/transferwise.go index 7758320cb7a4..ececd3d0009c 100644 --- a/pkg/detectors/transferwise/transferwise.go +++ b/pkg/detectors/transferwise/transferwise.go @@ -20,7 +20,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"transferwise"}) + `\b([0-9a-f-]{8}-[0-9a-f-]{4}-[0-9a-f-]{4}-[0-9a-f-]{4}-[0-9a-f-]{12})\b`) ) @@ -60,7 +60,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) { continue } @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/travelpayouts/travelpayouts.go b/pkg/detectors/travelpayouts/travelpayouts.go index fddad483daba..a9d7b49be7c1 100644 --- a/pkg/detectors/travelpayouts/travelpayouts.go +++ b/pkg/detectors/travelpayouts/travelpayouts.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/travisci/travisci.go b/pkg/detectors/travisci/travisci.go index 89cb6d81689a..b4ee03e0414c 100644 --- a/pkg/detectors/travisci/travisci.go +++ b/pkg/detectors/travisci/travisci.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/trelloapikey/trelloapikey.go b/pkg/detectors/trelloapikey/trelloapikey.go index 11ba326abd61..720fe8eb6a75 100644 --- a/pkg/detectors/trelloapikey/trelloapikey.go +++ b/pkg/detectors/trelloapikey/trelloapikey.go @@ -76,5 +76,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/tru/tru.go b/pkg/detectors/tru/tru.go index a08cd3599acd..9675b714cb75 100644 --- a/pkg/detectors/tru/tru.go +++ b/pkg/detectors/tru/tru.go @@ -83,5 +83,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/twelvedata/twelvedata.go b/pkg/detectors/twelvedata/twelvedata.go index e0c99e6dc951..2cc3c0ac36e4 100644 --- a/pkg/detectors/twelvedata/twelvedata.go +++ b/pkg/detectors/twelvedata/twelvedata.go @@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/twist/twist.go b/pkg/detectors/twist/twist.go index b794f26e81e5..0f5368e686d7 100644 --- a/pkg/detectors/twist/twist.go +++ b/pkg/detectors/twist/twist.go @@ -20,7 +20,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"twist"}) + `\b([0-9a-f:]{40,47})\b`) ) @@ -64,7 +64,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) { continue } @@ -73,5 +73,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/twitch/twitch.go b/pkg/detectors/twitch/twitch.go index 7cf5ad683532..da9047290254 100644 --- a/pkg/detectors/twitch/twitch.go +++ b/pkg/detectors/twitch/twitch.go @@ -21,7 +21,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"twitch"}) + `\b([0-9a-z]{30})\b`) idPat = regexp.MustCompile(detectors.PrefixRegex([]string{"twitch"}) + `\b([0-9a-z]{30})\b`) ) @@ -75,7 +75,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) { continue } @@ -86,5 +86,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/twitter/twitter.go b/pkg/detectors/twitter/twitter.go index 158cc7a7af02..294f73676721 100644 --- a/pkg/detectors/twitter/twitter.go +++ b/pkg/detectors/twitter/twitter.go @@ -65,5 +65,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/tyntec/tyntec.go b/pkg/detectors/tyntec/tyntec.go index 1369f47df69f..961aab2a381e 100644 --- a/pkg/detectors/tyntec/tyntec.go +++ b/pkg/detectors/tyntec/tyntec.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/typeform/typeform.go b/pkg/detectors/typeform/typeform.go index cb765dbbdac7..4054cae96396 100644 --- a/pkg/detectors/typeform/typeform.go +++ b/pkg/detectors/typeform/typeform.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/typetalk/typetalk.go b/pkg/detectors/typetalk/typetalk.go index 8b41a1f6e3fa..3085eefab17e 100644 --- a/pkg/detectors/typetalk/typetalk.go +++ b/pkg/detectors/typetalk/typetalk.go @@ -78,5 +78,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/ubidots/ubidots.go b/pkg/detectors/ubidots/ubidots.go index 63c5c5f2c1a6..2dc609d363c8 100644 --- a/pkg/detectors/ubidots/ubidots.go +++ b/pkg/detectors/ubidots/ubidots.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/uclassify/uclassify.go b/pkg/detectors/uclassify/uclassify.go index b3ebd01a40e8..a27b7e9f2845 100644 --- a/pkg/detectors/uclassify/uclassify.go +++ b/pkg/detectors/uclassify/uclassify.go @@ -20,7 +20,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"uclassify"}) + `\b([a-z0-9A-Z]{12})\b`) ) @@ -61,7 +61,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) { continue } @@ -72,5 +72,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/unifyid/unifyid.go b/pkg/detectors/unifyid/unifyid.go index 0a128db450c0..3a6fb6dc323d 100644 --- a/pkg/detectors/unifyid/unifyid.go +++ b/pkg/detectors/unifyid/unifyid.go @@ -77,5 +77,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/unplugg/unplugg.go b/pkg/detectors/unplugg/unplugg.go index f3d96422b616..8d9b93502a6f 100644 --- a/pkg/detectors/unplugg/unplugg.go +++ b/pkg/detectors/unplugg/unplugg.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/unsplash/unsplash.go b/pkg/detectors/unsplash/unsplash.go index aac97b7abad2..5e2481f8a2bb 100644 --- a/pkg/detectors/unsplash/unsplash.go +++ b/pkg/detectors/unsplash/unsplash.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/upcdatabase/upcdatabase.go b/pkg/detectors/upcdatabase/upcdatabase.go index 62cb3c71abea..09a20651a131 100644 --- a/pkg/detectors/upcdatabase/upcdatabase.go +++ b/pkg/detectors/upcdatabase/upcdatabase.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/uplead/uplead.go b/pkg/detectors/uplead/uplead.go index efa28466be65..53285f369f44 100644 --- a/pkg/detectors/uplead/uplead.go +++ b/pkg/detectors/uplead/uplead.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/uploadcare/uploadcare.go b/pkg/detectors/uploadcare/uploadcare.go index 7768985daf5e..7a99164b98b7 100644 --- a/pkg/detectors/uploadcare/uploadcare.go +++ b/pkg/detectors/uploadcare/uploadcare.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/uptimerobot/uptimerobot.go b/pkg/detectors/uptimerobot/uptimerobot.go index afe4ae6b5907..78d674941ac5 100644 --- a/pkg/detectors/uptimerobot/uptimerobot.go +++ b/pkg/detectors/uptimerobot/uptimerobot.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/upwave/upwave.go b/pkg/detectors/upwave/upwave.go index 91f41009e175..6c614f13548a 100644 --- a/pkg/detectors/upwave/upwave.go +++ b/pkg/detectors/upwave/upwave.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/uri/uri.go b/pkg/detectors/uri/uri.go index b68e32f2fb8e..6a4278ef028f 100644 --- a/pkg/detectors/uri/uri.go +++ b/pkg/detectors/uri/uri.go @@ -48,9 +48,9 @@ func allowlistedProtos(scheme string) bool { // FromData will find and optionally verify URI secrets in a given set of bytes. func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (results []detectors.Result, err error) { - //Prevent SSRF "https://us-central1-ssrfproxy.cloudfunctions.net/ssrfproxy-6d96c399-74bb-4299-b49d-c1c870277eb9" - //TODO add as config option - //TODO extend to other http outbound calls in other areas of code + // Prevent SSRF "https://us-central1-ssrfproxy.cloudfunctions.net/ssrfproxy-6d96c399-74bb-4299-b49d-c1c870277eb9" + // TODO add as config option + // TODO extend to other http outbound calls in other areas of code ssrfProtectorURL := "https://us-central1-ssrfproxy.cloudfunctions.net/ssrfproxy-6d96c399-74bb-4299-b49d-c1c870277eb9" dataStr := string(data) @@ -133,5 +133,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/urlscan/urlscan.go b/pkg/detectors/urlscan/urlscan.go index b415d5f1fefb..3d3d01aadfbd 100644 --- a/pkg/detectors/urlscan/urlscan.go +++ b/pkg/detectors/urlscan/urlscan.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/user/user.go b/pkg/detectors/user/user.go index d376eb863203..acc447e53435 100644 --- a/pkg/detectors/user/user.go +++ b/pkg/detectors/user/user.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/userflow/userflow.go b/pkg/detectors/userflow/userflow.go index 0cc6d145f0e1..49446f19ea4e 100644 --- a/pkg/detectors/userflow/userflow.go +++ b/pkg/detectors/userflow/userflow.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/userstack/userstack.go b/pkg/detectors/userstack/userstack.go index 07ccc731232f..a78c79cf62c3 100644 --- a/pkg/detectors/userstack/userstack.go +++ b/pkg/detectors/userstack/userstack.go @@ -76,5 +76,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/vatlayer/vatlayer.go b/pkg/detectors/vatlayer/vatlayer.go index e036e0960ac7..c6f4bb9d450f 100644 --- a/pkg/detectors/vatlayer/vatlayer.go +++ b/pkg/detectors/vatlayer/vatlayer.go @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/vbout/vbout.go b/pkg/detectors/vbout/vbout.go index 05dba7615f94..125cbd8c1969 100644 --- a/pkg/detectors/vbout/vbout.go +++ b/pkg/detectors/vbout/vbout.go @@ -20,7 +20,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"vbout"}) + `\b([0-9]{25})\b`) ) @@ -58,7 +58,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) { continue } @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/vercel/vercel.go b/pkg/detectors/vercel/vercel.go index a603467ae78d..fc1dc131a56d 100644 --- a/pkg/detectors/vercel/vercel.go +++ b/pkg/detectors/vercel/vercel.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/verifier/verifier.go b/pkg/detectors/verifier/verifier.go index aa081e7e2f94..710ed5f21f56 100644 --- a/pkg/detectors/verifier/verifier.go +++ b/pkg/detectors/verifier/verifier.go @@ -77,5 +77,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/verimail/verimail.go b/pkg/detectors/verimail/verimail.go index 10c19411522d..c69eb031d00f 100644 --- a/pkg/detectors/verimail/verimail.go +++ b/pkg/detectors/verimail/verimail.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/veriphone/veriphone.go b/pkg/detectors/veriphone/veriphone.go index 8cce7f4f486f..a1a003184800 100644 --- a/pkg/detectors/veriphone/veriphone.go +++ b/pkg/detectors/veriphone/veriphone.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/versioneye/versioneye.go b/pkg/detectors/versioneye/versioneye.go index 0eaa9de4f50b..4c0588ff5604 100644 --- a/pkg/detectors/versioneye/versioneye.go +++ b/pkg/detectors/versioneye/versioneye.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/viewneo/viewneo.go b/pkg/detectors/viewneo/viewneo.go index d3059423830f..86c663548de6 100644 --- a/pkg/detectors/viewneo/viewneo.go +++ b/pkg/detectors/viewneo/viewneo.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/virustotal/virustotal.go b/pkg/detectors/virustotal/virustotal.go index bf4665d1955e..a5e5fc933267 100644 --- a/pkg/detectors/virustotal/virustotal.go +++ b/pkg/detectors/virustotal/virustotal.go @@ -84,5 +84,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/visualcrossing/visualcrossing.go b/pkg/detectors/visualcrossing/visualcrossing.go index 9aa6ba04f12a..f55cca372306 100644 --- a/pkg/detectors/visualcrossing/visualcrossing.go +++ b/pkg/detectors/visualcrossing/visualcrossing.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/voicegain/voicegain.go b/pkg/detectors/voicegain/voicegain.go index 3daa3f898c68..2bee8e376a42 100644 --- a/pkg/detectors/voicegain/voicegain.go +++ b/pkg/detectors/voicegain/voicegain.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/voodoosms/voodoosms.go b/pkg/detectors/voodoosms/voodoosms.go index 4cfd2486de48..2594926fcfa6 100644 --- a/pkg/detectors/voodoosms/voodoosms.go +++ b/pkg/detectors/voodoosms/voodoosms.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/vouchery/vouchery.go b/pkg/detectors/vouchery/vouchery.go index 5b977aee7ba2..a47d03ab9e4b 100644 --- a/pkg/detectors/vouchery/vouchery.go +++ b/pkg/detectors/vouchery/vouchery.go @@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/vpnapi/vpnapi.go b/pkg/detectors/vpnapi/vpnapi.go index 1aab24778977..417aef2c2c93 100644 --- a/pkg/detectors/vpnapi/vpnapi.go +++ b/pkg/detectors/vpnapi/vpnapi.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/vultrapikey/vultrapikey.go b/pkg/detectors/vultrapikey/vultrapikey.go index 45195a5396b7..adcae99b9b15 100644 --- a/pkg/detectors/vultrapikey/vultrapikey.go +++ b/pkg/detectors/vultrapikey/vultrapikey.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/vyte/vyte.go b/pkg/detectors/vyte/vyte.go index 18cd4b818bb0..e7450072855a 100644 --- a/pkg/detectors/vyte/vyte.go +++ b/pkg/detectors/vyte/vyte.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/walkscore/walkscore.go b/pkg/detectors/walkscore/walkscore.go index b3316aaffc6b..012013360506 100644 --- a/pkg/detectors/walkscore/walkscore.go +++ b/pkg/detectors/walkscore/walkscore.go @@ -76,5 +76,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/weatherbit/weatherbit.go b/pkg/detectors/weatherbit/weatherbit.go index 9e6d04c9fc77..f1d32888fb81 100644 --- a/pkg/detectors/weatherbit/weatherbit.go +++ b/pkg/detectors/weatherbit/weatherbit.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/weatherstack/weatherstack.go b/pkg/detectors/weatherstack/weatherstack.go index df8d9f6a8d84..dd7b993deffe 100644 --- a/pkg/detectors/weatherstack/weatherstack.go +++ b/pkg/detectors/weatherstack/weatherstack.go @@ -77,5 +77,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/webex/webex.go b/pkg/detectors/webex/webex.go index c9bd7924940d..7067e1ebeb3f 100644 --- a/pkg/detectors/webex/webex.go +++ b/pkg/detectors/webex/webex.go @@ -88,5 +88,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/webflow/webflow.go b/pkg/detectors/webflow/webflow.go index 9dbbc15c348a..ea2b9b832219 100644 --- a/pkg/detectors/webflow/webflow.go +++ b/pkg/detectors/webflow/webflow.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/webscraper/webscraper.go b/pkg/detectors/webscraper/webscraper.go index 692e10cde0c1..c5b78bfc4c0f 100644 --- a/pkg/detectors/webscraper/webscraper.go +++ b/pkg/detectors/webscraper/webscraper.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/webscraping/webscraping.go b/pkg/detectors/webscraping/webscraping.go index 3582f7f639d2..864638503c47 100644 --- a/pkg/detectors/webscraping/webscraping.go +++ b/pkg/detectors/webscraping/webscraping.go @@ -75,5 +75,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/websitepulse/websitepulse.go b/pkg/detectors/websitepulse/websitepulse.go index 403f7b711f28..ceec5f4a2619 100644 --- a/pkg/detectors/websitepulse/websitepulse.go +++ b/pkg/detectors/websitepulse/websitepulse.go @@ -82,5 +82,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/wepay/wepay.go b/pkg/detectors/wepay/wepay.go index 7d18aedc4806..11e3fd5f0843 100644 --- a/pkg/detectors/wepay/wepay.go +++ b/pkg/detectors/wepay/wepay.go @@ -85,5 +85,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/whoxy/whoxy.go b/pkg/detectors/whoxy/whoxy.go index a59ad2a0f1be..e59580aa9bf1 100644 --- a/pkg/detectors/whoxy/whoxy.go +++ b/pkg/detectors/whoxy/whoxy.go @@ -76,5 +76,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/wistia/wistia.go b/pkg/detectors/wistia/wistia.go index 173b5fdf8b36..88853c949d07 100644 --- a/pkg/detectors/wistia/wistia.go +++ b/pkg/detectors/wistia/wistia.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/wit/wit.go b/pkg/detectors/wit/wit.go index a5bcd10e7eb5..8a7f87cb439a 100644 --- a/pkg/detectors/wit/wit.go +++ b/pkg/detectors/wit/wit.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/worksnaps/worksnaps.go b/pkg/detectors/worksnaps/worksnaps.go index 1365fdea3254..de5b5044745a 100644 --- a/pkg/detectors/worksnaps/worksnaps.go +++ b/pkg/detectors/worksnaps/worksnaps.go @@ -73,5 +73,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/workstack/workstack.go b/pkg/detectors/workstack/workstack.go index 5219439a8989..73049b546c5e 100644 --- a/pkg/detectors/workstack/workstack.go +++ b/pkg/detectors/workstack/workstack.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/worldcoinindex/worldcoinindex.go b/pkg/detectors/worldcoinindex/worldcoinindex.go index 2c171660aa32..8af7693e65cd 100644 --- a/pkg/detectors/worldcoinindex/worldcoinindex.go +++ b/pkg/detectors/worldcoinindex/worldcoinindex.go @@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/worldweather/worldweather.go b/pkg/detectors/worldweather/worldweather.go index 2fd06db239b5..f6b5022b5035 100644 --- a/pkg/detectors/worldweather/worldweather.go +++ b/pkg/detectors/worldweather/worldweather.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/wrike/wrike.go b/pkg/detectors/wrike/wrike.go index 1e4812bcaeb4..dcca9b6c6348 100644 --- a/pkg/detectors/wrike/wrike.go +++ b/pkg/detectors/wrike/wrike.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/yandex/yandex.go b/pkg/detectors/yandex/yandex.go index 15d21179ad77..0c2ec5ee042e 100644 --- a/pkg/detectors/yandex/yandex.go +++ b/pkg/detectors/yandex/yandex.go @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/yelp/yelp.go b/pkg/detectors/yelp/yelp.go index ddd8474b3fba..56d0bf42c0b4 100644 --- a/pkg/detectors/yelp/yelp.go +++ b/pkg/detectors/yelp/yelp.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/youneedabudget/youneedabudget.go b/pkg/detectors/youneedabudget/youneedabudget.go index 6daa6aa7d8a4..900a2cdf1567 100644 --- a/pkg/detectors/youneedabudget/youneedabudget.go +++ b/pkg/detectors/youneedabudget/youneedabudget.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/yousign/yousign.go b/pkg/detectors/yousign/yousign.go index 67df84e97ef0..6dc1374480e8 100644 --- a/pkg/detectors/yousign/yousign.go +++ b/pkg/detectors/yousign/yousign.go @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/youtubeapikey/youtubeapikey.go b/pkg/detectors/youtubeapikey/youtubeapikey.go index 4fc9b7c1e3fc..6caa7b89ea80 100644 --- a/pkg/detectors/youtubeapikey/youtubeapikey.go +++ b/pkg/detectors/youtubeapikey/youtubeapikey.go @@ -78,5 +78,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/zapierwebhook/zapierwebhook.go b/pkg/detectors/zapierwebhook/zapierwebhook.go index 61cb98878024..df29b9c0cf0e 100644 --- a/pkg/detectors/zapierwebhook/zapierwebhook.go +++ b/pkg/detectors/zapierwebhook/zapierwebhook.go @@ -63,5 +63,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/zendeskapi/zendeskapi.go b/pkg/detectors/zendeskapi/zendeskapi.go index 411b0fb97c91..26948fd5a0da 100644 --- a/pkg/detectors/zendeskapi/zendeskapi.go +++ b/pkg/detectors/zendeskapi/zendeskapi.go @@ -92,5 +92,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/zenkitapi/zenkitapi.go b/pkg/detectors/zenkitapi/zenkitapi.go index 58d869c69108..9caadc34ea3e 100644 --- a/pkg/detectors/zenkitapi/zenkitapi.go +++ b/pkg/detectors/zenkitapi/zenkitapi.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/zenrows/zenrows.go b/pkg/detectors/zenrows/zenrows.go index 3bf8684f7de4..ce4b8a94abf4 100644 --- a/pkg/detectors/zenrows/zenrows.go +++ b/pkg/detectors/zenrows/zenrows.go @@ -20,7 +20,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"zenrows"}) + `\b([0-9a-f]{40})\b`) ) @@ -58,7 +58,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) { continue } @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/zenscrape/zenscrape.go b/pkg/detectors/zenscrape/zenscrape.go index e980568120ef..cbec741d7a4b 100644 --- a/pkg/detectors/zenscrape/zenscrape.go +++ b/pkg/detectors/zenscrape/zenscrape.go @@ -76,5 +76,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/zenserp/zenserp.go b/pkg/detectors/zenserp/zenserp.go index 4a38273494eb..41c9153dfe08 100644 --- a/pkg/detectors/zenserp/zenserp.go +++ b/pkg/detectors/zenserp/zenserp.go @@ -73,5 +73,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/zeplin/zeplin.go b/pkg/detectors/zeplin/zeplin.go index 2b22785c2e5d..529c20595c78 100644 --- a/pkg/detectors/zeplin/zeplin.go +++ b/pkg/detectors/zeplin/zeplin.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/zerobounce/zerobounce.go b/pkg/detectors/zerobounce/zerobounce.go index c42a61a2965c..1f5e4f6e08da 100644 --- a/pkg/detectors/zerobounce/zerobounce.go +++ b/pkg/detectors/zerobounce/zerobounce.go @@ -75,5 +75,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/zipapi/zipapi.go b/pkg/detectors/zipapi/zipapi.go index 629284a4888b..9fc5df05331e 100644 --- a/pkg/detectors/zipapi/zipapi.go +++ b/pkg/detectors/zipapi/zipapi.go @@ -90,5 +90,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/zipbooks/zipbooks.go b/pkg/detectors/zipbooks/zipbooks.go index 6d5ba7a3aedb..27f17dbae8a1 100644 --- a/pkg/detectors/zipbooks/zipbooks.go +++ b/pkg/detectors/zipbooks/zipbooks.go @@ -78,5 +78,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/zipcodeapi/zipcodeapi.go b/pkg/detectors/zipcodeapi/zipcodeapi.go index 924b352872fe..00dd0139bf31 100644 --- a/pkg/detectors/zipcodeapi/zipcodeapi.go +++ b/pkg/detectors/zipcodeapi/zipcodeapi.go @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/zipcodebase/zipcodebase.go b/pkg/detectors/zipcodebase/zipcodebase.go index cb8f74df2906..d60fa4bd9123 100644 --- a/pkg/detectors/zipcodebase/zipcodebase.go +++ b/pkg/detectors/zipcodebase/zipcodebase.go @@ -19,7 +19,7 @@ var _ detectors.Detector = (*Scanner)(nil) var ( client = common.SaneHttpClient() - //Make sure that your group is surrounded in boundry characters such as below to reduce false positives + // Make sure that your group is surrounded in boundry characters such as below to reduce false positives keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"zipcodebase"}) + `\b([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\b`) ) @@ -59,7 +59,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if res.StatusCode >= 200 && res.StatusCode < 300 { s1.Verified = true } else { - //This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key + // This function will check false positives for common test words, 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,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/zonkafeedback/zonkafeedback.go b/pkg/detectors/zonkafeedback/zonkafeedback.go index e2f0877e8e86..4745eced57b4 100644 --- a/pkg/detectors/zonkafeedback/zonkafeedback.go +++ b/pkg/detectors/zonkafeedback/zonkafeedback.go @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result results = append(results, s1) } - return detectors.CleanResults(results), nil + return results, nil } diff --git a/pkg/detectors/zulipchat/zulipchat.go b/pkg/detectors/zulipchat/zulipchat.go index 412c96c6283b..344524c40077 100644 --- a/pkg/detectors/zulipchat/zulipchat.go +++ b/pkg/detectors/zulipchat/zulipchat.go @@ -47,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result resMatch := strings.TrimSpace(match[1]) for _, idMatch := range idMatches { - //getting the last word of the string + // getting the last word of the string resIdMatch := strings.TrimSpace(idMatch[0][strings.LastIndex(idMatch[0], " ")+1:]) for _, domainMatch := range domainMatches { @@ -89,5 +89,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } } - return detectors.CleanResults(results), nil + return results, nil }