Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
check request errors
Dustin Decker99372694ca89
diff --git a/pkg/detectors/abbysale/abbysale.go b/pkg/detectors/abbysale/abbysale.goindex 562c63792..11f0019aa 100644--- a/pkg/detectors/abbysale/abbysale.go+++ b/pkg/detectors/abbysale/abbysale.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.abyssale.com/ready", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.abyssale.com/ready", nil)+ if err != nil {+ continue+ }req.Header.Add("x-api-key", fmt.Sprintf("%s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/abstract/abstract.go b/pkg/detectors/abstract/abstract.goindex e6e5fb539..fc604721a 100644--- a/pkg/detectors/abstract/abstract.go+++ b/pkg/detectors/abstract/abstract.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://exchange-rates.abstractapi.com/v1/live/?api_key=%s&base=USD", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://exchange-rates.abstractapi.com/v1/live/?api_key=%s&base=USD", resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/abuseipdb/abuseipdb.go b/pkg/detectors/abuseipdb/abuseipdb.goindex abc19c766..eb8692b83 100644--- a/pkg/detectors/abuseipdb/abuseipdb.go+++ b/pkg/detectors/abuseipdb/abuseipdb.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.abuseipdb.com/api/v2/check?ipAddress=118.25.6.39", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.abuseipdb.com/api/v2/check?ipAddress=118.25.6.39", nil)+ if err != nil {+ continue+ }req.Header.Add("Key", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/accuweather/accuweather.go b/pkg/detectors/accuweather/accuweather.goindex 77826f4e6..9bb313a07 100644--- a/pkg/detectors/accuweather/accuweather.go+++ b/pkg/detectors/accuweather/accuweather.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://dataservice.accuweather.com/locations/v1/cities/autocomplete?apikey="+resMatch+"&q=----&language=en-us", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://dataservice.accuweather.com/locations/v1/cities/autocomplete?apikey="+resMatch+"&q=----&language=en-us", nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/adafruitio/adafruitio.go b/pkg/detectors/adafruitio/adafruitio.goindex 4217dd854..c21430fb0 100644--- a/pkg/detectors/adafruitio/adafruitio.go+++ b/pkg/detectors/adafruitio/adafruitio.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://io.adafruit.com/api/v2/ladybugtest/feeds/?x-aio-key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://io.adafruit.com/api/v2/ladybugtest/feeds/?x-aio-key="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/adobeio/adobeio.go b/pkg/detectors/adobeio/adobeio.goindex 913890cf2..f4f1df931 100644--- a/pkg/detectors/adobeio/adobeio.go+++ b/pkg/detectors/adobeio/adobeio.go@@ -54,7 +54,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://stock.adobe.io/Rest/Media/1/Search/Files?locale=en_US%2526search_parameters%255Bwords%255D=kittens", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://stock.adobe.io/Rest/Media/1/Search/Files?locale=en_US%2526search_parameters%255Bwords%255D=kittens", nil)+ if err != nil {+ continue+ }req.Header.Add("x-api-key", resMatch)req.Header.Add("x-product", resIdMatch)res, err := client.Do(req)diff --git a/pkg/detectors/adzuna/adzuna.go b/pkg/detectors/adzuna/adzuna.goindex e2e482674..b6857370d 100644--- a/pkg/detectors/adzuna/adzuna.go+++ b/pkg/detectors/adzuna/adzuna.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.adzuna.com/v1/api/jobs/gb/search/1?app_id=%s&app_key=%s", resIdMatch, resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.adzuna.com/v1/api/jobs/gb/search/1?app_id=%s&app_key=%s", resIdMatch, resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/aeroworkflow/aeroworkflow.go b/pkg/detectors/aeroworkflow/aeroworkflow.goindex 92f8bc614..380d87a08 100644--- a/pkg/detectors/aeroworkflow/aeroworkflow.go+++ b/pkg/detectors/aeroworkflow/aeroworkflow.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequest("GET", "https://api.aeroworkflow.com/api/"+resIdMatch+"/v1/AeroAppointments", nil)+ req, err := http.NewRequest("GET", "https://api.aeroworkflow.com/api/"+resIdMatch+"/v1/AeroAppointments", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("apikey", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/agora/agora.go b/pkg/detectors/agora/agora.goindex aefe154ba..0dc0ce8af 100644--- a/pkg/detectors/agora/agora.go+++ b/pkg/detectors/agora/agora.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.agora.io/dev/v1/projects", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.agora.io/dev/v1/projects", nil)+ if err != nil {+ continue+ }req.SetBasicAuth(resSecret, resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/airbrakeprojectkey/airbrakeprojectkey.go b/pkg/detectors/airbrakeprojectkey/airbrakeprojectkey.goindex db96ae8b4..9ee5cfb55 100644--- a/pkg/detectors/airbrakeprojectkey/airbrakeprojectkey.go+++ b/pkg/detectors/airbrakeprojectkey/airbrakeprojectkey.go@@ -58,7 +58,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(`{"environment":"production","username":"john","email":"[email protected]","repository":"https://github.com/airbrake/airbrake","revision":"38748467ea579e7ae64f7815452307c9d05e05c5","version":"v2.0"}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.airbrake.io/api/v4/projects/"+resIdMatch+"/deploys?key="+resMatch, payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api.airbrake.io/api/v4/projects/"+resIdMatch+"/deploys?key="+resMatch, payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/airbrakeuserkey/airbrakeuserkey.go b/pkg/detectors/airbrakeuserkey/airbrakeuserkey.goindex 66b284192..bc74a5bf1 100644--- a/pkg/detectors/airbrakeuserkey/airbrakeuserkey.go+++ b/pkg/detectors/airbrakeuserkey/airbrakeuserkey.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.airbrake.io/api/v4/projects?key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.airbrake.io/api/v4/projects?key="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/airship/airship.go b/pkg/detectors/airship/airship.goindex e8450143c..60e32c43e 100644--- a/pkg/detectors/airship/airship.go+++ b/pkg/detectors/airship/airship.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://go.urbanairship.com/api/schedules", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://go.urbanairship.com/api/schedules", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/vnd.urbanairship+json; version=3")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/airtableapikey/airtableapikey.go b/pkg/detectors/airtableapikey/airtableapikey.goindex b31efc8e2..a47f43575 100644--- a/pkg/detectors/airtableapikey/airtableapikey.go+++ b/pkg/detectors/airtableapikey/airtableapikey.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.airtable.com/v0/"+appRes+"/Projects", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.airtable.com/v0/"+appRes+"/Projects", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", keyRes))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/airvisual/airvisual.go b/pkg/detectors/airvisual/airvisual.goindex 2a23b0ffe..cfbfca27b 100644--- a/pkg/detectors/airvisual/airvisual.go+++ b/pkg/detectors/airvisual/airvisual.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.airvisual.com/v2/countries?key=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.airvisual.com/v2/countries?key=%s", resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/vnd.airvisual+json; version=3")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/alconost/alconost.go b/pkg/detectors/alconost/alconost.goindex 7854930e6..b41a15a37 100644--- a/pkg/detectors/alconost/alconost.go+++ b/pkg/detectors/alconost/alconost.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:", resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://nitro.alconost.com/api/v1/account", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://nitro.alconost.com/api/v1/account", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)diff --git a/pkg/detectors/alegra/alegra.go b/pkg/detectors/alegra/alegra.goindex ab0db372b..d829ad56a 100644--- a/pkg/detectors/alegra/alegra.go+++ b/pkg/detectors/alegra/alegra.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.alegra.com/api/v1/users", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.alegra.com/api/v1/users", nil)+ if err != nil {+ continue+ }req.SetBasicAuth(userPatMatch, tokenPatMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/aletheiaapi/aletheiaapi.go b/pkg/detectors/aletheiaapi/aletheiaapi.goindex ef5627f89..1dfcae695 100644--- a/pkg/detectors/aletheiaapi/aletheiaapi.go+++ b/pkg/detectors/aletheiaapi/aletheiaapi.go@@ -50,7 +50,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 10 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.aletheiaapi.com/StockData?symbol=msft&summary=true", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.aletheiaapi.com/StockData?symbol=msft&summary=true", nil)+ if err != nil {+ continue+ }req.Header.Add("Key", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/algoliaadminkey/algoliaadminkey.go b/pkg/detectors/algoliaadminkey/algoliaadminkey.goindex b5410afb1..f86daded7 100644--- a/pkg/detectors/algoliaadminkey/algoliaadminkey.go+++ b/pkg/detectors/algoliaadminkey/algoliaadminkey.go@@ -54,7 +54,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://"+resIdMatch+"-dsn.algolia.net/1/keys", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://"+resIdMatch+"-dsn.algolia.net/1/keys", nil)+ if err != nil {+ continue+ }req.Header.Add("X-Algolia-Application-Id", resIdMatch)req.Header.Add("X-Algolia-API-Key", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/alienvault/alienvault.go b/pkg/detectors/alienvault/alienvault.goindex 2d1de86f2..64ed94bfa 100644--- a/pkg/detectors/alienvault/alienvault.go+++ b/pkg/detectors/alienvault/alienvault.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://otx.alienvault.com/api/v1/users/me", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://otx.alienvault.com/api/v1/users/me", nil)+ if err != nil {+ continue+ }req.Header.Add("X-OTX-API-KEY", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/allsports/allsports.go b/pkg/detectors/allsports/allsports.goindex 09f8094d5..5acbd0ba3 100644--- a/pkg/detectors/allsports/allsports.go+++ b/pkg/detectors/allsports/allsports.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://apiv2.allsportsapi.com/football/?met=Countries&APIkey="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://apiv2.allsportsapi.com/football/?met=Countries&APIkey="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/amadeus/amadeus.go b/pkg/detectors/amadeus/amadeus.goindex 594e3e717..83a26d189 100644--- a/pkg/detectors/amadeus/amadeus.go+++ b/pkg/detectors/amadeus/amadeus.go@@ -57,7 +57,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader("grant_type=client_credentials&client_id=" + resMatch + "&client_secret=" + resSecret)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://test.api.amadeus.com/v1/security/oauth2/token", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://test.api.amadeus.com/v1/security/oauth2/token", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/x-www-form-urlencoded")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/ambee/ambee.go b/pkg/detectors/ambee/ambee.goindex 1ec1ff5f0..1114fcee4 100644--- a/pkg/detectors/ambee/ambee.go+++ b/pkg/detectors/ambee/ambee.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.ambeedata.com/latest/by-lat-lng?lat=12&lng=77", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.ambeedata.com/latest/by-lat-lng?lat=12&lng=77", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("x-api-key", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/amplitudeapikey/amplitudeapikey.go b/pkg/detectors/amplitudeapikey/amplitudeapikey.goindex 412a6aa30..ce805d936 100644--- a/pkg/detectors/amplitudeapikey/amplitudeapikey.go+++ b/pkg/detectors/amplitudeapikey/amplitudeapikey.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader("api_key=" + resMatch + "&identification=%5B%7B%22user_id%22%3A%22datamonster%40gmail.com%22%2C%20%22user_properties%22%3A%7B%22Age%22%3A%2235%22%7D%2C%20%22groups%22%3A%7B%22company_id%22%3A%221234%22%7D%2C%20%22country%22%3A%22United%20States%22%7D%5D")- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.amplitude.com/identify", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api.amplitude.com/identify", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/x-www-form-urlencoded")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/anypoint/anypoint.go b/pkg/detectors/anypoint/anypoint.goindex deb4b2468..00d7ead8e 100644--- a/pkg/detectors/anypoint/anypoint.go+++ b/pkg/detectors/anypoint/anypoint.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://anypoint.mulesoft.com/apiplatform/repository/v2/organizations/%s/apis/by-name?apiName=%s", orgRes, ""), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://anypoint.mulesoft.com/apiplatform/repository/v2/organizations/%s/apis/by-name?apiName=%s", orgRes, ""), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/apacta/apacta.go b/pkg/detectors/apacta/apacta.goindex f54cc3f68..0db5c7451 100644--- a/pkg/detectors/apacta/apacta.go+++ b/pkg/detectors/apacta/apacta.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://app.apacta.com/api/v1/time_entries?api_key=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://app.apacta.com/api/v1/time_entries?api_key=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/api2cart/api2cart.go b/pkg/detectors/api2cart/api2cart.goindex 3341dd0b7..db37bdbe1 100644--- a/pkg/detectors/api2cart/api2cart.go+++ b/pkg/detectors/api2cart/api2cart.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.api2cart.com/v1.1/account.cart.list.json?api_key=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.api2cart.com/v1.1/account.cart.list.json?api_key=%s", resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/apideck/apideck.go b/pkg/detectors/apideck/apideck.goindex dc7906b5b..a1f3ee060 100644--- a/pkg/detectors/apideck/apideck.go+++ b/pkg/detectors/apideck/apideck.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://unify.apideck.com/vault/consumers", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://unify.apideck.com/vault/consumers", nil)+ if err != nil {+ continue+ }req.Header.Add("x-apideck-app-id", resIdMatch)req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/apiflash/apiflash.go b/pkg/detectors/apiflash/apiflash.goindex 5f411d38b..715278e3d 100644--- a/pkg/detectors/apiflash/apiflash.go+++ b/pkg/detectors/apiflash/apiflash.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.apiflash.com/v1/urltoimage?url=%s&access_key=%s", resUrlMatch, resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.apiflash.com/v1/urltoimage?url=%s&access_key=%s", resUrlMatch, resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/apifonica/apifonica.go b/pkg/detectors/apifonica/apifonica.goindex 087549070..f69fc4cb3 100644--- a/pkg/detectors/apifonica/apifonica.go+++ b/pkg/detectors/apifonica/apifonica.go@@ -57,7 +57,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:%s", resMatch, resToken)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.apifonica.com/v2/accounts", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.apifonica.com/v2/accounts", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)diff --git a/pkg/detectors/apify/apify.go b/pkg/detectors/apify/apify.goindex db19356dd..d98dc1095 100644--- a/pkg/detectors/apify/apify.go+++ b/pkg/detectors/apify/apify.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.apify.com/v2/acts?token="+resMatch+"&my=true&offset=10&limit=99&desc=true", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.apify.com/v2/acts?token="+resMatch+"&my=true&offset=10&limit=99&desc=true", nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/apimatic/apimatic.go b/pkg/detectors/apimatic/apimatic.goindex c6af604bf..4fdbe8bd9 100644--- a/pkg/detectors/apimatic/apimatic.go+++ b/pkg/detectors/apimatic/apimatic.go@@ -58,7 +58,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 10 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequestWithContext(ctx, "GET", "https://www.apimatic.io/api/code-generations", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://www.apimatic.io/api/code-generations", nil)+ if err != nil {+ continue+ }req.SetBasicAuth(userPatMatch, passPatMatch)res, err := client.Do(req)diff --git a/pkg/detectors/apimatic/apimatic/apimatic.go b/pkg/detectors/apimatic/apimatic/apimatic.goindex c6af604bf..4fdbe8bd9 100644--- a/pkg/detectors/apimatic/apimatic/apimatic.go+++ b/pkg/detectors/apimatic/apimatic/apimatic.go@@ -58,7 +58,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 10 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequestWithContext(ctx, "GET", "https://www.apimatic.io/api/code-generations", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://www.apimatic.io/api/code-generations", nil)+ if err != nil {+ continue+ }req.SetBasicAuth(userPatMatch, passPatMatch)res, err := client.Do(req)diff --git a/pkg/detectors/apiscience/apiscience.go b/pkg/detectors/apiscience/apiscience.goindex dee251195..90834d13a 100644--- a/pkg/detectors/apiscience/apiscience.go+++ b/pkg/detectors/apiscience/apiscience.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.apiscience.com/v1/monitors", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.apiscience.com/v1/monitors", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/apiscience/apiscience/apiscience.go b/pkg/detectors/apiscience/apiscience/apiscience.goindex dee251195..90834d13a 100644--- a/pkg/detectors/apiscience/apiscience/apiscience.go+++ b/pkg/detectors/apiscience/apiscience/apiscience.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.apiscience.com/v1/monitors", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.apiscience.com/v1/monitors", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/apollo/apollo.go b/pkg/detectors/apollo/apollo.goindex 6f312856a..50ee7b2cc 100644--- a/pkg/detectors/apollo/apollo.go+++ b/pkg/detectors/apollo/apollo.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.apollo.io/v1/account_stages?api_key=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.apollo.io/v1/account_stages?api_key=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/appcues/appcues.go b/pkg/detectors/appcues/appcues.goindex 35c3ae1f6..6f846b9e0 100644--- a/pkg/detectors/appcues/appcues.go+++ b/pkg/detectors/appcues/appcues.go@@ -65,7 +65,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultRaw: []byte(resMatch),}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.appcues.com/v2/accounts/%s/flows", resIdMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.appcues.com/v2/accounts/%s/flows", resIdMatch), nil)+ if err != nil {+ continue+ }req.SetBasicAuth(resUserMatch, resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/appfollow/appfollow.go b/pkg/detectors/appfollow/appfollow.goindex 021381ce1..49045120d 100644--- a/pkg/detectors/appfollow/appfollow.go+++ b/pkg/detectors/appfollow/appfollow.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:", resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.appfollow.io/test", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.appfollow.io/test", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/appsynergy/appsynergy.go b/pkg/detectors/appsynergy/appsynergy.goindex 7964b0711..a614697d2 100644--- a/pkg/detectors/appsynergy/appsynergy.go+++ b/pkg/detectors/appsynergy/appsynergy.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(`{"html":"<html><body><h1>Hello World</h1></body></html>","filename":"HelloWorld.pdf"}`)- req, _ := http.NewRequestWithContext(ctx, "POST", fmt.Sprintf("https://www.appsynergy.com/api?action=HTML2PDF&apiKey=%s", resMatch), payload)+ req, err := http.NewRequestWithContext(ctx, "POST", fmt.Sprintf("https://www.appsynergy.com/api?action=HTML2PDF&apiKey=%s", resMatch), payload)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/apptivo/apptivo.go b/pkg/detectors/apptivo/apptivo.goindex 92fa4bec4..48b16d5b5 100644--- a/pkg/detectors/apptivo/apptivo.go+++ b/pkg/detectors/apptivo/apptivo.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.apptivo.com/app/dao/v6/leads?a=getConfigData&apiKey=%s&accessKey=%s", resMatch, resIdMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.apptivo.com/app/dao/v6/leads?a=getConfigData&apiKey=%s&accessKey=%s", resMatch, resIdMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {bodyBytes, err := ioutil.ReadAll(res.Body)diff --git a/pkg/detectors/artifactory/artifactory.go b/pkg/detectors/artifactory/artifactory.goindex 70340ff1b..44002211f 100644--- a/pkg/detectors/artifactory/artifactory.go+++ b/pkg/detectors/artifactory/artifactory.go@@ -57,7 +57,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://"+resURLMatch+"/artifactory/api/storageinfo", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://"+resURLMatch+"/artifactory/api/storageinfo", nil)+ if err != nil {+ continue+ }req.Header.Add("X-JFrog-Art-Api", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/artsy/artsy.go b/pkg/detectors/artsy/artsy.goindex b0ec6cb8f..c6b918a9d 100644--- a/pkg/detectors/artsy/artsy.go+++ b/pkg/detectors/artsy/artsy.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.artsy.net/api/tokens/xapp_token?client_id="+resIdMatch+"&client_secret="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api.artsy.net/api/tokens/xapp_token?client_id="+resIdMatch+"&client_secret="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/asanaoauth/asanaoauth.go b/pkg/detectors/asanaoauth/asanaoauth.goindex bfc67d39a..2a383d937 100644--- a/pkg/detectors/asanaoauth/asanaoauth.go+++ b/pkg/detectors/asanaoauth/asanaoauth.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.asana.com/api/1.0/users/me", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://app.asana.com/api/1.0/users/me", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/asanapersonalaccesstoken/asanapersonalaccesstoken.go b/pkg/detectors/asanapersonalaccesstoken/asanapersonalaccesstoken.goindex fbbfa0b6d..89e9ccd2a 100644--- a/pkg/detectors/asanapersonalaccesstoken/asanapersonalaccesstoken.go+++ b/pkg/detectors/asanapersonalaccesstoken/asanapersonalaccesstoken.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.asana.com/api/1.0/users/me", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://app.asana.com/api/1.0/users/me", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/assemblyai/assemblyai.go b/pkg/detectors/assemblyai/assemblyai.goindex 0f431ecd0..fe562a67d 100644--- a/pkg/detectors/assemblyai/assemblyai.go+++ b/pkg/detectors/assemblyai/assemblyai.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.assemblyai.com/v2/transcript", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.assemblyai.com/v2/transcript", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/audd/audd.go b/pkg/detectors/audd/audd.goindex 16f2f64f6..3d36041b0 100644--- a/pkg/detectors/audd/audd.go+++ b/pkg/detectors/audd/audd.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.audd.io/setCallbackUrl/?api_token=%s&url=https://yourwebsite.com/callbacks_handler/", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.audd.io/setCallbackUrl/?api_token=%s&url=https://yourwebsite.com/callbacks_handler/", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {bodyBytes, err := ioutil.ReadAll(res.Body)diff --git a/pkg/detectors/auth0managementapitoken/auth0managementapitoken.go b/pkg/detectors/auth0managementapitoken/auth0managementapitoken.goindex a4fb16e59..95f023038 100644--- a/pkg/detectors/auth0managementapitoken/auth0managementapitoken.go+++ b/pkg/detectors/auth0managementapitoken/auth0managementapitoken.go@@ -65,7 +65,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultcurl -H "Authorization: Bearer $token" https://domain/api/v2/users*/- req, _ := http.NewRequestWithContext(ctx, "GET", "https://"+domainRes+"/api/v2/users", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://"+domainRes+"/api/v2/users", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", managementApiTokenRes))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/auth0oauth/auth0oauth.go b/pkg/detectors/auth0oauth/auth0oauth.goindex 8f61bff6f..99ca0c70c 100644--- a/pkg/detectors/auth0oauth/auth0oauth.go+++ b/pkg/detectors/auth0oauth/auth0oauth.go@@ -82,7 +82,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultdata.Set("code", "AUTHORIZATION_CODE")data.Set("redirect_uri", "undefined")- req, _ := http.NewRequestWithContext(ctx, http.MethodPost, "https://"+domainRes+"/oauth/token", strings.NewReader(data.Encode())) // URL-encoded payload+ req, err := http.NewRequestWithContext(ctx, http.MethodPost, "https://"+domainRes+"/oauth/token", strings.NewReader(data.Encode())) // URL-encoded payload+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/x-www-form-urlencoded")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/autodesk/autodesk.go b/pkg/detectors/autodesk/autodesk.goindex f42d544e2..ed5c651d0 100644--- a/pkg/detectors/autodesk/autodesk.go+++ b/pkg/detectors/autodesk/autodesk.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(fmt.Sprintf(`grant_type=client_credentials&client_id=%s&client_secret=%s`, resMatch, resSecret))- req, _ := http.NewRequestWithContext(ctx, "POST", "https://developer.api.autodesk.com/authentication/v1/authenticate", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://developer.api.autodesk.com/authentication/v1/authenticate", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/x-www-form-urlencoded")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/autoklose/autoklose.go b/pkg/detectors/autoklose/autoklose.goindex 7fdbe8afb..c065b1031 100644--- a/pkg/detectors/autoklose/autoklose.go+++ b/pkg/detectors/autoklose/autoklose.go@@ -50,7 +50,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.autoklose.com/api/campaigns/?api_token=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.autoklose.com/api/campaigns/?api_token=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {bodyBytes, err := ioutil.ReadAll(res.Body)diff --git a/pkg/detectors/autopilot/autopilot.go b/pkg/detectors/autopilot/autopilot.goindex b524ad6aa..2c7913c89 100644--- a/pkg/detectors/autopilot/autopilot.go+++ b/pkg/detectors/autopilot/autopilot.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api2.autopilothq.com/v1/account", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api2.autopilothq.com/v1/account", nil)+ if err != nil {+ continue+ }req.Header.Add("autopilotapikey", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/avazapersonalaccesstoken/avazapersonalaccesstoken.go b/pkg/detectors/avazapersonalaccesstoken/avazapersonalaccesstoken.goindex da5c5ca5e..2c87c66c6 100644--- a/pkg/detectors/avazapersonalaccesstoken/avazapersonalaccesstoken.go+++ b/pkg/detectors/avazapersonalaccesstoken/avazapersonalaccesstoken.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequest("GET", "https://api.avaza.com/api/Account", nil)+ req, err := http.NewRequest("GET", "https://api.avaza.com/api/Account", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/aviationstack/aviationstack.go b/pkg/detectors/aviationstack/aviationstack.goindex c36f386d9..bf5b6f98c 100644--- a/pkg/detectors/aviationstack/aviationstack.go+++ b/pkg/detectors/aviationstack/aviationstack.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 10 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.aviationstack.com/v1/flights?access_key=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.aviationstack.com/v1/flights?access_key=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/axonaut/axonaut.go b/pkg/detectors/axonaut/axonaut.goindex 831e93baf..a241a8665 100644--- a/pkg/detectors/axonaut/axonaut.go+++ b/pkg/detectors/axonaut/axonaut.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://axonaut.com/api/v2/companies?type=all&sort=id", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://axonaut.com/api/v2/companies?type=all&sort=id", nil)+ if err != nil {+ continue+ }req.Header.Add("userApiKey", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/aylien/aylien.go b/pkg/detectors/aylien/aylien.goindex 7ff249165..2b45071ef 100644--- a/pkg/detectors/aylien/aylien.go+++ b/pkg/detectors/aylien/aylien.go@@ -54,7 +54,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultRaw: []byte(resMatch),}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.aylien.com/news/stories", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.aylien.com/news/stories", nil)+ if err != nil {+ continue+ }req.Header.Add("X-AYLIEN-NewsAPI-Application-ID", resIdMatch)req.Header.Add("X-AYLIEN-NewsAPI-Application-Key", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/ayrshare/ayrshare.go b/pkg/detectors/ayrshare/ayrshare.goindex e95573700..0c91f0980 100644--- a/pkg/detectors/ayrshare/ayrshare.go+++ b/pkg/detectors/ayrshare/ayrshare.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.ayrshare.com/api/analytics/links", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://app.ayrshare.com/api/analytics/links", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/bannerbear/bannerbear.go b/pkg/detectors/bannerbear/bannerbear.goindex 3d398195f..fdd0f80bd 100644--- a/pkg/detectors/bannerbear/bannerbear.go+++ b/pkg/detectors/bannerbear/bannerbear.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.bannerbear.com/v2/auth", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.bannerbear.com/v2/auth", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/baremetrics/baremetrics.go b/pkg/detectors/baremetrics/baremetrics.goindex 54499e37b..5443c5e0f 100644--- a/pkg/detectors/baremetrics/baremetrics.go+++ b/pkg/detectors/baremetrics/baremetrics.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.baremetrics.com/v1/account", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.baremetrics.com/v1/account", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/baseapiio/baseapiio.go b/pkg/detectors/baseapiio/baseapiio.goindex 7e461eb9f..4966a0980 100644--- a/pkg/detectors/baseapiio/baseapiio.go+++ b/pkg/detectors/baseapiio/baseapiio.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.base-api.io/v1/forms?page=1&per_page=10", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.base-api.io/v1/forms?page=1&per_page=10", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/beamer/beamer.go b/pkg/detectors/beamer/beamer.goindex a9e130476..81e0b10ba 100644--- a/pkg/detectors/beamer/beamer.go+++ b/pkg/detectors/beamer/beamer.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.getbeamer.com/v0/url", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.getbeamer.com/v0/url", nil)+ if err != nil {+ continue+ }req.Header.Add("Beamer-Api-Key", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/beebole/beebole.go b/pkg/detectors/beebole/beebole.goindex 0ca660374..1c1caa4ea 100644--- a/pkg/detectors/beebole/beebole.go+++ b/pkg/detectors/beebole/beebole.go@@ -52,7 +52,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultdata := fmt.Sprintf("%s:X", resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))payload := strings.NewReader(`{"service": "custom_field.list"}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://beebole-apps.com/api/v2", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://beebole-apps.com/api/v2", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)diff --git a/pkg/detectors/beebole/beebole/beebole.go b/pkg/detectors/beebole/beebole/beebole.goindex 0ca660374..1c1caa4ea 100644--- a/pkg/detectors/beebole/beebole/beebole.go+++ b/pkg/detectors/beebole/beebole/beebole.go@@ -52,7 +52,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultdata := fmt.Sprintf("%s:X", resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))payload := strings.NewReader(`{"service": "custom_field.list"}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://beebole-apps.com/api/v2", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://beebole-apps.com/api/v2", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)diff --git a/pkg/detectors/besttime/besttime.go b/pkg/detectors/besttime/besttime.goindex ee21a8764..e0a1c5037 100644--- a/pkg/detectors/besttime/besttime.go+++ b/pkg/detectors/besttime/besttime.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://besttime.app/api/v1/keys/"+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://besttime.app/api/v1/keys/"+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/billomat/billomat.go b/pkg/detectors/billomat/billomat.goindex b4ef84cce..8cf9764b5 100644--- a/pkg/detectors/billomat/billomat.go+++ b/pkg/detectors/billomat/billomat.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s.billomat.net/api/v2/clients/myself", resId), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s.billomat.net/api/v2/clients/myself", resId), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("X-BillomatApiKey", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/bitbar/bitbar.go b/pkg/detectors/bitbar/bitbar.goindex cfa3381be..6c9aaae2f 100644--- a/pkg/detectors/bitbar/bitbar.go+++ b/pkg/detectors/bitbar/bitbar.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:", resMatch)baseToken := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://cloud.bitbar.com/api/me", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://cloud.bitbar.com/api/me", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", baseToken))res, err := client.Do(req)diff --git a/pkg/detectors/bitcoinaverage/bitcoinaverage.go b/pkg/detectors/bitcoinaverage/bitcoinaverage.goindex 273954c0c..cade9c516 100644--- a/pkg/detectors/bitcoinaverage/bitcoinaverage.go+++ b/pkg/detectors/bitcoinaverage/bitcoinaverage.go@@ -46,7 +46,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultRaw: []byte(resMatch),}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://apiv2.bitcoinaverage.com/websocket/get_ticket", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://apiv2.bitcoinaverage.com/websocket/get_ticket", nil)+ if err != nil {+ continue+ }req.Header.Add("x-ba-key", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/bitlyaccesstoken/bitlyaccesstoken.go b/pkg/detectors/bitlyaccesstoken/bitlyaccesstoken.goindex 8db8a6644..2156cf010 100644--- a/pkg/detectors/bitlyaccesstoken/bitlyaccesstoken.go+++ b/pkg/detectors/bitlyaccesstoken/bitlyaccesstoken.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api-ssl.bitly.com/v4/user", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api-ssl.bitly.com/v4/user", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/bitmex/bitmex.go b/pkg/detectors/bitmex/bitmex.goindex 2fbccf301..575457b91 100644--- a/pkg/detectors/bitmex/bitmex.go+++ b/pkg/detectors/bitmex/bitmex.go@@ -69,7 +69,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultsignature := getBitmexSignature(timestamp, resSecretMatch, action, path, payload.Encode())- req, _ := http.NewRequestWithContext(ctx, action, "https://www.bitmex.com"+path, strings.NewReader(payload.Encode()))+ req, err := http.NewRequestWithContext(ctx, action, "https://www.bitmex.com"+path, strings.NewReader(payload.Encode()))+ if err != nil {+ continue+ }req.Header.Add("api-expires", timestamp)req.Header.Add("api-key", resMatch)req.Header.Add("api-signature", signature)diff --git a/pkg/detectors/blablabus/blablabus.go b/pkg/detectors/blablabus/blablabus.goindex ba7927f9a..01f67d5d0 100644--- a/pkg/detectors/blablabus/blablabus.go+++ b/pkg/detectors/blablabus/blablabus.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.idbus.com/v3/stops", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.idbus.com/v3/stops", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Token %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/blazemeter/blazemeter.go b/pkg/detectors/blazemeter/blazemeter.goindex 46b6387fd..e6ede15d4 100644--- a/pkg/detectors/blazemeter/blazemeter.go+++ b/pkg/detectors/blazemeter/blazemeter.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.runscope.com/account", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.runscope.com/account", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/blitapp/blitapp.go b/pkg/detectors/blitapp/blitapp.goindex eab320526..f92ad90d0 100644--- a/pkg/detectors/blitapp/blitapp.go+++ b/pkg/detectors/blitapp/blitapp.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://blitapp.com/api/apps/all", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://blitapp.com/api/apps/all", nil)+ if err != nil {+ continue+ }req.Header.Add("API-Key", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/blogger/blogger.go b/pkg/detectors/blogger/blogger.goindex 13067e837..3fc4eb394 100644--- a/pkg/detectors/blogger/blogger.go+++ b/pkg/detectors/blogger/blogger.go@@ -46,7 +46,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://www.googleapis.com/blogger/v3/blogs/2399953?key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://www.googleapis.com/blogger/v3/blogs/2399953?key="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/bombbomb/bombbomb.go b/pkg/detectors/bombbomb/bombbomb.goindex 01c96d7a8..49f050369 100644--- a/pkg/detectors/bombbomb/bombbomb.go+++ b/pkg/detectors/bombbomb/bombbomb.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.bombbomb.com/v2/lists/", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.bombbomb.com/v2/lists/", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/boostnote/boostnote.go b/pkg/detectors/boostnote/boostnote.goindex 8af92646d..4cb32b2eb 100644--- a/pkg/detectors/boostnote/boostnote.go+++ b/pkg/detectors/boostnote/boostnote.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://boostnote.io/api/docs", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://boostnote.io/api/docs", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/borgbase/borgbase.go b/pkg/detectors/borgbase/borgbase.goindex 3d2a58770..bd8f53e3d 100644--- a/pkg/detectors/borgbase/borgbase.go+++ b/pkg/detectors/borgbase/borgbase.go@@ -53,7 +53,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resulttimeout := 10 * time.Secondclient.Timeout = timeoutpayload := strings.NewReader(`{"query":"{ sshList {id, name}}"}`)- req, _ := http.NewRequest("POST", "https://api.borgbase.com/graphql", payload)+ req, err := http.NewRequest("POST", "https://api.borgbase.com/graphql", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/brandfetch/brandfetch.go b/pkg/detectors/brandfetch/brandfetch.goindex fab63c4ef..0d9c5ae0a 100644--- a/pkg/detectors/brandfetch/brandfetch.go+++ b/pkg/detectors/brandfetch/brandfetch.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultpayload := strings.NewReader(`{"domain": "www.example.com"}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.brandfetch.io/v1/color", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api.brandfetch.io/v1/color", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("x-api-key", fmt.Sprintf("%s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/browshot/browshot.go b/pkg/detectors/browshot/browshot.goindex 34a2f5198..646013d82 100644--- a/pkg/detectors/browshot/browshot.go+++ b/pkg/detectors/browshot/browshot.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.browshot.com/api/v1/instance/list?key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.browshot.com/api/v1/instance/list?key="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/buddyns/buddyns.go b/pkg/detectors/buddyns/buddyns.goindex 39640ecdf..20572ab86 100644--- a/pkg/detectors/buddyns/buddyns.go+++ b/pkg/detectors/buddyns/buddyns.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://www.buddyns.com/api/v2/zone/", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://www.buddyns.com/api/v2/zone/", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Token %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/buddyns/buddyns/buddyns.go b/pkg/detectors/buddyns/buddyns/buddyns.goindex 39640ecdf..20572ab86 100644--- a/pkg/detectors/buddyns/buddyns/buddyns.go+++ b/pkg/detectors/buddyns/buddyns/buddyns.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://www.buddyns.com/api/v2/zone/", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://www.buddyns.com/api/v2/zone/", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Token %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/bugherd/bugherd.go b/pkg/detectors/bugherd/bugherd.goindex 169639a4a..54a1f9375 100644--- a/pkg/detectors/bugherd/bugherd.go+++ b/pkg/detectors/bugherd/bugherd.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:x", resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://www.bugherd.com/api_v2/projects.json", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://www.bugherd.com/api_v2/projects.json", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)diff --git a/pkg/detectors/bugsnag/bugsnag.go b/pkg/detectors/bugsnag/bugsnag.goindex 273e18c7d..6121a29aa 100644--- a/pkg/detectors/bugsnag/bugsnag.go+++ b/pkg/detectors/bugsnag/bugsnag.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.bugsnag.com/user/organizations?admin", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.bugsnag.com/user/organizations?admin", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("token %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/buildkite/buildkite.go b/pkg/detectors/buildkite/buildkite.goindex 30d8b81e1..48ce92a83 100644--- a/pkg/detectors/buildkite/buildkite.go+++ b/pkg/detectors/buildkite/buildkite.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.buildkite.com/v2/user", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.buildkite.com/v2/user", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/bulbul/bulbul.go b/pkg/detectors/bulbul/bulbul.goindex cb5dccff4..b5f9ce2cb 100644--- a/pkg/detectors/bulbul/bulbul.go+++ b/pkg/detectors/bulbul/bulbul.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://prod-api.bulbul.io/view_all_users?api_key=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://prod-api.bulbul.io/view_all_users?api_key=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {bodyBytes, _ := ioutil.ReadAll(res.Body)diff --git a/pkg/detectors/buttercms/buttercms.go b/pkg/detectors/buttercms/buttercms.goindex 5188e4ecd..6942316c0 100644--- a/pkg/detectors/buttercms/buttercms.go+++ b/pkg/detectors/buttercms/buttercms.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.buttercms.com/v2/posts/?auth_token="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.buttercms.com/v2/posts/?auth_token="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/caflou/caflou.go b/pkg/detectors/caflou/caflou.goindex ad1915b9d..e7feea4e8 100644--- a/pkg/detectors/caflou/caflou.go+++ b/pkg/detectors/caflou/caflou.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 10 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.caflou.com/api/v1/accounts", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://app.caflou.com/api/v1/accounts", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/caflou/caflou/caflou.go b/pkg/detectors/caflou/caflou/caflou.goindex ad1915b9d..e7feea4e8 100644--- a/pkg/detectors/caflou/caflou/caflou.go+++ b/pkg/detectors/caflou/caflou/caflou.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 10 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.caflou.com/api/v1/accounts", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://app.caflou.com/api/v1/accounts", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/calendarific/calendarific.go b/pkg/detectors/calendarific/calendarific.goindex 3143859d2..d37e70d59 100644--- a/pkg/detectors/calendarific/calendarific.go+++ b/pkg/detectors/calendarific/calendarific.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://calendarific.com/api/v2/holidays?&api_key="+resMatch+"&country=US&year=2019", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://calendarific.com/api/v2/holidays?&api_key="+resMatch+"&country=US&year=2019", nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/calendlyapikey/calendlyapikey.go b/pkg/detectors/calendlyapikey/calendlyapikey.goindex 6e3bb4168..d26f51224 100644--- a/pkg/detectors/calendlyapikey/calendlyapikey.go+++ b/pkg/detectors/calendlyapikey/calendlyapikey.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.calendly.com/users/me", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.calendly.com/users/me", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/calorieninja/calorieninja.go b/pkg/detectors/calorieninja/calorieninja.goindex 7b3015f25..e262e5ae0 100644--- a/pkg/detectors/calorieninja/calorieninja.go+++ b/pkg/detectors/calorieninja/calorieninja.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.calorieninjas.com/v1/nutrition?query", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.calorieninjas.com/v1/nutrition?query", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("X-Api-Key", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/campayn/campayn.go b/pkg/detectors/campayn/campayn.goindex 920fbf44a..7c8cd3937 100644--- a/pkg/detectors/campayn/campayn.go+++ b/pkg/detectors/campayn/campayn.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://campayn.com/api/v1/lists", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://campayn.com/api/v1/lists", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", "TRUEREST apikey="+resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/cannyio/cannyio.go b/pkg/detectors/cannyio/cannyio.goindex ad5620dc8..918645fc1 100644--- a/pkg/detectors/cannyio/cannyio.go+++ b/pkg/detectors/cannyio/cannyio.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader("apiKey=" + resMatch)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://canny.io/api/v1/boards/list", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://canny.io/api/v1/boards/list", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/x-www-form-urlencoded")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/capsulecrm/capsulecrm.go b/pkg/detectors/capsulecrm/capsulecrm.goindex 41dde632b..8c81c8c8c 100644--- a/pkg/detectors/capsulecrm/capsulecrm.go+++ b/pkg/detectors/capsulecrm/capsulecrm.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.capsulecrm.com/api/v2/users", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.capsulecrm.com/api/v2/users", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/captaindata/captaindata.go b/pkg/detectors/captaindata/captaindata.goindex 8bb5f45a5..776d1ba65 100644--- a/pkg/detectors/captaindata/captaindata.go+++ b/pkg/detectors/captaindata/captaindata.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.captaindata.co/v2/"+resProjIdMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.captaindata.co/v2/"+resProjIdMatch, nil)+ if err != nil {+ continue+ }req.Header.Add("x-api-key", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/carboninterface/carboninterface.go b/pkg/detectors/carboninterface/carboninterface.goindex ded0910c0..9c9e6168b 100644--- a/pkg/detectors/carboninterface/carboninterface.go+++ b/pkg/detectors/carboninterface/carboninterface.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(`{"type":"flight","passengers":2,"legs":[{"departure_airport":"sfo","destination_airport":"yyz"},{"departure_airport":"yyz","destination_airport":"sfo"}]}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://www.carboninterface.com/api/v1/estimates", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://www.carboninterface.com/api/v1/estimates", payload)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))req.Header.Add("Content-type", "application/json")res, err := client.Do(req)diff --git a/pkg/detectors/cashboard/cashboard.go b/pkg/detectors/cashboard/cashboard.goindex f9e0d54ca..f701ee64d 100644--- a/pkg/detectors/cashboard/cashboard.go+++ b/pkg/detectors/cashboard/cashboard.go@@ -59,7 +59,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:%s", resUser, resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.cashboardapp.com/account.xml", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.cashboardapp.com/account.xml", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)diff --git a/pkg/detectors/cashboard/cashboard/cashboard.go b/pkg/detectors/cashboard/cashboard/cashboard.goindex f9e0d54ca..f701ee64d 100644--- a/pkg/detectors/cashboard/cashboard/cashboard.go+++ b/pkg/detectors/cashboard/cashboard/cashboard.go@@ -59,7 +59,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:%s", resUser, resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.cashboardapp.com/account.xml", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.cashboardapp.com/account.xml", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)diff --git a/pkg/detectors/caspio/caspio.go b/pkg/detectors/caspio/caspio.goindex 9081c18f7..fe039116e 100644--- a/pkg/detectors/caspio/caspio.go+++ b/pkg/detectors/caspio/caspio.go@@ -67,7 +67,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(fmt.Sprintf(`grant_type=client_credentials&client_id=%s&client_secret=%s`, resIdMatch, resMatch))- req, _ := http.NewRequest("POST", fmt.Sprintf("https://%s.caspio.com/oauth/token", resDomainMatch), payload)+ req, err := http.NewRequest("POST", fmt.Sprintf("https://%s.caspio.com/oauth/token", resDomainMatch), payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "text/plain")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/censys/censys.go b/pkg/detectors/censys/censys.goindex a1bfc4366..d044464f1 100644--- a/pkg/detectors/censys/censys.go+++ b/pkg/detectors/censys/censys.go@@ -54,7 +54,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://search.censys.io/api/v1/account", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://search.censys.io/api/v1/account", nil)+ if err != nil {+ continue+ }req.SetBasicAuth(userPatMatch, tokenPatMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/centralstationcrm/centralstationcrm.go b/pkg/detectors/centralstationcrm/centralstationcrm.goindex 4cba92dd2..830dd8c14 100644--- a/pkg/detectors/centralstationcrm/centralstationcrm.go+++ b/pkg/detectors/centralstationcrm/centralstationcrm.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.centralstationcrm.net/api/users.json", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.centralstationcrm.net/api/users.json", nil)+ if err != nil {+ continue+ }req.Header.Add("X-apikey", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/cexio/cexio.go b/pkg/detectors/cexio/cexio.goindex 0dc4de1b0..92b679623 100644--- a/pkg/detectors/cexio/cexio.go+++ b/pkg/detectors/cexio/cexio.go@@ -82,7 +82,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultpayload.Add("signature", signature)payload.Add("nonce", timestamp)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://cex.io/api/balance/", strings.NewReader(payload.Encode()))+ req, err := http.NewRequestWithContext(ctx, "POST", "https://cex.io/api/balance/", strings.NewReader(payload.Encode()))+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/x-www-form-urlencoded")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/chatbot/chatbot.go b/pkg/detectors/chatbot/chatbot.goindex d3e3249a4..25712cbcd 100644--- a/pkg/detectors/chatbot/chatbot.go+++ b/pkg/detectors/chatbot/chatbot.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.chatbot.com/stories", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.chatbot.com/stories", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/chatfule/chatfule.go b/pkg/detectors/chatfule/chatfule.goindex f8072a872..49558df5a 100644--- a/pkg/detectors/chatfule/chatfule.go+++ b/pkg/detectors/chatfule/chatfule.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequest("GET", "https://dashboard.chatfuel.com/api/bots", nil)+ req, err := http.NewRequest("GET", "https://dashboard.chatfuel.com/api/bots", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/checio/checio.go b/pkg/detectors/checio/checio.goindex 5416012ac..1c9a42b07 100644--- a/pkg/detectors/checio/checio.go+++ b/pkg/detectors/checio/checio.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.chec.io/v1/products?limit=25", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.chec.io/v1/products?limit=25", nil)+ if err != nil {+ continue+ }req.Header.Add("X-Authorization", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/checio/checio/checio.go b/pkg/detectors/checio/checio/checio.goindex 5416012ac..1c9a42b07 100644--- a/pkg/detectors/checio/checio/checio.go+++ b/pkg/detectors/checio/checio/checio.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.chec.io/v1/products?limit=25", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.chec.io/v1/products?limit=25", nil)+ if err != nil {+ continue+ }req.Header.Add("X-Authorization", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/checklyhq/checklyhq.go b/pkg/detectors/checklyhq/checklyhq.goindex fee1dbef8..ba9406778 100644--- a/pkg/detectors/checklyhq/checklyhq.go+++ b/pkg/detectors/checklyhq/checklyhq.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.checklyhq.com/v1/checks", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.checklyhq.com/v1/checks", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/checklyhq/checklyhq/checklyhq.go b/pkg/detectors/checklyhq/checklyhq/checklyhq.goindex fee1dbef8..ba9406778 100644--- a/pkg/detectors/checklyhq/checklyhq/checklyhq.go+++ b/pkg/detectors/checklyhq/checklyhq/checklyhq.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.checklyhq.com/v1/checks", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.checklyhq.com/v1/checks", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/checkout/checkout.go b/pkg/detectors/checkout/checkout.goindex 37ef42656..a66c8cf65 100644--- a/pkg/detectors/checkout/checkout.go+++ b/pkg/detectors/checkout/checkout.go@@ -57,7 +57,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {//Used the app's sandbox environment for this case since I can't create a live account.- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.sandbox.checkout.com/customers/"+resIdMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.sandbox.checkout.com/customers/"+resIdMatch, nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/checkvist/checkvist.go b/pkg/detectors/checkvist/checkvist.goindex 6f15c0cbe..de16a57d7 100644--- a/pkg/detectors/checkvist/checkvist.go+++ b/pkg/detectors/checkvist/checkvist.go@@ -61,7 +61,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultpayload.Add("username", resEmailMatch)payload.Add("remote_key", resMatch)- req, _ := http.NewRequest("GET", "https://checkvist.com/auth/login.json?version=2", strings.NewReader(payload.Encode()))+ req, err := http.NewRequest("GET", "https://checkvist.com/auth/login.json?version=2", strings.NewReader(payload.Encode()))+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/x-www-form-urlencoded")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/cicero/cicero.go b/pkg/detectors/cicero/cicero.goindex 2ed920f78..a364ff8e2 100644--- a/pkg/detectors/cicero/cicero.go+++ b/pkg/detectors/cicero/cicero.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://cicero.azavea.com/v3.1/account/credits_remaining?key=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://cicero.azavea.com/v3.1/account/credits_remaining?key=%s", resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/circleci/circleci.go b/pkg/detectors/circleci/circleci.goindex fec09a57b..c58f81dd1 100644--- a/pkg/detectors/circleci/circleci.go+++ b/pkg/detectors/circleci/circleci.go@@ -44,7 +44,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {client := common.SaneHttpClient()// https://circleci.com/docs/api/#authentication- req, _ := http.NewRequestWithContext(ctx, "GET", "https://circleci.com/api/v2/me", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://circleci.com/api/v2/me", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json;")req.Header.Add("Circle-Token", token)res, err := client.Do(req)diff --git a/pkg/detectors/clarifai/clarifai.go b/pkg/detectors/clarifai/clarifai.goindex f8b688935..a4e5ef141 100644--- a/pkg/detectors/clarifai/clarifai.go+++ b/pkg/detectors/clarifai/clarifai.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {// test for api key- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.clarifai.com/v2/inputs", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.clarifai.com/v2/inputs", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Key %s", resMatch))res, err := client.Do(req)if err == nil {@@ -60,7 +63,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif !s1.Verified {// test for pat- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.clarifai.com/v2/users/me", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.clarifai.com/v2/users/me", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Key %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/clearbit/clearbit.go b/pkg/detectors/clearbit/clearbit.goindex e1808dfb1..17c97e588 100644--- a/pkg/detectors/clearbit/clearbit.go+++ b/pkg/detectors/clearbit/clearbit.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://person.clearbit.com/v1/people/email/[email protected]", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://person.clearbit.com/v1/people/email/[email protected]", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/clickhelp/clickhelp.go b/pkg/detectors/clickhelp/clickhelp.goindex 98d1968b9..82f8725aa 100644--- a/pkg/detectors/clickhelp/clickhelp.go+++ b/pkg/detectors/clickhelp/clickhelp.go@@ -66,7 +66,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:%s", resEmail, resKey)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s/api/v1/projects", resServer), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s/api/v1/projects", resServer), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)diff --git a/pkg/detectors/clicksendsms/clicksendsms.go b/pkg/detectors/clicksendsms/clicksendsms.goindex 7a84e675c..791efd9d1 100644--- a/pkg/detectors/clicksendsms/clicksendsms.go+++ b/pkg/detectors/clicksendsms/clicksendsms.go@@ -60,7 +60,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultdata := fmt.Sprintf("%s:%s", resIdMatch, resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://rest.clicksend.com/v3/account", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://rest.clicksend.com/v3/account", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/clickuppersonaltoken/clickuppersonaltoken.go b/pkg/detectors/clickuppersonaltoken/clickuppersonaltoken.goindex 6f66108c6..e2c9d8431 100644--- a/pkg/detectors/clickuppersonaltoken/clickuppersonaltoken.go+++ b/pkg/detectors/clickuppersonaltoken/clickuppersonaltoken.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.clickup.com/api/v2/user", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.clickup.com/api/v2/user", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/clinchpad/clinchpad.go b/pkg/detectors/clinchpad/clinchpad.goindex daef95f65..9c1cbe5d1 100644--- a/pkg/detectors/clinchpad/clinchpad.go+++ b/pkg/detectors/clinchpad/clinchpad.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("api-key:%s", resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://www.clinchpad.com/api/v1/pipelines", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://www.clinchpad.com/api/v1/pipelines", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/clockify/clockify.go b/pkg/detectors/clockify/clockify.goindex 47603901d..51cd12bb0 100644--- a/pkg/detectors/clockify/clockify.go+++ b/pkg/detectors/clockify/clockify.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.clockify.me/api/v1/user", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.clockify.me/api/v1/user", nil)+ if err != nil {+ continue+ }req.Header.Add("content-type", "application/json")req.Header.Add("X-Api-Key", fmt.Sprintf("%s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/clockworksms/clockworksms.go b/pkg/detectors/clockworksms/clockworksms.goindex de5d23d49..b9f9922d5 100644--- a/pkg/detectors/clockworksms/clockworksms.go+++ b/pkg/detectors/clockworksms/clockworksms.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.textanywhere.com/API/v1.0/REST/status", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.textanywhere.com/API/v1.0/REST/status", nil)+ if err != nil {+ continue+ }req.Header.Add("user_key", resMatch)req.Header.Add("access_token", tokenRes)res, err := client.Do(req)diff --git a/pkg/detectors/closecrm/close.go b/pkg/detectors/closecrm/close.goindex d0a5bf1df..05be7cb62 100644--- a/pkg/detectors/closecrm/close.go+++ b/pkg/detectors/closecrm/close.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:", resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.close.com/api/v1/me/", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.close.com/api/v1/me/", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)diff --git a/pkg/detectors/cloudelements/cloudelements.go b/pkg/detectors/cloudelements/cloudelements.goindex 75e922a32..0e6cf3955 100644--- a/pkg/detectors/cloudelements/cloudelements.go+++ b/pkg/detectors/cloudelements/cloudelements.go@@ -57,7 +57,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://staging.cloud-elements.com/elements/api-v2/accounts", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://staging.cloud-elements.com/elements/api-v2/accounts", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("User %s, Organization %s", resMatch, resOrgMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/cloudelements/cloudelements/cloudelements.go b/pkg/detectors/cloudelements/cloudelements/cloudelements.goindex 75e922a32..0e6cf3955 100644--- a/pkg/detectors/cloudelements/cloudelements/cloudelements.go+++ b/pkg/detectors/cloudelements/cloudelements/cloudelements.go@@ -57,7 +57,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://staging.cloud-elements.com/elements/api-v2/accounts", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://staging.cloud-elements.com/elements/api-v2/accounts", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("User %s, Organization %s", resMatch, resOrgMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/cloudflareapitoken/cloudflareapitoken.go b/pkg/detectors/cloudflareapitoken/cloudflareapitoken.goindex 8934d27ac..cef107f2b 100644--- a/pkg/detectors/cloudflareapitoken/cloudflareapitoken.go+++ b/pkg/detectors/cloudflareapitoken/cloudflareapitoken.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.cloudflare.com/client/v4/user/tokens/verify", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.cloudflare.com/client/v4/user/tokens/verify", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/cloudflarecakey/cloudflarecakey.go b/pkg/detectors/cloudflarecakey/cloudflarecakey.goindex a2cf7af95..90002216e 100644--- a/pkg/detectors/cloudflarecakey/cloudflarecakey.go+++ b/pkg/detectors/cloudflarecakey/cloudflarecakey.go@@ -52,7 +52,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.cloudflare.com/client/v4/certificates?zone_id=a", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.cloudflare.com/client/v4/certificates?zone_id=a", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("user-agent", "curl/7.68.0") // pretend to be from curl so we do not wait 100+ seconds -> nice try did not workdiff --git a/pkg/detectors/cloudflareglobalapikey/cloudflareglobalapikey.go b/pkg/detectors/cloudflareglobalapikey/cloudflareglobalapikey.goindex 7e3f47131..1f7ffa816 100644--- a/pkg/detectors/cloudflareglobalapikey/cloudflareglobalapikey.go+++ b/pkg/detectors/cloudflareglobalapikey/cloudflareglobalapikey.go@@ -63,7 +63,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.cloudflare.com/client/v4/user", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.cloudflare.com/client/v4/user", nil)+ if err != nil {+ continue+ }req.Header.Add("X-Auth-Email", emailRes)req.Header.Add("X-Auth-Key", apiKeyRes)req.Header.Add("Content-Type", "application/json")diff --git a/pkg/detectors/cloudimage/cloudimage.go b/pkg/detectors/cloudimage/cloudimage.goindex bd345e0f8..ff2a33516 100644--- a/pkg/detectors/cloudimage/cloudimage.go+++ b/pkg/detectors/cloudimage/cloudimage.go@@ -52,7 +52,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result`)timeout := 10 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequest("POST", "https://api.cloudimage.com/invalidate", payload)+ req, err := http.NewRequest("POST", "https://api.cloudimage.com/invalidate", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("X-Client-Key", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/cloudmersive/cloudmersive.go b/pkg/detectors/cloudmersive/cloudmersive.goindex e8b1eb286..4c9eac029 100644--- a/pkg/detectors/cloudmersive/cloudmersive.go+++ b/pkg/detectors/cloudmersive/cloudmersive.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(`{"AddressString":"string","CapitalizationMode":"string"}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.cloudmersive.com/validate/address/parse", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api.cloudmersive.com/validate/address/parse", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Apikey", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/cloudplan/cloudplan.go b/pkg/detectors/cloudplan/cloudplan.goindex 32dff79b7..91a24409a 100644--- a/pkg/detectors/cloudplan/cloudplan.go+++ b/pkg/detectors/cloudplan/cloudplan.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.cloudplan.biz/api/user/me", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.cloudplan.biz/api/user/me", nil)+ if err != nil {+ continue+ }req.Header.Add("session_id", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/cloverly/cloverly.go b/pkg/detectors/cloverly/cloverly.goindex 011ab6c70..8c448fe9e 100644--- a/pkg/detectors/cloverly/cloverly.go+++ b/pkg/detectors/cloverly/cloverly.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.cloverly.com/2019-03-beta/account", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.cloverly.com/2019-03-beta/account", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/cloze/cloze.go b/pkg/detectors/cloze/cloze.goindex 2e7fab5a6..795b9ccfa 100644--- a/pkg/detectors/cloze/cloze.go+++ b/pkg/detectors/cloze/cloze.go@@ -61,7 +61,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultpayload.Add("user", resEmailMatch)payload.Add("api_key", resMatch)- req, _ := http.NewRequest("GET", "https://api.cloze.com/v1/profile?"+payload.Encode(), nil)+ req, err := http.NewRequest("GET", "https://api.cloze.com/v1/profile?"+payload.Encode(), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/clustdoc/clustdoc.go b/pkg/detectors/clustdoc/clustdoc.goindex 5797cce5c..7ccee4ed0 100644--- a/pkg/detectors/clustdoc/clustdoc.go+++ b/pkg/detectors/clustdoc/clustdoc.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://clustdoc.com/api/users", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://clustdoc.com/api/users", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/codacy/codacy.go b/pkg/detectors/codacy/codacy.goindex 14eb51bc1..f942c8696 100644--- a/pkg/detectors/codacy/codacy.go+++ b/pkg/detectors/codacy/codacy.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.codacy.com/api/v3/version", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://app.codacy.com/api/v3/version", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("api-token", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/coinapi/coinapi.go b/pkg/detectors/coinapi/coinapi.goindex 089e9acc6..58c7e3eed 100644--- a/pkg/detectors/coinapi/coinapi.go+++ b/pkg/detectors/coinapi/coinapi.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://rest.coinapi.io/v1/exchanges", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://rest.coinapi.io/v1/exchanges", nil)+ if err != nil {+ continue+ }req.Header.Add("X-CoinAPI-Key", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/coinbase/coinbase.go b/pkg/detectors/coinbase/coinbase.goindex 59e6ae9aa..053a5fa6f 100644--- a/pkg/detectors/coinbase/coinbase.go+++ b/pkg/detectors/coinbase/coinbase.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.coinbase.com/v2/user", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.coinbase.com/v2/user", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/coinlayer/coinlayer.go b/pkg/detectors/coinlayer/coinlayer.goindex 0c055ee3a..2662ff088 100644--- a/pkg/detectors/coinlayer/coinlayer.go+++ b/pkg/detectors/coinlayer/coinlayer.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.coinlayer.com/api/live?access_key=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.coinlayer.com/api/live?access_key=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {bodyBytes, err := ioutil.ReadAll(res.Body)diff --git a/pkg/detectors/coinlib/coinlib.go b/pkg/detectors/coinlib/coinlib.goindex a4883aceb..82a627c94 100644--- a/pkg/detectors/coinlib/coinlib.go+++ b/pkg/detectors/coinlib/coinlib.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://coinlib.io/api/v1/global?key=%s&pref=EUR", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://coinlib.io/api/v1/global?key=%s&pref=EUR", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/column/column.go b/pkg/detectors/column/column.goindex c4074092d..28963a4b8 100644--- a/pkg/detectors/column/column.go+++ b/pkg/detectors/column/column.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.column.com/entities", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.column.com/entities", nil)+ if err != nil {+ continue+ }//req.SetBasicAuth(resMatch, "")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", base64.StdEncoding.EncodeToString([]byte(resMatch))))res, err := client.Do(req)diff --git a/pkg/detectors/commercejs/commercejs.go b/pkg/detectors/commercejs/commercejs.goindex 273fe848d..f06ab1835 100644--- a/pkg/detectors/commercejs/commercejs.go+++ b/pkg/detectors/commercejs/commercejs.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.chec.io/v1/categories", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.chec.io/v1/categories", nil)+ if err != nil {+ continue+ }req.Header.Add("X-Authorization", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/commodities/commodities.go b/pkg/detectors/commodities/commodities.goindex 5b4720dd9..a004c3852 100644--- a/pkg/detectors/commodities/commodities.go+++ b/pkg/detectors/commodities/commodities.go@@ -50,7 +50,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {client.Timeout = 5 * time.Second- req, _ := http.NewRequestWithContext(ctx, "GET", "https://commodities-api.com/api/latest?access_key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://commodities-api.com/api/latest?access_key="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {bodyBytes, err := ioutil.ReadAll(res.Body)diff --git a/pkg/detectors/companyhub/companyhub.go b/pkg/detectors/companyhub/companyhub.goindex de5eb9e73..080ae8d97 100644--- a/pkg/detectors/companyhub/companyhub.go+++ b/pkg/detectors/companyhub/companyhub.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.companyhub.com/v1/me", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.companyhub.com/v1/me", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("%s %s", resIdMatch, resMatch))req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)diff --git a/pkg/detectors/confluent/confluent.go b/pkg/detectors/confluent/confluent.goindex 14adae4f4..5bf7d3e9d 100644--- a/pkg/detectors/confluent/confluent.go+++ b/pkg/detectors/confluent/confluent.go@@ -59,7 +59,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:%s", resMatch, resSecret)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.telemetry.confluent.cloud/v2/metrics/cloud/descriptors/resources", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.telemetry.confluent.cloud/v2/metrics/cloud/descriptors/resources", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/contentfulpersonalaccesstoken/contentfulpersonalaccesstoken.go b/pkg/detectors/contentfulpersonalaccesstoken/contentfulpersonalaccesstoken.goindex f439f7650..9ece53eb5 100644--- a/pkg/detectors/contentfulpersonalaccesstoken/contentfulpersonalaccesstoken.go+++ b/pkg/detectors/contentfulpersonalaccesstoken/contentfulpersonalaccesstoken.go@@ -46,7 +46,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.contentful.com/organizations", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.contentful.com/organizations", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", keyRes))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/convertkit/convertkit.go b/pkg/detectors/convertkit/convertkit.goindex 6e43d6297..ffc67cd68 100644--- a/pkg/detectors/convertkit/convertkit.go+++ b/pkg/detectors/convertkit/convertkit.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.convertkit.com/v3/forms?api_key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.convertkit.com/v3/forms?api_key="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/convier/convier.go b/pkg/detectors/convier/convier.goindex 32d50ce43..b777d4927 100644--- a/pkg/detectors/convier/convier.go+++ b/pkg/detectors/convier/convier.go@@ -52,7 +52,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 10 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequest("POST", "https://convier.me/api/event", nil)+ req, err := http.NewRequest("POST", "https://convier.me/api/event", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/copper/copper.go b/pkg/detectors/copper/copper.goindex 666bbdcfd..c3106fefd 100644--- a/pkg/detectors/copper/copper.go+++ b/pkg/detectors/copper/copper.go@@ -59,7 +59,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result"page_size": 25,"sort_by": "name"}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.copper.com/developer_api/v1/tasks/search", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api.copper.com/developer_api/v1/tasks/search", payload)+ if err != nil {+ continue+ }req.Header.Add("X-PW-AccessToken", resMatch)req.Header.Add("X-PW-Application", "developer_api")req.Header.Add("X-PW-UserEmail", resIdMatch)diff --git a/pkg/detectors/countrylayer/countrylayer.go b/pkg/detectors/countrylayer/countrylayer.goindex 6a731564f..29206e3a8 100644--- a/pkg/detectors/countrylayer/countrylayer.go+++ b/pkg/detectors/countrylayer/countrylayer.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.countrylayer.com/v2/all?access_key=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.countrylayer.com/v2/all?access_key=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/courier/courier.go b/pkg/detectors/courier/courier.goindex 88395dacf..8fda9242e 100644--- a/pkg/detectors/courier/courier.go+++ b/pkg/detectors/courier/courier.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.courier.com/preferences", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.courier.com/preferences", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/courier/courier/courier.go b/pkg/detectors/courier/courier/courier.goindex 88395dacf..8fda9242e 100644--- a/pkg/detectors/courier/courier/courier.go+++ b/pkg/detectors/courier/courier/courier.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.courier.com/preferences", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.courier.com/preferences", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/coveralls/coveralls.go b/pkg/detectors/coveralls/coveralls.goindex af0ae0571..93aa691a9 100644--- a/pkg/detectors/coveralls/coveralls.go+++ b/pkg/detectors/coveralls/coveralls.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://coveralls.io/api/repos/github/secretscanner02/scanner", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://coveralls.io/api/repos/github/secretscanner02/scanner", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("token %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/crowdin/crowdin.go b/pkg/detectors/crowdin/crowdin.goindex c81bda801..4b487594f 100644--- a/pkg/detectors/crowdin/crowdin.go+++ b/pkg/detectors/crowdin/crowdin.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.crowdin.com/api/v2/storages", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.crowdin.com/api/v2/storages", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/cryptocompare/cryptocompare.go b/pkg/detectors/cryptocompare/cryptocompare.goindex 73a4f24c0..d02a8efa3 100644--- a/pkg/detectors/cryptocompare/cryptocompare.go+++ b/pkg/detectors/cryptocompare/cryptocompare.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://min-api.cryptocompare.com/data/blockchain/list?api_key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://min-api.cryptocompare.com/data/blockchain/list?api_key="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {bodyBytes, err := ioutil.ReadAll(res.Body)diff --git a/pkg/detectors/currencycloud/currencycloud.go b/pkg/detectors/currencycloud/currencycloud.goindex 8429e0afd..70c6978c1 100644--- a/pkg/detectors/currencycloud/currencycloud.go+++ b/pkg/detectors/currencycloud/currencycloud.go@@ -58,7 +58,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {// Get authentication tokenpayload := strings.NewReader(`{"login_id":"` + resEmailMatch + `","api_key":"` + resMatch + `"`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://devapi.currencycloud.com/v2/authenticate/api", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://devapi.currencycloud.com/v2/authenticate/api", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/currencyfreaks/currencyfreaks.go b/pkg/detectors/currencyfreaks/currencyfreaks.goindex bc45b831f..441e4a18a 100644--- a/pkg/detectors/currencyfreaks/currencyfreaks.go+++ b/pkg/detectors/currencyfreaks/currencyfreaks.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.currencyfreaks.com/latest?apikey="+resMatch+"&format=xml", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.currencyfreaks.com/latest?apikey="+resMatch+"&format=xml", nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/currencylayer/currencylayer.go b/pkg/detectors/currencylayer/currencylayer.goindex 957adaaf7..86d84ab9b 100644--- a/pkg/detectors/currencylayer/currencylayer.go+++ b/pkg/detectors/currencylayer/currencylayer.go@@ -50,7 +50,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.currencylayer.com/live?access_key=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.currencylayer.com/live?access_key=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {bodyBytes, err2 := ioutil.ReadAll(res.Body)diff --git a/pkg/detectors/currencyscoop/currencyscoop.go b/pkg/detectors/currencyscoop/currencyscoop.goindex eda664010..eca1c0776 100644--- a/pkg/detectors/currencyscoop/currencyscoop.go+++ b/pkg/detectors/currencyscoop/currencyscoop.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.currencyscoop.com/v1/latest?api_key=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.currencyscoop.com/v1/latest?api_key=%s", resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/currentsapi/currentsapi.go b/pkg/detectors/currentsapi/currentsapi.goindex d85308046..fe5359a99 100644--- a/pkg/detectors/currentsapi/currentsapi.go+++ b/pkg/detectors/currentsapi/currentsapi.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.currentsapi.services/v1/latest-news", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.currentsapi.services/v1/latest-news", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/customerguru/customerguru.go b/pkg/detectors/customerguru/customerguru.goindex 3af7fc871..fcca83bad 100644--- a/pkg/detectors/customerguru/customerguru.go+++ b/pkg/detectors/customerguru/customerguru.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://customer.guru/export/customers?api_secret="+resIdMatch+"&api_token="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://customer.guru/export/customers?api_secret="+resIdMatch+"&api_token="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/customerio/customerio.go b/pkg/detectors/customerio/customerio.goindex 3030f5409..5be4c5430 100644--- a/pkg/detectors/customerio/customerio.go+++ b/pkg/detectors/customerio/customerio.go@@ -60,7 +60,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultdata := fmt.Sprintf("%s:%s", resIdMatch, resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "POST", "https://track.customer.io/api/v1/customers/5/events", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://track.customer.io/api/v1/customers/5/events", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/x-www-form-urlencoded")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)diff --git a/pkg/detectors/d7network/d7network.go b/pkg/detectors/d7network/d7network.goindex 71b1f4a75..50e5c4cd6 100644--- a/pkg/detectors/d7network/d7network.go+++ b/pkg/detectors/d7network/d7network.go@@ -44,7 +44,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://rest-api.d7networks.com/secure/balance", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://rest-api.d7networks.com/secure/balance", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", "Basic "+resMatch)res, err := http.DefaultClient.Do(req)if err == nil {diff --git a/pkg/detectors/dailyco/dailyco.go b/pkg/detectors/dailyco/dailyco.goindex 8cd1930eb..69d45c1fe 100644--- a/pkg/detectors/dailyco/dailyco.go+++ b/pkg/detectors/dailyco/dailyco.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.daily.co/v1/rooms", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.daily.co/v1/rooms", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/dandelion/dandelion.go b/pkg/detectors/dandelion/dandelion.goindex 061e68981..15f7db74c 100644--- a/pkg/detectors/dandelion/dandelion.go+++ b/pkg/detectors/dandelion/dandelion.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.dandelion.eu/datatxt/li/v1/?text=Smart&token=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.dandelion.eu/datatxt/li/v1/?text=Smart&token=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/datafire/datafire.go b/pkg/detectors/datafire/datafire.goindex ec539e787..7db001af7 100644--- a/pkg/detectors/datafire/datafire.go+++ b/pkg/detectors/datafire/datafire.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.datafire.io/projects/", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.datafire.io/projects/", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/datagov/datagov.go b/pkg/detectors/datagov/datagov.goindex 9ff91eccb..37c2083a8 100644--- a/pkg/detectors/datagov/datagov.go+++ b/pkg/detectors/datagov/datagov.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.ers.usda.gov/data/arms/state?api_key=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.ers.usda.gov/data/arms/state?api_key=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/debounce/debounce.go b/pkg/detectors/debounce/debounce.goindex 8a6c8569d..e488aa094 100644--- a/pkg/detectors/debounce/debounce.go+++ b/pkg/detectors/debounce/debounce.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.debounce.io/v1/?api="+resMatch+"&[email protected]", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.debounce.io/v1/?api="+resMatch+"&[email protected]", nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/deepai/deepai.go b/pkg/detectors/deepai/deepai.goindex 952f8990e..12a87ba37 100644--- a/pkg/detectors/deepai/deepai.go+++ b/pkg/detectors/deepai/deepai.go@@ -61,7 +61,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultcontinue}writer.Close()- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.deepai.org/api/text-tagging", bytes.NewReader(body.Bytes()))+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api.deepai.org/api/text-tagging", bytes.NewReader(body.Bytes()))+ if err != nil {+ continue+ }req.Header.Add("Content-Type", writer.FormDataContentType())req.Header.Add("api-key", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/deepgram/deepgram.go b/pkg/detectors/deepgram/deepgram.goindex 4e18c2617..b8e7e8d10 100644--- a/pkg/detectors/deepgram/deepgram.go+++ b/pkg/detectors/deepgram/deepgram.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.deepgram.com/v1/projects", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.deepgram.com/v1/projects", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Token %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/delighted/delighted.go b/pkg/detectors/delighted/delighted.goindex 264591ea4..ccbe91144 100644--- a/pkg/detectors/delighted/delighted.go+++ b/pkg/detectors/delighted/delighted.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result"email": "[email protected]","properties": { "Purchase Experience": "Mobile App", "State": "CA" }}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.delighted.com/v1/people.json", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api.delighted.com/v1/people.json", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)diff --git a/pkg/detectors/deputy/deputy.go b/pkg/detectors/deputy/deputy.goindex 6dac19b26..9fc20fbf9 100644--- a/pkg/detectors/deputy/deputy.go+++ b/pkg/detectors/deputy/deputy.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s/api/v1/me", resURL), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s/api/v1/me", resURL), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("OAuth %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/deputy/deputy/deputy.go b/pkg/detectors/deputy/deputy/deputy.goindex 6dac19b26..9fc20fbf9 100644--- a/pkg/detectors/deputy/deputy/deputy.go+++ b/pkg/detectors/deputy/deputy/deputy.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s/api/v1/me", resURL), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s/api/v1/me", resURL), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("OAuth %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/detectlanguage/detectlanguage.go b/pkg/detectors/detectlanguage/detectlanguage.goindex 6f379a95f..e90e27f9d 100644--- a/pkg/detectors/detectlanguage/detectlanguage.go+++ b/pkg/detectors/detectlanguage/detectlanguage.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://ws.detectlanguage.com/0.2/user/status", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://ws.detectlanguage.com/0.2/user/status", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/dfuse/dfuse.go b/pkg/detectors/dfuse/dfuse.goindex d139c4666..8a39a6fb4 100644--- a/pkg/detectors/dfuse/dfuse.go+++ b/pkg/detectors/dfuse/dfuse.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(`{"api_key":"` + resMatch + `"}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://auth.dfuse.io/v1/auth/issue", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://auth.dfuse.io/v1/auth/issue", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/diffbot/diffbot.go b/pkg/detectors/diffbot/diffbot.goindex 1635d3eff..7574d153c 100644--- a/pkg/detectors/diffbot/diffbot.go+++ b/pkg/detectors/diffbot/diffbot.go@@ -52,7 +52,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 10 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequest("GET", fmt.Sprintf("https://api.diffbot.com/v4/account?token=%s", resMatch), nil)+ req, err := http.NewRequest("GET", fmt.Sprintf("https://api.diffbot.com/v4/account?token=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {bodyBytes, err := ioutil.ReadAll(res.Body)diff --git a/pkg/detectors/digitaloceantoken/digitaloceantoken.go b/pkg/detectors/digitaloceantoken/digitaloceantoken.goindex 04eb70117..d835f6893 100644--- a/pkg/detectors/digitaloceantoken/digitaloceantoken.go+++ b/pkg/detectors/digitaloceantoken/digitaloceantoken.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.digitalocean.com/v2/account", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.digitalocean.com/v2/account", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/discordbottoken/discordbottoken.go b/pkg/detectors/discordbottoken/discordbottoken.goindex a62f87f17..8e52d4704 100644--- a/pkg/detectors/discordbottoken/discordbottoken.go+++ b/pkg/detectors/discordbottoken/discordbottoken.go@@ -54,7 +54,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://discord.com/api/v8/users/"+resId, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://discord.com/api/v8/users/"+resId, nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bot %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/discordwebhook/discordwebhook.go b/pkg/detectors/discordwebhook/discordwebhook.goindex 9ee63daa7..72b45fcae 100644--- a/pkg/detectors/discordwebhook/discordwebhook.go+++ b/pkg/detectors/discordwebhook/discordwebhook.go@@ -46,7 +46,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/ditto/ditto.go b/pkg/detectors/ditto/ditto.goindex fbf4db3b1..d0123b4b0 100644--- a/pkg/detectors/ditto/ditto.go+++ b/pkg/detectors/ditto/ditto.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.dittowords.com/variants", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.dittowords.com/variants", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("token %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/ditto/ditto/ditto.go b/pkg/detectors/ditto/ditto/ditto.goindex fbf4db3b1..d0123b4b0 100644--- a/pkg/detectors/ditto/ditto/ditto.go+++ b/pkg/detectors/ditto/ditto/ditto.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.dittowords.com/variants", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.dittowords.com/variants", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("token %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/dnscheck/dnscheck.go b/pkg/detectors/dnscheck/dnscheck.goindex 6311a1e76..590cff5a4 100644--- a/pkg/detectors/dnscheck/dnscheck.go+++ b/pkg/detectors/dnscheck/dnscheck.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://www.dnscheck.co/api/v1/groups/"+resIdMatch+"?api_key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://www.dnscheck.co/api/v1/groups/"+resIdMatch+"?api_key="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/documo/documo.go b/pkg/detectors/documo/documo.goindex ead6a5bcb..1358c38d8 100644--- a/pkg/detectors/documo/documo.go+++ b/pkg/detectors/documo/documo.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.documo.com/v1/me", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.documo.com/v1/me", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/doppler/doppler.go b/pkg/detectors/doppler/doppler.goindex 01866312f..bcfc09e0b 100644--- a/pkg/detectors/doppler/doppler.go+++ b/pkg/detectors/doppler/doppler.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.doppler.com/v3/workplace", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.doppler.com/v3/workplace", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.SetBasicAuth(resMatch, "")res, err := client.Do(req)diff --git a/pkg/detectors/dotmailer/dotmailer.go b/pkg/detectors/dotmailer/dotmailer.goindex c30b1c498..eb99430f3 100644--- a/pkg/detectors/dotmailer/dotmailer.go+++ b/pkg/detectors/dotmailer/dotmailer.go@@ -58,7 +58,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 10 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequestWithContext(ctx, "GET", "https://r3-api.dotmailer.com/v2/account-info", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://r3-api.dotmailer.com/v2/account-info", nil)+ if err != nil {+ continue+ }req.SetBasicAuth(resMatch, resPassMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/dovico/dovico.go b/pkg/detectors/dovico/dovico.goindex 9cce36503..f6ce98fae 100644--- a/pkg/detectors/dovico/dovico.go+++ b/pkg/detectors/dovico/dovico.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.dovico.com/Employees/?version=7", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.dovico.com/Employees/?version=7", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf(`WRAP access_token="client=%s&user_token=%s"`, resMatch, resUser))res, err := client.Do(req)diff --git a/pkg/detectors/dronahq/dronahq.go b/pkg/detectors/dronahq/dronahq.goindex 400dbe6c1..32236d9b5 100644--- a/pkg/detectors/dronahq/dronahq.go+++ b/pkg/detectors/dronahq/dronahq.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://plugin.api.dronahq.com/users/?tokenkey=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://plugin.api.dronahq.com/users/?tokenkey=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/droneci/droneci.go b/pkg/detectors/droneci/droneci.goindex 14d0f4cc8..fa5a476dd 100644--- a/pkg/detectors/droneci/droneci.go+++ b/pkg/detectors/droneci/droneci.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://cloud.drone.io/api/user", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://cloud.drone.io/api/user", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/dropbox/dropbox.go b/pkg/detectors/dropbox/dropbox.goindex a1e061456..b6bc32423 100644--- a/pkg/detectors/dropbox/dropbox.go+++ b/pkg/detectors/dropbox/dropbox.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultclient := common.SaneHttpClient()- req, _ := http.NewRequestWithContext(ctx, "POST", baseURL, nil)+ req, err := http.NewRequestWithContext(ctx, "POST", baseURL, nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", match[1]))res, err := client.Do(req)if err != nil {diff --git a/pkg/detectors/dwolla/dwolla.go b/pkg/detectors/dwolla/dwolla.goindex c16f43c0b..c9c1fb28d 100644--- a/pkg/detectors/dwolla/dwolla.go+++ b/pkg/detectors/dwolla/dwolla.go@@ -63,7 +63,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultencoded := b64.StdEncoding.EncodeToString([]byte(data))payload := strings.NewReader("grant_type=client_credentials")- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api-sandbox.dwolla.com/token", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api-sandbox.dwolla.com/token", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/x-www-form-urlencoded")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", encoded))diff --git a/pkg/detectors/dynalist/dynalist.go b/pkg/detectors/dynalist/dynalist.goindex ba66a08b4..ca77a83ba 100644--- a/pkg/detectors/dynalist/dynalist.go+++ b/pkg/detectors/dynalist/dynalist.go@@ -50,7 +50,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(fmt.Sprintf(`{"token": "%s"}`, resMatch))- req, _ := http.NewRequestWithContext(ctx, "POST", "https://dynalist.io/api/v1/file/list", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://dynalist.io/api/v1/file/list", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/dyspatch/dyspatch.go b/pkg/detectors/dyspatch/dyspatch.goindex df67eb624..b128c9dba 100644--- a/pkg/detectors/dyspatch/dyspatch.go+++ b/pkg/detectors/dyspatch/dyspatch.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.dyspatch.io/templates", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.dyspatch.io/templates", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/vnd.dyspatch.2020.11+json")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/eagleeyenetworks/eagleeyenetworks.go b/pkg/detectors/eagleeyenetworks/eagleeyenetworks.goindex 188b89b82..c12a15ee5 100644--- a/pkg/detectors/eagleeyenetworks/eagleeyenetworks.go+++ b/pkg/detectors/eagleeyenetworks/eagleeyenetworks.go@@ -57,7 +57,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(fmt.Sprintf(`{"username": "%s", "password": "%s"}`, resEmailPatMatch, resMatch))- req, _ := http.NewRequestWithContext(ctx, "POST", "https://login.eagleeyenetworks.com/g/aaa/authenticate", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://login.eagleeyenetworks.com/g/aaa/authenticate", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/eagleeyenetworks/eagleeyenetworks/eagleeyenetworks.go b/pkg/detectors/eagleeyenetworks/eagleeyenetworks/eagleeyenetworks.goindex 188b89b82..c12a15ee5 100644--- a/pkg/detectors/eagleeyenetworks/eagleeyenetworks/eagleeyenetworks.go+++ b/pkg/detectors/eagleeyenetworks/eagleeyenetworks/eagleeyenetworks.go@@ -57,7 +57,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(fmt.Sprintf(`{"username": "%s", "password": "%s"}`, resEmailPatMatch, resMatch))- req, _ := http.NewRequestWithContext(ctx, "POST", "https://login.eagleeyenetworks.com/g/aaa/authenticate", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://login.eagleeyenetworks.com/g/aaa/authenticate", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/easyinsight/easyinsight.go b/pkg/detectors/easyinsight/easyinsight.goindex 89c5dba0e..2a6606b45 100644--- a/pkg/detectors/easyinsight/easyinsight.go+++ b/pkg/detectors/easyinsight/easyinsight.go@@ -60,7 +60,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:%s", resIdMatch, resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://www.easy-insight.com/app/api/users.json", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://www.easy-insight.com/app/api/users.json", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Accept", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))diff --git a/pkg/detectors/edamam/edamam.go b/pkg/detectors/edamam/edamam.goindex 8411c532d..3e83e0bd6 100644--- a/pkg/detectors/edamam/edamam.go+++ b/pkg/detectors/edamam/edamam.go@@ -54,7 +54,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.edamam.com/auto-complete?app_id=%s&app_key=%s&q=%s", resId, resMatch, ""), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.edamam.com/auto-complete?app_id=%s&app_key=%s&q=%s", resId, resMatch, ""), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/edenai/edenai.go b/pkg/detectors/edenai/edenai.goindex 0555e319a..a2fa1e2bf 100644--- a/pkg/detectors/edenai/edenai.go+++ b/pkg/detectors/edenai/edenai.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.edenai.run/v1/automl/text/project", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.edenai.run/v1/automl/text/project", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/eightxeight/eightxeight.go b/pkg/detectors/eightxeight/eightxeight.goindex 9ae48e83c..53e24bd82 100644--- a/pkg/detectors/eightxeight/eightxeight.go+++ b/pkg/detectors/eightxeight/eightxeight.go@@ -61,7 +61,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resulttimeout := 10 * time.Secondclient.Timeout = timeoutpayload := strings.NewReader(`{"source":"abcde","destination":"+6512345678","text":"Hello World!","encoding":"AUTO"}`)- req, _ := http.NewRequest("POST", fmt.Sprintf("https://sms.8x8.com/api/v1/subaccounts/%s/messages", resIdMatch), payload)+ req, err := http.NewRequest("POST", fmt.Sprintf("https://sms.8x8.com/api/v1/subaccounts/%s/messages", resIdMatch), payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/elasticemail/elasticemail.go b/pkg/detectors/elasticemail/elasticemail.goindex afdabe8ac..9d9a53288 100644--- a/pkg/detectors/elasticemail/elasticemail.go+++ b/pkg/detectors/elasticemail/elasticemail.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.elasticemail.com/v2/account/profileoverview?apikey="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.elasticemail.com/v2/account/profileoverview?apikey="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err != nil {continuediff --git a/pkg/detectors/enablex/enablex.go b/pkg/detectors/enablex/enablex.goindex d0dd2b894..d0e2d5b87 100644--- a/pkg/detectors/enablex/enablex.go+++ b/pkg/detectors/enablex/enablex.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequest("GET", "https://api.enablex.io/voice/v1/call", nil)+ req, err := http.NewRequest("GET", "https://api.enablex.io/voice/v1/call", nil)+ if err != nil {+ continue+ }req.SetBasicAuth(userPatMatch, tokenPatMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/enigma/enigma.go b/pkg/detectors/enigma/enigma.goindex 4a80b1e57..85a630c19 100644--- a/pkg/detectors/enigma/enigma.go+++ b/pkg/detectors/enigma/enigma.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(`{"name":"Enigma Technologies, Inc.","person":{"first_name":"","last_name":""},"address":{"street_address1":"245 5th Ave","street_address2":"","city":"New York","state":"NY","postal_code":"10016"}}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.enigma.com/businesses/match", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api.enigma.com/businesses/match", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("x-api-key", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/ethplorer/ethplorer.go b/pkg/detectors/ethplorer/ethplorer.goindex 4b1926700..46bab8f68 100644--- a/pkg/detectors/ethplorer/ethplorer.go+++ b/pkg/detectors/ethplorer/ethplorer.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader("apiKey=" + resMatch + "&addresses=0xb2930b35844a230f00e51431acae96fe543a0347%2C0xb52d3141ee731fac89927476c6a5207b37cd72ff")- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api-mon.ethplorer.io/createPool", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api-mon.ethplorer.io/createPool", payload)+ if err != nil {+ continue+ }req.Header.Add("accept", "application/json")req.Header.Add("Content-Type", "application/x-www-form-urlencoded")res, err := client.Do(req)diff --git a/pkg/detectors/everhour/everhour.go b/pkg/detectors/everhour/everhour.goindex fbc5e5de3..ac933789e 100644--- a/pkg/detectors/everhour/everhour.go+++ b/pkg/detectors/everhour/everhour.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.everhour.com/clients", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.everhour.com/clients", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("X-Api-Key", fmt.Sprintf("%s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/exchangerateapi/exchangerateapi.go b/pkg/detectors/exchangerateapi/exchangerateapi.goindex 7cc8577df..ae6806437 100644--- a/pkg/detectors/exchangerateapi/exchangerateapi.go+++ b/pkg/detectors/exchangerateapi/exchangerateapi.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://v6.exchangerate-api.com/v6/%s/latest/USD", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://v6.exchangerate-api.com/v6/%s/latest/USD", resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/vnd.exchangerateapi+json; version=3")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/exchangeratesapi/exchangeratesapi.go b/pkg/detectors/exchangeratesapi/exchangeratesapi.goindex 88a3d9393..06564597c 100644--- a/pkg/detectors/exchangeratesapi/exchangeratesapi.go+++ b/pkg/detectors/exchangeratesapi/exchangeratesapi.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.exchangeratesapi.io/v1/latest?access_key=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.exchangeratesapi.io/v1/latest?access_key=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/facebookoauth/facebookoauth.go b/pkg/detectors/facebookoauth/facebookoauth.goindex 0991af232..970478ce6 100644--- a/pkg/detectors/facebookoauth/facebookoauth.go+++ b/pkg/detectors/facebookoauth/facebookoauth.go@@ -58,7 +58,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {// thanks https://stackoverflow.com/questions/15621471/validate-a-facebook-app-id-and-app-secret- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://graph.facebook.com/%s?fields=roles&access_token=%s|%s", apiIdRes, apiIdRes, apiSecretRes), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://graph.facebook.com/%s?fields=roles&access_token=%s|%s", apiIdRes, apiIdRes, apiSecretRes), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/faceplusplus/faceplusplus.go b/pkg/detectors/faceplusplus/faceplusplus.goindex 0f35e2962..7fd9b4317 100644--- a/pkg/detectors/faceplusplus/faceplusplus.go+++ b/pkg/detectors/faceplusplus/faceplusplus.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "POST", fmt.Sprintf("https://api-us.faceplusplus.com/facepp/v3/faceset/getfacesets?api_key=%s&api_secret=%s", resMatch, resSecret), nil)+ req, err := http.NewRequestWithContext(ctx, "POST", fmt.Sprintf("https://api-us.faceplusplus.com/facepp/v3/faceset/getfacesets?api_key=%s&api_secret=%s", resMatch, resSecret), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/fakejson/fakejson.go b/pkg/detectors/fakejson/fakejson.goindex 9ae16fb24..24b330afe 100644--- a/pkg/detectors/fakejson/fakejson.go+++ b/pkg/detectors/fakejson/fakejson.go@@ -50,7 +50,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(fmt.Sprintf(`{"token":"%s","data":{"user_name":"nameFirst","user_email":"internetEmail","_repeat":3}}`, resMatch))- req, _ := http.NewRequestWithContext(ctx, "POST", "https://app.fakejson.com/q", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://app.fakejson.com/q", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/fastforex/fastforex.go b/pkg/detectors/fastforex/fastforex.goindex 56b3caf51..2290ca546 100644--- a/pkg/detectors/fastforex/fastforex.go+++ b/pkg/detectors/fastforex/fastforex.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.fastforex.io/fetch-all?api_key=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.fastforex.io/fetch-all?api_key=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/fastlypersonaltoken/fastlypersonaltoken.go b/pkg/detectors/fastlypersonaltoken/fastlypersonaltoken.goindex ba552a2bd..a28273eee 100644--- a/pkg/detectors/fastlypersonaltoken/fastlypersonaltoken.go+++ b/pkg/detectors/fastlypersonaltoken/fastlypersonaltoken.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.fastly.com/services", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.fastly.com/services", nil)+ if err != nil {+ continue+ }req.Header.Add("Fastly-Key", fmt.Sprintf("%s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/feedier/feedier.go b/pkg/detectors/feedier/feedier.goindex 4b14d113c..6d44069bb 100644--- a/pkg/detectors/feedier/feedier.go+++ b/pkg/detectors/feedier/feedier.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.feedier.com/v1/carriers", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.feedier.com/v1/carriers", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/fetchrss/fetchrss.go b/pkg/detectors/fetchrss/fetchrss.goindex bf101a48b..5e873f41f 100644--- a/pkg/detectors/fetchrss/fetchrss.go+++ b/pkg/detectors/fetchrss/fetchrss.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://fetchrss.com/api/v1/feed/create?auth="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://fetchrss.com/api/v1/feed/create?auth="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/figmapersonalaccesstoken/figmapersonalaccesstoken.go b/pkg/detectors/figmapersonalaccesstoken/figmapersonalaccesstoken.goindex a378d73e6..7d354d4c7 100644--- a/pkg/detectors/figmapersonalaccesstoken/figmapersonalaccesstoken.go+++ b/pkg/detectors/figmapersonalaccesstoken/figmapersonalaccesstoken.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.figma.com/v1/me", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.figma.com/v1/me", nil)+ if err != nil {+ continue+ }req.Header.Add("X-Figma-Token", fmt.Sprintf("%s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/fileio/fileio.go b/pkg/detectors/fileio/fileio.goindex b3b107498..e138042f0 100644--- a/pkg/detectors/fileio/fileio.go+++ b/pkg/detectors/fileio/fileio.go@@ -50,7 +50,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://file.io/", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://file.io/", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/finage/finage.go b/pkg/detectors/finage/finage.goindex 09bf2b3f5..a3193d823 100644--- a/pkg/detectors/finage/finage.go+++ b/pkg/detectors/finage/finage.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.finage.co.uk/symbol-list/crypto?apikey=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.finage.co.uk/symbol-list/crypto?apikey=%s", resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/financialmodelingprep/financialmodelingprep.go b/pkg/detectors/financialmodelingprep/financialmodelingprep.goindex 597835b2f..4dacb3b79 100644--- a/pkg/detectors/financialmodelingprep/financialmodelingprep.go+++ b/pkg/detectors/financialmodelingprep/financialmodelingprep.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://financialmodelingprep.com/api/v3/financial-statement-symbol-lists?apikey=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://financialmodelingprep.com/api/v3/financial-statement-symbol-lists?apikey=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {bodyBytes, err := ioutil.ReadAll(res.Body)diff --git a/pkg/detectors/findl/findl.go b/pkg/detectors/findl/findl.goindex d6346cd0b..df82d8778 100644--- a/pkg/detectors/findl/findl.go+++ b/pkg/detectors/findl/findl.go@@ -50,7 +50,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 5 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.findl.com/v1.0/query?limit=6", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.findl.com/v1.0/query?limit=6", nil)+ if err != nil {+ continue+ }req.Header.Add("X-API-Key", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/findl/findl/findl.go b/pkg/detectors/findl/findl/findl.goindex d6346cd0b..df82d8778 100644--- a/pkg/detectors/findl/findl/findl.go+++ b/pkg/detectors/findl/findl/findl.go@@ -50,7 +50,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 5 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.findl.com/v1.0/query?limit=6", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.findl.com/v1.0/query?limit=6", nil)+ if err != nil {+ continue+ }req.Header.Add("X-API-Key", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/finnhub/finnhub.go b/pkg/detectors/finnhub/finnhub.goindex 852262d3a..8ce89b32f 100644--- a/pkg/detectors/finnhub/finnhub.go+++ b/pkg/detectors/finnhub/finnhub.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://finnhub.io/api/v1/calendar/economic?token=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://finnhub.io/api/v1/calendar/economic?token=%s", resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/fixerio/fixerio.go b/pkg/detectors/fixerio/fixerio.goindex 366e89d2d..fb3c30d8a 100644--- a/pkg/detectors/fixerio/fixerio.go+++ b/pkg/detectors/fixerio/fixerio.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://data.fixer.io/api/latest?access_key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://data.fixer.io/api/latest?access_key="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/flatio/flatio.go b/pkg/detectors/flatio/flatio.goindex f99add812..f147cacbc 100644--- a/pkg/detectors/flatio/flatio.go+++ b/pkg/detectors/flatio/flatio.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.flat.io/v2/me", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.flat.io/v2/me", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/fleetbase/fleetbase.go b/pkg/detectors/fleetbase/fleetbase.goindex f58accc78..f244acea0 100644--- a/pkg/detectors/fleetbase/fleetbase.go+++ b/pkg/detectors/fleetbase/fleetbase.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.fleetbase.io/v1/contacts/", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.fleetbase.io/v1/contacts/", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/flickr/flickr.go b/pkg/detectors/flickr/flickr.goindex d51f92215..5abc59bd4 100644--- a/pkg/detectors/flickr/flickr.go+++ b/pkg/detectors/flickr/flickr.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://www.flickr.com/services/rest/?method=flickr.tags.getHotList&api_key=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://www.flickr.com/services/rest/?method=flickr.tags.getHotList&api_key=%s", resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/flightapi/flightapi.go b/pkg/detectors/flightapi/flightapi.goindex ee7cf806d..3bf709dcb 100644--- a/pkg/detectors/flightapi/flightapi.go+++ b/pkg/detectors/flightapi/flightapi.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.flightapi.io/iata/%s/london/airport", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.flightapi.io/iata/%s/london/airport", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/flightstats/flightstats.go b/pkg/detectors/flightstats/flightstats.goindex 34b20b014..5265d1e93 100644--- a/pkg/detectors/flightstats/flightstats.go+++ b/pkg/detectors/flightstats/flightstats.go@@ -57,7 +57,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequest("GET", fmt.Sprintf("https://api.flightstats.com/flex/aircraft/rest/v1/json/availableFields?appId=%s&appKey=%s", resId, resMatch), nil)+ req, err := http.NewRequest("GET", fmt.Sprintf("https://api.flightstats.com/flex/aircraft/rest/v1/json/availableFields?appId=%s&appKey=%s", resId, resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/float/float.go b/pkg/detectors/float/float.goindex 72a551647..ecfdfc105 100644--- a/pkg/detectors/float/float.go+++ b/pkg/detectors/float/float.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.float.com/v3/people", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.float.com/v3/people", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/flowflu/flowflu.go b/pkg/detectors/flowflu/flowflu.goindex fd3b7afeb..09716fabf 100644--- a/pkg/detectors/flowflu/flowflu.go+++ b/pkg/detectors/flowflu/flowflu.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://secretscanner.flowlu.com/api/v1/module/crm/lead/list?api_key=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://secretscanner.flowlu.com/api/v1/module/crm/lead/list?api_key=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {bodyBytes, err := ioutil.ReadAll(res.Body)diff --git a/pkg/detectors/flutterwave/flutterwave.go b/pkg/detectors/flutterwave/flutterwave.goindex b68d0f50a..a8fd74d11 100644--- a/pkg/detectors/flutterwave/flutterwave.go+++ b/pkg/detectors/flutterwave/flutterwave.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.flutterwave.com/v3/subaccounts", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.flutterwave.com/v3/subaccounts", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/fmfw/fmfw.go b/pkg/detectors/fmfw/fmfw.goindex 6205f7a55..16dc18ab3 100644--- a/pkg/detectors/fmfw/fmfw.go+++ b/pkg/detectors/fmfw/fmfw.go@@ -59,7 +59,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 10 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.fmfw.io/api/3/spot/balance", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.fmfw.io/api/3/spot/balance", nil)+ if err != nil {+ continue+ }req.SetBasicAuth(userPatMatch, tokenPatMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/fmfw/fmfw/fmfw.go b/pkg/detectors/fmfw/fmfw/fmfw.goindex 6205f7a55..16dc18ab3 100644--- a/pkg/detectors/fmfw/fmfw/fmfw.go+++ b/pkg/detectors/fmfw/fmfw/fmfw.go@@ -59,7 +59,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 10 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.fmfw.io/api/3/spot/balance", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.fmfw.io/api/3/spot/balance", nil)+ if err != nil {+ continue+ }req.SetBasicAuth(userPatMatch, tokenPatMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/formbucket/formbucket.go b/pkg/detectors/formbucket/formbucket.goindex 46934057d..158d9ce0d 100644--- a/pkg/detectors/formbucket/formbucket.go+++ b/pkg/detectors/formbucket/formbucket.go@@ -50,7 +50,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://www.formbucket.com/v1/profile", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://www.formbucket.com/v1/profile", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/formio/formio.go b/pkg/detectors/formio/formio.goindex 0cec627b9..2f3945611 100644--- a/pkg/detectors/formio/formio.go+++ b/pkg/detectors/formio/formio.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://formio.form.io/current", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://formio.form.io/current", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("x-jwt-token", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/foursquare/foursquare.go b/pkg/detectors/foursquare/foursquare.goindex bcb0993ce..7970ce076 100644--- a/pkg/detectors/foursquare/foursquare.go+++ b/pkg/detectors/foursquare/foursquare.go@@ -54,7 +54,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.foursquare.com/v2/venues/trending?client_id=%s&client_secret=%s&v=20211019&near=LA", resMatch, resSecret), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.foursquare.com/v2/venues/trending?client_id=%s&client_secret=%s&v=20211019&near=LA", resMatch, resSecret), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/frameio/frameio.go b/pkg/detectors/frameio/frameio.goindex 1c0a252a6..c9a64a6eb 100644--- a/pkg/detectors/frameio/frameio.go+++ b/pkg/detectors/frameio/frameio.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.frame.io/v2/me", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.frame.io/v2/me", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/freshbooks/freshbooks.go b/pkg/detectors/freshbooks/freshbooks.goindex 71853fa0e..48c8598fc 100644--- a/pkg/detectors/freshbooks/freshbooks.go+++ b/pkg/detectors/freshbooks/freshbooks.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf(`https://auth.freshbooks.com/oauth/authorize?client_id=%s&redirect_uri=%s&response_type=code`, resMatch, resURI), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf(`https://auth.freshbooks.com/oauth/authorize?client_id=%s&redirect_uri=%s&response_type=code`, resMatch, resURI), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/freshdesk/freshdesk.go b/pkg/detectors/freshdesk/freshdesk.goindex 3c993bfe0..c991cd25c 100644--- a/pkg/detectors/freshdesk/freshdesk.go+++ b/pkg/detectors/freshdesk/freshdesk.go@@ -58,7 +58,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:X", resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s/api/v2/tickets", resURL), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s/api/v2/tickets", resURL), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)diff --git a/pkg/detectors/freshdesk/freshdesk/freshdesk.go b/pkg/detectors/freshdesk/freshdesk/freshdesk.goindex 3c993bfe0..c991cd25c 100644--- a/pkg/detectors/freshdesk/freshdesk/freshdesk.go+++ b/pkg/detectors/freshdesk/freshdesk/freshdesk.go@@ -58,7 +58,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:X", resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s/api/v2/tickets", resURL), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s/api/v2/tickets", resURL), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)diff --git a/pkg/detectors/front/front.go b/pkg/detectors/front/front.goindex 7ac30f8f4..bf9c03e34 100644--- a/pkg/detectors/front/front.go+++ b/pkg/detectors/front/front.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api2.frontapp.com/accounts", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api2.frontapp.com/accounts", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/fulcrum/fulcrum.go b/pkg/detectors/fulcrum/fulcrum.goindex 5ab33779a..e5fad496a 100644--- a/pkg/detectors/fulcrum/fulcrum.go+++ b/pkg/detectors/fulcrum/fulcrum.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.fulcrumapp.com/api/v2/forms.json", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.fulcrumapp.com/api/v2/forms.json", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("X-ApiToken", fmt.Sprintf("%s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/fullstory/fullstory.go b/pkg/detectors/fullstory/fullstory.goindex 4489fcda2..3f42c0f92 100644--- a/pkg/detectors/fullstory/fullstory.go+++ b/pkg/detectors/fullstory/fullstory.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.fullstory.com/operations/v1", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.fullstory.com/operations/v1", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/fusebill/fusebill.go b/pkg/detectors/fusebill/fusebill.goindex 793700b6c..3b95432bd 100644--- a/pkg/detectors/fusebill/fusebill.go+++ b/pkg/detectors/fusebill/fusebill.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://secure.fusebill.com/v1/customers?pageSize=100&pageNumber=0", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://secure.fusebill.com/v1/customers?pageSize=100&pageNumber=0", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/fusebill/fusebill/fusebill.go b/pkg/detectors/fusebill/fusebill/fusebill.goindex 793700b6c..3b95432bd 100644--- a/pkg/detectors/fusebill/fusebill/fusebill.go+++ b/pkg/detectors/fusebill/fusebill/fusebill.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://secure.fusebill.com/v1/customers?pageSize=100&pageNumber=0", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://secure.fusebill.com/v1/customers?pageSize=100&pageNumber=0", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/fxmarket/fxmarket.go b/pkg/detectors/fxmarket/fxmarket.goindex 319e42034..b7cbebfe1 100644--- a/pkg/detectors/fxmarket/fxmarket.go+++ b/pkg/detectors/fxmarket/fxmarket.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://fxmarketapi.com/apilive?api_key=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://fxmarketapi.com/apilive?api_key=%s", resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/geckoboard/geckoboard.go b/pkg/detectors/geckoboard/geckoboard.goindex bcf0f77bb..956228e42 100644--- a/pkg/detectors/geckoboard/geckoboard.go+++ b/pkg/detectors/geckoboard/geckoboard.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.geckoboard.com/", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.geckoboard.com/", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/geckoboard/geckoboard/geckoboard.go b/pkg/detectors/geckoboard/geckoboard/geckoboard.goindex bcf0f77bb..956228e42 100644--- a/pkg/detectors/geckoboard/geckoboard/geckoboard.go+++ b/pkg/detectors/geckoboard/geckoboard/geckoboard.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.geckoboard.com/", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.geckoboard.com/", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/gengo/gengo.go b/pkg/detectors/gengo/gengo.goindex 31e44bf76..440641953 100644--- a/pkg/detectors/gengo/gengo.go+++ b/pkg/detectors/gengo/gengo.go@@ -68,7 +68,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resulttimestamp := strconv.FormatInt(time.Now().Unix(), 10)signature := getGengoSignature(timestamp, resSecretMatch)- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.gengo.com/v2/account/me?ts=%s&api_key=%s&api_sig=%s", timestamp, resMatch, signature), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.gengo.com/v2/account/me?ts=%s&api_key=%s&api_sig=%s", timestamp, resMatch, signature), nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/geoapify/geoapify.go b/pkg/detectors/geoapify/geoapify.goindex fde08e3e4..317e25748 100644--- a/pkg/detectors/geoapify/geoapify.go+++ b/pkg/detectors/geoapify/geoapify.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.geoapify.com/v1/geocode/search?text=California&apiKey=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.geoapify.com/v1/geocode/search?text=California&apiKey=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/geocode/geocode.go b/pkg/detectors/geocode/geocode.goindex 229eabbfa..6cd19e312 100644--- a/pkg/detectors/geocode/geocode.go+++ b/pkg/detectors/geocode/geocode.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://geocode.xyz/51.4647,0.0079?json=1&auth=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://geocode.xyz/51.4647,0.0079?json=1&auth=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {bodyBytes, err := ioutil.ReadAll(res.Body)diff --git a/pkg/detectors/geocodify/geocodify.go b/pkg/detectors/geocodify/geocodify.goindex e039c094c..dd45c6026 100644--- a/pkg/detectors/geocodify/geocodify.go+++ b/pkg/detectors/geocodify/geocodify.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.geocodify.com/v2/geocode?api_key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.geocodify.com/v2/geocode?api_key="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/geocodio/geocodio.go b/pkg/detectors/geocodio/geocodio.goindex 675f4c3e0..24853fa8a 100644--- a/pkg/detectors/geocodio/geocodio.go+++ b/pkg/detectors/geocodio/geocodio.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.geocod.io/v1.6/geocode?q=%s&api_key=%s", resSearchMatch, resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.geocod.io/v1.6/geocode?q=%s&api_key=%s", resSearchMatch, resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/geoipifi/geoipifi.go b/pkg/detectors/geoipifi/geoipifi.goindex 5b7bb15e8..031c24795 100644--- a/pkg/detectors/geoipifi/geoipifi.go+++ b/pkg/detectors/geoipifi/geoipifi.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://geo.ipify.org/api/v2/country?apiKey="+resMatch+"&ipAddress=8.8.8.8", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://geo.ipify.org/api/v2/country?apiKey="+resMatch+"&ipAddress=8.8.8.8", nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/getemail/getemail.go b/pkg/detectors/getemail/getemail.goindex a97c689f0..e191772c2 100644--- a/pkg/detectors/getemail/getemail.go+++ b/pkg/detectors/getemail/getemail.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.getemail.io/v1/find-mail?firstname=Larry&lastname=Page&domain=google.com&api_key=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.getemail.io/v1/find-mail?firstname=Larry&lastname=Page&domain=google.com&api_key=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {bodyBytes, err := ioutil.ReadAll(res.Body)diff --git a/pkg/detectors/getemails/getemails.go b/pkg/detectors/getemails/getemails.goindex fd991b1e9..d753b9c6e 100644--- a/pkg/detectors/getemails/getemails.go+++ b/pkg/detectors/getemails/getemails.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.getemails.com/api/v1/contacts", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.getemails.com/api/v1/contacts", nil)+ if err != nil {+ continue+ }req.Header.Add("api-key", resMatch)req.Header.Add("api-id", resIdMatch)diff --git a/pkg/detectors/getgeoapi/getgeoapi.go b/pkg/detectors/getgeoapi/getgeoapi.goindex bc15ec279..dae3c93af 100644--- a/pkg/detectors/getgeoapi/getgeoapi.go+++ b/pkg/detectors/getgeoapi/getgeoapi.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.getgeoapi.com/v2/currency/list?api_key=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.getgeoapi.com/v2/currency/list?api_key=%s", resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/getgist/getgist.go b/pkg/detectors/getgist/getgist.goindex bece4398e..8cf3e6a0d 100644--- a/pkg/detectors/getgist/getgist.go+++ b/pkg/detectors/getgist/getgist.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.getgist.com/contacts/", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.getgist.com/contacts/", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/getsandbox/getsandbox.go b/pkg/detectors/getsandbox/getsandbox.goindex 4ec3808d0..fbc57613b 100644--- a/pkg/detectors/getsandbox/getsandbox.go+++ b/pkg/detectors/getsandbox/getsandbox.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://getsandbox.com/api/1/sandboxes/%s", resIdMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://getsandbox.com/api/1/sandboxes/%s", resIdMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("API-Key", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/getsandbox/getsandbox/getsandbox.go b/pkg/detectors/getsandbox/getsandbox/getsandbox.goindex 4ec3808d0..fbc57613b 100644--- a/pkg/detectors/getsandbox/getsandbox/getsandbox.go+++ b/pkg/detectors/getsandbox/getsandbox/getsandbox.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://getsandbox.com/api/1/sandboxes/%s", resIdMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://getsandbox.com/api/1/sandboxes/%s", resIdMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("API-Key", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/github/github.go b/pkg/detectors/github/github.goindex 76a224152..f033dfc7f 100644--- a/pkg/detectors/github/github.go+++ b/pkg/detectors/github/github.go@@ -66,7 +66,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {client := common.SaneHttpClient()// https://developer.github.com/v3/users/#get-the-authenticated-user- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.github.com/user", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.github.com/user", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json; charset=utf-8")req.Header.Add("Authorization", fmt.Sprintf("token %s", token))res, err := client.Do(req)diff --git a/pkg/detectors/github_old/github_old.go b/pkg/detectors/github_old/github_old.goindex b93c7139f..f3ec34bc7 100644--- a/pkg/detectors/github_old/github_old.go+++ b/pkg/detectors/github_old/github_old.go@@ -68,7 +68,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {client := common.SaneHttpClient()// https://developer.github.com/v3/users/#get-the-authenticated-user- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.github.com/user", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.github.com/user", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json; charset=utf-8")req.Header.Add("Authorization", fmt.Sprintf("token %s", token))res, err := client.Do(req)diff --git a/pkg/detectors/githubapp/githubapp.go b/pkg/detectors/githubapp/githubapp.goindex 9fb75ec28..a2d56949b 100644--- a/pkg/detectors/githubapp/githubapp.go+++ b/pkg/detectors/githubapp/githubapp.go@@ -79,7 +79,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}//end get token- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.github.com/app", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.github.com/app", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/vnd.github.v3+json")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", tokenString))res, err := client.Do(req)diff --git a/pkg/detectors/gitlab/gitlab.go b/pkg/detectors/gitlab/gitlab.goindex bba759715..3e3cb75d6 100644--- a/pkg/detectors/gitlab/gitlab.go+++ b/pkg/detectors/gitlab/gitlab.go@@ -53,7 +53,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultclient := common.SaneHttpClient()// test `read_user` scope- req, _ := http.NewRequestWithContext(ctx, "GET", baseURL+"/user", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", baseURL+"/user", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", match[1]))res, err := client.Do(req)if err != nil {diff --git a/pkg/detectors/gitlabv2/gitlab.go b/pkg/detectors/gitlabv2/gitlab.goindex 7f07bd6c1..2549ad6df 100644--- a/pkg/detectors/gitlabv2/gitlab.go+++ b/pkg/detectors/gitlabv2/gitlab.go@@ -53,7 +53,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultclient := common.SaneHttpClient()// test `read_user` scope- req, _ := http.NewRequestWithContext(ctx, "GET", baseURL+"/user", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", baseURL+"/user", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", match[1]))res, err := client.Do(req)if err != nil {diff --git a/pkg/detectors/gitter/gitter.go b/pkg/detectors/gitter/gitter.goindex 99ca83598..b038c76ab 100644--- a/pkg/detectors/gitter/gitter.go+++ b/pkg/detectors/gitter/gitter.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.gitter.im/v1/user/me", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.gitter.im/v1/user/me", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/glassnode/glassnode.go b/pkg/detectors/glassnode/glassnode.goindex a8e4a0859..59f810a14 100644--- a/pkg/detectors/glassnode/glassnode.go+++ b/pkg/detectors/glassnode/glassnode.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.glassnode.com/v1/metrics/indicators/sopr?a=btc&api_key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.glassnode.com/v1/metrics/indicators/sopr?a=btc&api_key="+resMatch, nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/gocanvas/gocanvas.go b/pkg/detectors/gocanvas/gocanvas.goindex 88a98a7d7..b2adc568b 100644--- a/pkg/detectors/gocanvas/gocanvas.go+++ b/pkg/detectors/gocanvas/gocanvas.go@@ -63,7 +63,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultpayload := url.Values{}payload.Add("username", resEmailMatch)- req, _ := http.NewRequest("GET", "https://www.gocanvas.com/apiv2/forms.xml", strings.NewReader(payload.Encode()))+ req, err := http.NewRequest("GET", "https://www.gocanvas.com/apiv2/forms.xml", strings.NewReader(payload.Encode()))+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/x-www-form-urlencoded")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/gocardless/gocardless.go b/pkg/detectors/gocardless/gocardless.goindex 14333a77e..40032fd51 100644--- a/pkg/detectors/gocardless/gocardless.go+++ b/pkg/detectors/gocardless/gocardless.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.gocardless.com/customers/", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.gocardless.com/customers/", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))req.Header.Add("GoCardless-Version", "2015-07-06")diff --git a/pkg/detectors/goodday/goodday.go b/pkg/detectors/goodday/goodday.goindex bb65677e4..4cfe0d435 100644--- a/pkg/detectors/goodday/goodday.go+++ b/pkg/detectors/goodday/goodday.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.goodday.work/2.0/users", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.goodday.work/2.0/users", nil)+ if err != nil {+ continue+ }req.Header.Add("gd-api-token", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/goodday/goodday/goodday.go b/pkg/detectors/goodday/goodday/goodday.goindex bb65677e4..4cfe0d435 100644--- a/pkg/detectors/goodday/goodday/goodday.go+++ b/pkg/detectors/goodday/goodday/goodday.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.goodday.work/2.0/users", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.goodday.work/2.0/users", nil)+ if err != nil {+ continue+ }req.Header.Add("gd-api-token", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/graphcms/graphcms.go b/pkg/detectors/graphcms/graphcms.goindex 1664d907b..d72020389 100644--- a/pkg/detectors/graphcms/graphcms.go+++ b/pkg/detectors/graphcms/graphcms.go@@ -58,7 +58,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(`{users {id name}}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api-ap-northeast-1.graphcms.com/v2/"+resIdMatch+"/master", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api-ap-northeast-1.graphcms.com/v2/"+resIdMatch+"/master", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/graphql")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))diff --git a/pkg/detectors/graphhopper/graphhopper.go b/pkg/detectors/graphhopper/graphhopper.goindex 5d25dc7ef..b726ba02b 100644--- a/pkg/detectors/graphhopper/graphhopper.go+++ b/pkg/detectors/graphhopper/graphhopper.go@@ -44,7 +44,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultRaw: []byte(resMatch),}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://graphhopper.com/api/1/geocode?q=Philippines&key=%s&type=json", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://graphhopper.com/api/1/geocode?q=Philippines&key=%s&type=json", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/groovehq/groovehq.go b/pkg/detectors/groovehq/groovehq.goindex 222257092..60fde9ee2 100644--- a/pkg/detectors/groovehq/groovehq.go+++ b/pkg/detectors/groovehq/groovehq.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.groovehq.com/v1/me", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.groovehq.com/v1/me", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/guardianapi/guardianapi.go b/pkg/detectors/guardianapi/guardianapi.goindex ab462f2d9..839ca446f 100644--- a/pkg/detectors/guardianapi/guardianapi.go+++ b/pkg/detectors/guardianapi/guardianapi.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://content.guardianapis.com/search?api-key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://content.guardianapis.com/search?api-key="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/guru/guru.go b/pkg/detectors/guru/guru.goindex 395d66268..db26772be 100644--- a/pkg/detectors/guru/guru.go+++ b/pkg/detectors/guru/guru.go@@ -62,7 +62,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultdata := fmt.Sprintf("%s:%s", unameMatch, keyMatch)encoded := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.getguru.com/api/v1/teams/teamId/stats", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.getguru.com/api/v1/teams/teamId/stats", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", encoded))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/gyazo/gyazo.go b/pkg/detectors/gyazo/gyazo.goindex 6538fb8c8..f97a33b56 100644--- a/pkg/detectors/gyazo/gyazo.go+++ b/pkg/detectors/gyazo/gyazo.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.gyazo.com/api/images?access_token="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.gyazo.com/api/images?access_token="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/happi/happi.go b/pkg/detectors/happi/happi.goindex 7dd24ef3d..3c21b0090 100644--- a/pkg/detectors/happi/happi.go+++ b/pkg/detectors/happi/happi.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.happi.dev/v1/exchange", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.happi.dev/v1/exchange", nil)+ if err != nil {+ continue+ }req.Header.Add("x-happi-key", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/happi/happi/happi.go b/pkg/detectors/happi/happi/happi.goindex 7dd24ef3d..3c21b0090 100644--- a/pkg/detectors/happi/happi/happi.go+++ b/pkg/detectors/happi/happi/happi.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.happi.dev/v1/exchange", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.happi.dev/v1/exchange", nil)+ if err != nil {+ continue+ }req.Header.Add("x-happi-key", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/happyscribe/happyscribe.go b/pkg/detectors/happyscribe/happyscribe.goindex 191707f52..3c6f0b8c2 100644--- a/pkg/detectors/happyscribe/happyscribe.go+++ b/pkg/detectors/happyscribe/happyscribe.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://www.happyscribe.com/api/v1/transcriptions", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://www.happyscribe.com/api/v1/transcriptions", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/harvest/harvest.go b/pkg/detectors/harvest/harvest.goindex 185413b1d..6be607677 100644--- a/pkg/detectors/harvest/harvest.go+++ b/pkg/detectors/harvest/harvest.go@@ -54,7 +54,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.harvestapp.com/v2/users/me?access_token="+resMatch+"&account_id="+resIdMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.harvestapp.com/v2/users/me?access_token="+resMatch+"&account_id="+resIdMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/hellosign/hellosign.go b/pkg/detectors/hellosign/hellosign.goindex dcf3a2f74..2cc9d2937 100644--- a/pkg/detectors/hellosign/hellosign.go+++ b/pkg/detectors/hellosign/hellosign.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.hellosign.com/v3/account", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.hellosign.com/v3/account", nil)+ if err != nil {+ continue+ }req.SetBasicAuth(resMatch, "")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/helpcrunch/helpcrunch.go b/pkg/detectors/helpcrunch/helpcrunch.goindex 09217ddae..33f25f5f6 100644--- a/pkg/detectors/helpcrunch/helpcrunch.go+++ b/pkg/detectors/helpcrunch/helpcrunch.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.helpcrunch.com/v1/departments", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.helpcrunch.com/v1/departments", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/helpscout/helpscout.go b/pkg/detectors/helpscout/helpscout.goindex 4c1f9dfca..c05744bb0 100644--- a/pkg/detectors/helpscout/helpscout.go+++ b/pkg/detectors/helpscout/helpscout.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://docsapi.helpscout.net/v1/collections", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://docsapi.helpscout.net/v1/collections", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/hereapi/hereapi.go b/pkg/detectors/hereapi/hereapi.goindex cc46a7860..8dd9c6ab3 100644--- a/pkg/detectors/hereapi/hereapi.go+++ b/pkg/detectors/hereapi/hereapi.go@@ -46,7 +46,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://weather.ls.hereapi.com/weather/1.0/report.json?product=alerts&name=Argentina&apiKey=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://weather.ls.hereapi.com/weather/1.0/report.json?product=alerts&name=Argentina&apiKey=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/heroku/heroku.go b/pkg/detectors/heroku/heroku.goindex 3f5595859..97dbaa27e 100644--- a/pkg/detectors/heroku/heroku.go+++ b/pkg/detectors/heroku/heroku.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.heroku.com/apps", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.heroku.com/apps", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/vnd.heroku+json; version=3")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/hive/hive.go b/pkg/detectors/hive/hive.goindex 750ec1751..1c59c8d71 100644--- a/pkg/detectors/hive/hive.go+++ b/pkg/detectors/hive/hive.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.hive.com/api/v1/testcredentials?user_id="+idMatch+"&api_key="+keyMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://app.hive.com/api/v1/testcredentials?user_id="+idMatch+"&api_key="+keyMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/hiveage/hiveage.go b/pkg/detectors/hiveage/hiveage.goindex 6f1feb8c2..8433fb720 100644--- a/pkg/detectors/hiveage/hiveage.go+++ b/pkg/detectors/hiveage/hiveage.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:", resMatch)encoded := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://mltb8350.hiveage.com/api/network", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://mltb8350.hiveage.com/api/network", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", encoded))res, err := client.Do(req)diff --git a/pkg/detectors/holidayapi/holidayapi.go b/pkg/detectors/holidayapi/holidayapi.goindex 58d1ba1e5..06162aba2 100644--- a/pkg/detectors/holidayapi/holidayapi.go+++ b/pkg/detectors/holidayapi/holidayapi.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://holidayapi.com/v1/holidays?key=%s&country=PH&year=2020", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://holidayapi.com/v1/holidays?key=%s&country=PH&year=2020", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/host/host.go b/pkg/detectors/host/host.goindex 5a050881f..9b66348d4 100644--- a/pkg/detectors/host/host.go+++ b/pkg/detectors/host/host.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://host.io/api/domains/ip/8.8.8.8?token=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://host.io/api/domains/ip/8.8.8.8?token=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/hubspotapikey/hubspotapikey.go b/pkg/detectors/hubspotapikey/hubspotapikey.goindex 64690bf0e..d91f4245c 100644--- a/pkg/detectors/hubspotapikey/hubspotapikey.go+++ b/pkg/detectors/hubspotapikey/hubspotapikey.go@@ -46,7 +46,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.hubapi.com/contacts/v1/lists?hapikey="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.hubapi.com/contacts/v1/lists?hapikey="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/humanity/humanity.go b/pkg/detectors/humanity/humanity.goindex 5dd7e2dea..0beb35545 100644--- a/pkg/detectors/humanity/humanity.go+++ b/pkg/detectors/humanity/humanity.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://www.humanity.com/api/v2/me?access_token="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://www.humanity.com/api/v2/me?access_token="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/hunter/hunter.go b/pkg/detectors/hunter/hunter.goindex a05ca94cd..b971f6749 100644--- a/pkg/detectors/hunter/hunter.go+++ b/pkg/detectors/hunter/hunter.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.hunter.io/v2/leads_lists?api_key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.hunter.io/v2/leads_lists?api_key="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/hypertrack/hypertrack.go b/pkg/detectors/hypertrack/hypertrack.goindex 60e5eac7b..8464d63e9 100644--- a/pkg/detectors/hypertrack/hypertrack.go+++ b/pkg/detectors/hypertrack/hypertrack.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://v3.api.hypertrack.com/trips/", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://v3.api.hypertrack.com/trips/", nil)+ if err != nil {+ continue+ }req.SetBasicAuth(resAccMatch, resMatch)req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)diff --git a/pkg/detectors/ibmclouduserkey/ibmclouduserkey.go b/pkg/detectors/ibmclouduserkey/ibmclouduserkey.goindex 1c8699a81..3aa1aaa81 100644--- a/pkg/detectors/ibmclouduserkey/ibmclouduserkey.go+++ b/pkg/detectors/ibmclouduserkey/ibmclouduserkey.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(`apikey=` + resMatch + `&grant_type=urn%3Aibm%3Aparams%3Aoauth%3Agrant-type%3Aapikey`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://iam.ng.bluemix.net/identity/token", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://iam.ng.bluemix.net/identity/token", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/x-www-form-urlencoded")req.Header.Add("Authorization", "Basic Yng6Yng=")res, err := client.Do(req)diff --git a/pkg/detectors/iconfinder/iconfinder.go b/pkg/detectors/iconfinder/iconfinder.goindex 4190711a7..36f8b6c22 100644--- a/pkg/detectors/iconfinder/iconfinder.go+++ b/pkg/detectors/iconfinder/iconfinder.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.iconfinder.com/v4/iconsets", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.iconfinder.com/v4/iconsets", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/iexcloud/iexcloud.go b/pkg/detectors/iexcloud/iexcloud.goindex 020aa204c..4e8048677 100644--- a/pkg/detectors/iexcloud/iexcloud.go+++ b/pkg/detectors/iexcloud/iexcloud.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://cloud.iexapis.com/v1/stock/aapl/quote?token=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://cloud.iexapis.com/v1/stock/aapl/quote?token=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/imagekit/imagekit.go b/pkg/detectors/imagekit/imagekit.goindex b13bdb2f0..9c267fb52 100644--- a/pkg/detectors/imagekit/imagekit.go+++ b/pkg/detectors/imagekit/imagekit.go@@ -46,7 +46,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultRaw: []byte(resMatch),}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.imagekit.io/v1/files", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.imagekit.io/v1/files", nil)+ if err != nil {+ continue+ }req.SetBasicAuth(resMatch, "")res, err := client.Do(req)diff --git a/pkg/detectors/imagga/imagga.go b/pkg/detectors/imagga/imagga.goindex 381ee5f13..7b91ffdc0 100644--- a/pkg/detectors/imagga/imagga.go+++ b/pkg/detectors/imagga/imagga.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.imagga.com/v2/usage", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.imagga.com/v2/usage", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/impala/impala.go b/pkg/detectors/impala/impala.goindex f06be2161..21d310f1c 100644--- a/pkg/detectors/impala/impala.go+++ b/pkg/detectors/impala/impala.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://sandbox.impala.travel/v1/bookings", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://sandbox.impala.travel/v1/bookings", nil)+ if err != nil {+ continue+ }req.Header.Add("x-api-key", fmt.Sprintf("%s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/insightly/insightly.go b/pkg/detectors/insightly/insightly.goindex 5c5f581ed..7002ea581 100644--- a/pkg/detectors/insightly/insightly.go+++ b/pkg/detectors/insightly/insightly.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.na1.insightly.com/v3.1/Contacts?top=2", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.na1.insightly.com/v3.1/Contacts?top=2", nil)+ if err != nil {+ continue+ }req.SetBasicAuth(resMatch, "")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/integromat/integromat.go b/pkg/detectors/integromat/integromat.goindex 0cab8924c..b31980709 100644--- a/pkg/detectors/integromat/integromat.go+++ b/pkg/detectors/integromat/integromat.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.integromat.com/v1/whoami", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.integromat.com/v1/whoami", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Token %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/intercom/intercom.go b/pkg/detectors/intercom/intercom.goindex 24fd279eb..d2d49df0c 100644--- a/pkg/detectors/intercom/intercom.go+++ b/pkg/detectors/intercom/intercom.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.intercom.io/contacts?per_page=5", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.intercom.io/contacts?per_page=5", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", "Bearer "+resMatch)req.Header.Add("Accept", "application/json")diff --git a/pkg/detectors/intrinio/intrinio.go b/pkg/detectors/intrinio/intrinio.goindex c44c301c5..444430459 100644--- a/pkg/detectors/intrinio/intrinio.go+++ b/pkg/detectors/intrinio/intrinio.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api-v2.intrinio.com/securities?api_key=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api-v2.intrinio.com/securities?api_key=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/invoiceocean/invoiceocean.go b/pkg/detectors/invoiceocean/invoiceocean.goindex 7c7913c1b..a6efb6208 100644--- a/pkg/detectors/invoiceocean/invoiceocean.go+++ b/pkg/detectors/invoiceocean/invoiceocean.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s/invoices.json?period=this_month&api_token=%s", resURL, resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s/invoices.json?period=this_month&api_token=%s", resURL, resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/invoiceocean/invoiceocean/invoiceocean.go b/pkg/detectors/invoiceocean/invoiceocean/invoiceocean.goindex 7c7913c1b..a6efb6208 100644--- a/pkg/detectors/invoiceocean/invoiceocean/invoiceocean.go+++ b/pkg/detectors/invoiceocean/invoiceocean/invoiceocean.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s/invoices.json?period=this_month&api_token=%s", resURL, resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s/invoices.json?period=this_month&api_token=%s", resURL, resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/ipapi/ipapi.go b/pkg/detectors/ipapi/ipapi.goindex 334639d6d..aad5143a8 100644--- a/pkg/detectors/ipapi/ipapi.go+++ b/pkg/detectors/ipapi/ipapi.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.ipapi.com/49.146.239.251?access_key=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.ipapi.com/49.146.239.251?access_key=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {bodyBytes, err := ioutil.ReadAll(res.Body)diff --git a/pkg/detectors/ipgeolocation/ipgeolocation.go b/pkg/detectors/ipgeolocation/ipgeolocation.goindex f5c6213d2..df6ab5df7 100644--- a/pkg/detectors/ipgeolocation/ipgeolocation.go+++ b/pkg/detectors/ipgeolocation/ipgeolocation.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.ipgeolocation.io/ipgeo?apiKey=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.ipgeolocation.io/ipgeo?apiKey=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/ipify/ipify.go b/pkg/detectors/ipify/ipify.goindex 3221085af..568f4432a 100644--- a/pkg/detectors/ipify/ipify.go+++ b/pkg/detectors/ipify/ipify.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 10 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://geo.ipify.org/api/v2/country?apiKey=%s&ipAddress=8.8.8.8", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://geo.ipify.org/api/v2/country?apiKey=%s&ipAddress=8.8.8.8", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/ipinfodb/ipinfodb.go b/pkg/detectors/ipinfodb/ipinfodb.goindex 851118a78..46667ed56 100644--- a/pkg/detectors/ipinfodb/ipinfodb.go+++ b/pkg/detectors/ipinfodb/ipinfodb.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.ipinfodb.com/v3/ip-country/?key=%s&ip=8.8.8.8&format=json", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.ipinfodb.com/v3/ip-country/?key=%s&ip=8.8.8.8&format=json", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {bodyBytes, err := ioutil.ReadAll(res.Body)diff --git a/pkg/detectors/ipquality/ipquality.go b/pkg/detectors/ipquality/ipquality.goindex 5440bab4a..f7049b453 100644--- a/pkg/detectors/ipquality/ipquality.go+++ b/pkg/detectors/ipquality/ipquality.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://www.ipqualityscore.com/api/json/account/%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://www.ipqualityscore.com/api/json/account/%s", resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/ipstack/ipstack.go b/pkg/detectors/ipstack/ipstack.goindex e037b6a6b..18f415a21 100644--- a/pkg/detectors/ipstack/ipstack.go+++ b/pkg/detectors/ipstack/ipstack.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.ipstack.com/134.201.250.155?access_key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.ipstack.com/134.201.250.155?access_key="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/jdbc/jdbc.go b/pkg/detectors/jdbc/jdbc.goindex 2b81d83b9..d76d93a25 100644--- a/pkg/detectors/jdbc/jdbc.go+++ b/pkg/detectors/jdbc/jdbc.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result//TODO can this be verified? Possibly. Could triage verification to other DBMS stringss.Verified = false// client := common.SaneHttpClient()- // req, _ := http.NewRequestWithContext(ctx, "GET", "https://jdbcci.com/api/v2/me", nil)+ // req, err := http.NewRequestWithContext(ctx, "GET", "https://jdbcci.com/api/v2/me", nil)+ if err != nil {+ continue+ }// req.Header.Add("Accept", "application/json;")// req.Header.Add("Jdbc-Token", token)// res, err := client.Do(req)diff --git a/pkg/detectors/jiratoken/jiratoken.go b/pkg/detectors/jiratoken/jiratoken.goindex c6051212f..2023568ba 100644--- a/pkg/detectors/jiratoken/jiratoken.go+++ b/pkg/detectors/jiratoken/jiratoken.go@@ -66,7 +66,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultdata := fmt.Sprintf("%s:%s", resEmail, resToken)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://"+resDomain+"/rest/api/3/dashboard", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://"+resDomain+"/rest/api/3/dashboard", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)diff --git a/pkg/detectors/jotform/jotform.go b/pkg/detectors/jotform/jotform.goindex ee772a8e5..8991aed6f 100644--- a/pkg/detectors/jotform/jotform.go+++ b/pkg/detectors/jotform/jotform.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.jotform.com/user?apiKey="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.jotform.com/user?apiKey="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/jumpcloud/jumpcloud.go b/pkg/detectors/jumpcloud/jumpcloud.goindex 5d243ceb6..b485a36d2 100644--- a/pkg/detectors/jumpcloud/jumpcloud.go+++ b/pkg/detectors/jumpcloud/jumpcloud.go@@ -46,7 +46,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://console.jumpcloud.com/api/v2/systemgroups", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://console.jumpcloud.com/api/v2/systemgroups", nil)+ if err != nil {+ continue+ }req.Header.Add("x-api-key", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/juro/juro.go b/pkg/detectors/juro/juro.goindex 1211eeca8..c6877d047 100644--- a/pkg/detectors/juro/juro.go+++ b/pkg/detectors/juro/juro.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.juro.com/v3/templates", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.juro.com/v3/templates", nil)+ if err != nil {+ continue+ }req.Header.Add("x-api-key", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/kanban/kanban.go b/pkg/detectors/kanban/kanban.goindex 6ab815f6e..94c514b92 100644--- a/pkg/detectors/kanban/kanban.go+++ b/pkg/detectors/kanban/kanban.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s/api/v3/users/current.json", resURL), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s/api/v3/users/current.json", resURL), nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/vnd.kanban+json; version=3")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/kanban/kanban/kanban.go b/pkg/detectors/kanban/kanban/kanban.goindex 6ab815f6e..94c514b92 100644--- a/pkg/detectors/kanban/kanban/kanban.go+++ b/pkg/detectors/kanban/kanban/kanban.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s/api/v3/users/current.json", resURL), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s/api/v3/users/current.json", resURL), nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/vnd.kanban+json; version=3")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/karmacrm/karmacrm.go b/pkg/detectors/karmacrm/karmacrm.goindex 8a70c96f5..4089d531f 100644--- a/pkg/detectors/karmacrm/karmacrm.go+++ b/pkg/detectors/karmacrm/karmacrm.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://app.karmacrm.com/api/v3/contacts.json?api_token=%s&page=1", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://app.karmacrm.com/api/v3/contacts.json?api_token=%s&page=1", resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/vnd.karmacrm+json; version=3")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/keenio/keenio.go b/pkg/detectors/keenio/keenio.goindex fe86354a3..3744a77ee 100644--- a/pkg/detectors/keenio/keenio.go+++ b/pkg/detectors/keenio/keenio.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.keen.io/3.0/organizations/"+resIdMatch+"/projects", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.keen.io/3.0/organizations/"+resIdMatch+"/projects", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("%s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/kickbox/kickbox.go b/pkg/detectors/kickbox/kickbox.goindex fc467367c..d318f2515 100644--- a/pkg/detectors/kickbox/kickbox.go+++ b/pkg/detectors/kickbox/kickbox.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.kickbox.com/v2/[email protected]&apikey="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.kickbox.com/v2/[email protected]&apikey="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/klipfolio/klipfolio.go b/pkg/detectors/klipfolio/klipfolio.goindex 207dc9662..32a3ca8eb 100644--- a/pkg/detectors/klipfolio/klipfolio.go+++ b/pkg/detectors/klipfolio/klipfolio.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.klipfolio.com/api/1.0/users", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://app.klipfolio.com/api/1.0/users", nil)+ if err != nil {+ continue+ }req.Header.Add("kf-api-key", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/kontent/kontent.go b/pkg/detectors/kontent/kontent.goindex 1292b8b28..baf90799b 100644--- a/pkg/detectors/kontent/kontent.go+++ b/pkg/detectors/kontent/kontent.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://deliver.kontent.ai/%s/items", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://deliver.kontent.ai/%s/items", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/kraken/kraken.go b/pkg/detectors/kraken/kraken.goindex 8a9943967..e68c14b58 100644--- a/pkg/detectors/kraken/kraken.go+++ b/pkg/detectors/kraken/kraken.go@@ -75,7 +75,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultb64DecodedSecret, _ := base64.StdEncoding.DecodeString(resPrivKeyMatch)signature := getKrakenSignature("/0/private/Balance", payload, b64DecodedSecret)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.kraken.com/0/private/Balance", strings.NewReader(payload.Encode()))+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api.kraken.com/0/private/Balance", strings.NewReader(payload.Encode()))+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/x-www-form-urlencoded")req.Header.Add("API-Key", resMatch)req.Header.Add("API-Sign", signature)diff --git a/pkg/detectors/kucoin/kucoin.go b/pkg/detectors/kucoin/kucoin.goindex 7d0bc0c4d..591f90133 100644--- a/pkg/detectors/kucoin/kucoin.go+++ b/pkg/detectors/kucoin/kucoin.go@@ -78,7 +78,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultsignature := getKucoinSignature(resSecretMatch, timestamp, method, endpoint, bodyStr)passPhrase := getKucoinPassphrase(resSecretMatch, resPassphraseMatch)- req, _ := http.NewRequest(method, "https://api.kucoin.com"+endpoint, nil)+ req, err := http.NewRequest(method, "https://api.kucoin.com"+endpoint, nil)+ if err != nil {+ continue+ }req.Header.Add("KC-API-KEY", resKeyMatch)req.Header.Add("KC-API-SIGN", signature)req.Header.Add("KC-API-TIMESTAMP", timestamp)diff --git a/pkg/detectors/kylas/kylas.go b/pkg/detectors/kylas/kylas.goindex 8100608bd..a9c246b37 100644--- a/pkg/detectors/kylas/kylas.go+++ b/pkg/detectors/kylas/kylas.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.kylas.io/v1/contacts", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.kylas.io/v1/contacts", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("api-key", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/languagelayer/languagelayer.go b/pkg/detectors/languagelayer/languagelayer.goindex ed3f0d0fc..51cbaf309 100644--- a/pkg/detectors/languagelayer/languagelayer.go+++ b/pkg/detectors/languagelayer/languagelayer.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.languagelayer.com/languages?access_key=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.languagelayer.com/languages?access_key=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {bodyBytes, err := ioutil.ReadAll(res.Body)diff --git a/pkg/detectors/lastfm/lastfm.go b/pkg/detectors/lastfm/lastfm.goindex c7f243a8a..b0668290d 100644--- a/pkg/detectors/lastfm/lastfm.go+++ b/pkg/detectors/lastfm/lastfm.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://ws.audioscrobbler.com/2.0/?method=artist.getSimilar&api_key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://ws.audioscrobbler.com/2.0/?method=artist.getSimilar&api_key="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/launchdarkly/launchdarkly.go b/pkg/detectors/launchdarkly/launchdarkly.goindex 70a64b8bc..307b9e9be 100644--- a/pkg/detectors/launchdarkly/launchdarkly.go+++ b/pkg/detectors/launchdarkly/launchdarkly.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.launchdarkly.com/api/v2/tokens", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://app.launchdarkly.com/api/v2/tokens", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/leadfeeder/leadfeeder.go b/pkg/detectors/leadfeeder/leadfeeder.goindex c4e45ae27..862b5aafc 100644--- a/pkg/detectors/leadfeeder/leadfeeder.go+++ b/pkg/detectors/leadfeeder/leadfeeder.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.leadfeeder.com/accounts", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.leadfeeder.com/accounts", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Token token=%s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/lendflow/lendflow.go b/pkg/detectors/lendflow/lendflow.goindex ba0e05708..08d844ce6 100644--- a/pkg/detectors/lendflow/lendflow.go+++ b/pkg/detectors/lendflow/lendflow.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 10 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.lendflow.io/api/v1/deals", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://app.lendflow.io/api/v1/deals", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))req.Header.Add("Accept", "application/json")diff --git a/pkg/detectors/lessannoyingcrm/lessannoyingcrm.go b/pkg/detectors/lessannoyingcrm/lessannoyingcrm.goindex 00a5c45ec..5132f088a 100644--- a/pkg/detectors/lessannoyingcrm/lessannoyingcrm.go+++ b/pkg/detectors/lessannoyingcrm/lessannoyingcrm.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {userCode := strings.Split(resMatch, "-")- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.lessannoyingcrm.com?UserCode=%s&APIToken=%s&Function=GetUserInfo", userCode, resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.lessannoyingcrm.com?UserCode=%s&APIToken=%s&Function=GetUserInfo", userCode, resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/vnd.lessannoyingcrm+json; version=3")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/lexigram/lexigram.go b/pkg/detectors/lexigram/lexigram.goindex 6ab7d21ee..032498bfd 100644--- a/pkg/detectors/lexigram/lexigram.go+++ b/pkg/detectors/lexigram/lexigram.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.lexigram.io/v1/lexigraph/search?q=diabetes", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.lexigram.io/v1/lexigraph/search?q=diabetes", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/linearapi/linearapi.go b/pkg/detectors/linearapi/linearapi.goindex 68af1f5fd..c18294940 100644--- a/pkg/detectors/linearapi/linearapi.go+++ b/pkg/detectors/linearapi/linearapi.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {reqDataQuery := strings.NewReader(`{ "query": "{ viewer { id name } }" }`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.linear.app/graphql", reqDataQuery)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api.linear.app/graphql", reqDataQuery)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", resMatch)diff --git a/pkg/detectors/linemessaging/linemessaging.go b/pkg/detectors/linemessaging/linemessaging.goindex df967f068..e53f5891c 100644--- a/pkg/detectors/linemessaging/linemessaging.go+++ b/pkg/detectors/linemessaging/linemessaging.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.line.me/v2/bot/info", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.line.me/v2/bot/info", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/linenotify/linenotify.go b/pkg/detectors/linenotify/linenotify.goindex c06a33ab5..6c7f52d42 100644--- a/pkg/detectors/linenotify/linenotify.go+++ b/pkg/detectors/linenotify/linenotify.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "POST", "https://notify-api.line.me/api/notify?message=Notification Successful", nil)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://notify-api.line.me/api/notify?message=Notification Successful", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/linkpreview/linkpreview.go b/pkg/detectors/linkpreview/linkpreview.goindex 9c183d155..b84879da4 100644--- a/pkg/detectors/linkpreview/linkpreview.go+++ b/pkg/detectors/linkpreview/linkpreview.go@@ -46,7 +46,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.linkpreview.net/?key=%s&q=https://google.com", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.linkpreview.net/?key=%s&q=https://google.com", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/liveagent/liveagent.go b/pkg/detectors/liveagent/liveagent.goindex b9267f81d..25159f887 100644--- a/pkg/detectors/liveagent/liveagent.go+++ b/pkg/detectors/liveagent/liveagent.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://secretscanner.ladesk.com/api/v3/agents", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://secretscanner.ladesk.com/api/v3/agents", nil)+ if err != nil {+ continue+ }req.Header.Add("apikey", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/livestorm/livestorm.go b/pkg/detectors/livestorm/livestorm.goindex 83765eaa6..4b39090fe 100644--- a/pkg/detectors/livestorm/livestorm.go+++ b/pkg/detectors/livestorm/livestorm.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequest("GET", "https://api.livestorm.co/v1/ping", nil)+ req, err := http.NewRequest("GET", "https://api.livestorm.co/v1/ping", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/lob/lob.go b/pkg/detectors/lob/lob.goindex d68244cb3..fd1fdaf2d 100644--- a/pkg/detectors/lob/lob.go+++ b/pkg/detectors/lob/lob.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.lob.com/v1/addresses", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.lob.com/v1/addresses", nil)+ if err != nil {+ continue+ }req.SetBasicAuth(resMatch, "")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/locationiq/locationiq.go b/pkg/detectors/locationiq/locationiq.goindex d570a1da6..ca7cdc12e 100644--- a/pkg/detectors/locationiq/locationiq.go+++ b/pkg/detectors/locationiq/locationiq.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://us1.locationiq.com/v1/reverse.php?key="+resMatch+"&lat=-37.870662&lon=144.9803321&format=json", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://us1.locationiq.com/v1/reverse.php?key="+resMatch+"&lat=-37.870662&lon=144.9803321&format=json", nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/loginradius/loginradius.go b/pkg/detectors/loginradius/loginradius.goindex e3ddd7ea2..eb7f645ce 100644--- a/pkg/detectors/loginradius/loginradius.go+++ b/pkg/detectors/loginradius/loginradius.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.loginradius.com/identity/v2/serverinfo?apikey="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.loginradius.com/identity/v2/serverinfo?apikey="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/lokalisetoken/lokalisetoken.go b/pkg/detectors/lokalisetoken/lokalisetoken.goindex cef6042f1..92c34c64e 100644--- a/pkg/detectors/lokalisetoken/lokalisetoken.go+++ b/pkg/detectors/lokalisetoken/lokalisetoken.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.lokalise.com/api2/system/languages", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.lokalise.com/api2/system/languages", nil)+ if err != nil {+ continue+ }req.Header.Add("x-api-token", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/loyverse/loyverse.go b/pkg/detectors/loyverse/loyverse.goindex 6ae48382a..6c9809494 100644--- a/pkg/detectors/loyverse/loyverse.go+++ b/pkg/detectors/loyverse/loyverse.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.loyverse.com/v1.0/merchant/", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.loyverse.com/v1.0/merchant/", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/luno/luno.go b/pkg/detectors/luno/luno.goindex feddef4ed..a6002d2a1 100644--- a/pkg/detectors/luno/luno.go+++ b/pkg/detectors/luno/luno.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.luno.com/api/1/balance", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.luno.com/api/1/balance", nil)+ if err != nil {+ continue+ }req.SetBasicAuth(userPatMatch, tokenPatMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/luno/luno/luno.go b/pkg/detectors/luno/luno/luno.goindex feddef4ed..a6002d2a1 100644--- a/pkg/detectors/luno/luno/luno.go+++ b/pkg/detectors/luno/luno/luno.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.luno.com/api/1/balance", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.luno.com/api/1/balance", nil)+ if err != nil {+ continue+ }req.SetBasicAuth(userPatMatch, tokenPatMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/m3o/m3o.go b/pkg/detectors/m3o/m3o.goindex d82c7ef42..324f65c19 100644--- a/pkg/detectors/m3o/m3o.go+++ b/pkg/detectors/m3o/m3o.go@@ -52,7 +52,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result"days": 2,"location": "London"}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.m3o.com/v1/weather/Forecast", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api.m3o.com/v1/weather/Forecast", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/macaddress/macaddress.go b/pkg/detectors/macaddress/macaddress.goindex 93bd09937..b63e33bdb 100644--- a/pkg/detectors/macaddress/macaddress.go+++ b/pkg/detectors/macaddress/macaddress.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.macaddress.io/v1?apiKey=%s&output=json&search=44:38:39:ff:ef:51", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.macaddress.io/v1?apiKey=%s&output=json&search=44:38:39:ff:ef:51", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/madkudu/madkudu.go b/pkg/detectors/madkudu/madkudu.goindex 7e3557b56..0aec2147d 100644--- a/pkg/detectors/madkudu/madkudu.go+++ b/pkg/detectors/madkudu/madkudu.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.madkudu.com/v1/ping", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.madkudu.com/v1/ping", nil)+ if err != nil {+ continue+ }req.SetBasicAuth(resMatch, "")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/magnetic/magnetic.go b/pkg/detectors/magnetic/magnetic.goindex d73afbafa..010d76cab 100644--- a/pkg/detectors/magnetic/magnetic.go+++ b/pkg/detectors/magnetic/magnetic.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.magnetichq.com/Magnetic/rest/accountsAPI/itemTypes?token="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://app.magnetichq.com/Magnetic/rest/accountsAPI/itemTypes?token="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/mailboxlayer/mailboxlayer.go b/pkg/detectors/mailboxlayer/mailboxlayer.goindex 63b100b23..1555655d2 100644--- a/pkg/detectors/mailboxlayer/mailboxlayer.go+++ b/pkg/detectors/mailboxlayer/mailboxlayer.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://apilayer.net/api/check?access_key="+resMatch+"&[email protected]", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://apilayer.net/api/check?access_key="+resMatch+"&[email protected]", nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/mailchimp/mailchimp.go b/pkg/detectors/mailchimp/mailchimp.goindex 10c847ef6..d3aff94f6 100644--- a/pkg/detectors/mailchimp/mailchimp.go+++ b/pkg/detectors/mailchimp/mailchimp.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultclient := common.SaneHttpClient()// https://mailchimp.com/developer/guides/marketing-api-conventions/- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s.api.mailchimp.com/3.0/", datacenter), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s.api.mailchimp.com/3.0/", datacenter), nil)+ if err != nil {+ continue+ }req.SetBasicAuth("anystring", match)res, err := client.Do(req)if err != nil {diff --git a/pkg/detectors/mailerlite/mailerlite.go b/pkg/detectors/mailerlite/mailerlite.goindex ae9f275d9..899413aa9 100644--- a/pkg/detectors/mailerlite/mailerlite.go+++ b/pkg/detectors/mailerlite/mailerlite.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.mailerlite.com/api/v2/campaigns", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.mailerlite.com/api/v2/campaigns", nil)+ if err != nil {+ continue+ }req.Header.Add("X-MailerLite-ApiKey", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/mailgun/mailgun.go b/pkg/detectors/mailgun/mailgun.goindex 97f9ef796..240c7b607 100644--- a/pkg/detectors/mailgun/mailgun.go+++ b/pkg/detectors/mailgun/mailgun.go@@ -46,7 +46,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.mailgun.net/v3/domains", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.mailgun.net/v3/domains", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/mailjetbasicauth/mailjetbasicauth.go b/pkg/detectors/mailjetbasicauth/mailjetbasicauth.goindex 67d992273..67abac8d2 100644--- a/pkg/detectors/mailjetbasicauth/mailjetbasicauth.go+++ b/pkg/detectors/mailjetbasicauth/mailjetbasicauth.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.mailjet.com/v3/REST/message", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.mailjet.com/v3/REST/message", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/mailjetsms/mailjetsms.go b/pkg/detectors/mailjetsms/mailjetsms.goindex 094f59c46..6b3b1f9d2 100644--- a/pkg/detectors/mailjetsms/mailjetsms.go+++ b/pkg/detectors/mailjetsms/mailjetsms.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.mailjet.com/v4/sms", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.mailjet.com/v4/sms", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/vnd.mailjetsms+json; version=3")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/mailmodo/mailmodo.go b/pkg/detectors/mailmodo/mailmodo.goindex b816c52d6..b3baab4b0 100644--- a/pkg/detectors/mailmodo/mailmodo.go+++ b/pkg/detectors/mailmodo/mailmodo.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.mailmodo.com/api/v1/campaigns?type=CONTACT_LIST", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.mailmodo.com/api/v1/campaigns?type=CONTACT_LIST", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("mmApiKey", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/mailsac/mailsac.go b/pkg/detectors/mailsac/mailsac.goindex 08411fb21..17480aa14 100644--- a/pkg/detectors/mailsac/mailsac.go+++ b/pkg/detectors/mailsac/mailsac.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://mailsac.com/api/addresses", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://mailsac.com/api/addresses", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Mailsac-Key", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/mandrill/mandrill.go b/pkg/detectors/mandrill/mandrill.goindex ce38762a2..d7f6d65cc 100644--- a/pkg/detectors/mandrill/mandrill.go+++ b/pkg/detectors/mandrill/mandrill.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(fmt.Sprintf(`{"key": "%s"}`, resMatch))- req, _ := http.NewRequestWithContext(ctx, "POST", "https://mandrillapp.com/api/1.0/users/info", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://mandrillapp.com/api/1.0/users/info", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/manifest/manifest.go b/pkg/detectors/manifest/manifest.goindex 1f80a553d..39358b946 100644--- a/pkg/detectors/manifest/manifest.go+++ b/pkg/detectors/manifest/manifest.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.manifest.ly/api/v1/checklists/?api_key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.manifest.ly/api/v1/checklists/?api_key="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/manifest/manifest/manifest.go b/pkg/detectors/manifest/manifest/manifest.goindex 1f80a553d..39358b946 100644--- a/pkg/detectors/manifest/manifest/manifest.go+++ b/pkg/detectors/manifest/manifest/manifest.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.manifest.ly/api/v1/checklists/?api_key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.manifest.ly/api/v1/checklists/?api_key="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/mapbox/mapbox.go b/pkg/detectors/mapbox/mapbox.goindex 2c1c7f81b..6195b2423 100644--- a/pkg/detectors/mapbox/mapbox.go+++ b/pkg/detectors/mapbox/mapbox.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.mapbox.com/tokens/v2/"+resId+"?access_token="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.mapbox.com/tokens/v2/"+resId+"?access_token="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/mapquest/mapquest.go b/pkg/detectors/mapquest/mapquest.goindex 5bd350ea2..913d95b3a 100644--- a/pkg/detectors/mapquest/mapquest.go+++ b/pkg/detectors/mapquest/mapquest.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://www.mapquestapi.com/datamanager/v2/get-column-types?key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://www.mapquestapi.com/datamanager/v2/get-column-types?key="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/marketstack/marketstack.go b/pkg/detectors/marketstack/marketstack.goindex 9c43d9604..03e0ddbc3 100644--- a/pkg/detectors/marketstack/marketstack.go+++ b/pkg/detectors/marketstack/marketstack.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.marketstack.com/v1/eod?access_key=%s&symbols=AAPL", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.marketstack.com/v1/eod?access_key=%s&symbols=AAPL", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken.go b/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken.goindex 83a7b2585..780e13d64 100644--- a/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken.go+++ b/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://"+serverRes+"/api/v4/users/stats", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://"+serverRes+"/api/v4/users/stats", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/mavenlink/mavenlink.go b/pkg/detectors/mavenlink/mavenlink.goindex 50e7591d3..2ca5f4eef 100644--- a/pkg/detectors/mavenlink/mavenlink.go+++ b/pkg/detectors/mavenlink/mavenlink.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.mavenlink.com/api/v1/workspaces.json", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.mavenlink.com/api/v1/workspaces.json", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/maxmindlicense/maxmindlicense.go b/pkg/detectors/maxmindlicense/maxmindlicense.goindex 0daf85a38..c750d3f25 100644--- a/pkg/detectors/maxmindlicense/maxmindlicense.go+++ b/pkg/detectors/maxmindlicense/maxmindlicense.go@@ -52,7 +52,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://geoip.maxmind.com/geoip/v2.1/country/8.8.8.8", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://geoip.maxmind.com/geoip/v2.1/country/8.8.8.8", nil)+ if err != nil {+ continue+ }req.SetBasicAuth(idRes, keyRes)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/meaningcloud/meaningcloud.go b/pkg/detectors/meaningcloud/meaningcloud.goindex da4a58a85..3aadae691 100644--- a/pkg/detectors/meaningcloud/meaningcloud.go+++ b/pkg/detectors/meaningcloud/meaningcloud.go@@ -69,7 +69,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultcontinue}writer.Close()- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.meaningcloud.com/lang-4.0/identification", bytes.NewReader(body.Bytes()))+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api.meaningcloud.com/lang-4.0/identification", bytes.NewReader(body.Bytes()))+ if err != nil {+ continue+ }req.Header.Add("Content-Type", writer.FormDataContentType())res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/mediastack/mediastack.go b/pkg/detectors/mediastack/mediastack.goindex 666ce49ac..c0256628e 100644--- a/pkg/detectors/mediastack/mediastack.go+++ b/pkg/detectors/mediastack/mediastack.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 10 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.mediastack.com/v1/news?access_key=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.mediastack.com/v1/news?access_key=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/meistertask/meistertask.go b/pkg/detectors/meistertask/meistertask.goindex 98887e9a1..3d10d8b54 100644--- a/pkg/detectors/meistertask/meistertask.go+++ b/pkg/detectors/meistertask/meistertask.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://www.meistertask.com/api/projects", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://www.meistertask.com/api/projects", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/meistertask/meistertask/meistertask.go b/pkg/detectors/meistertask/meistertask/meistertask.goindex 98887e9a1..3d10d8b54 100644--- a/pkg/detectors/meistertask/meistertask/meistertask.go+++ b/pkg/detectors/meistertask/meistertask/meistertask.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://www.meistertask.com/api/projects", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://www.meistertask.com/api/projects", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/mesibo/mesibo.go b/pkg/detectors/mesibo/mesibo.goindex b72ad4480..fcbf7fdae 100644--- a/pkg/detectors/mesibo/mesibo.go+++ b/pkg/detectors/mesibo/mesibo.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.mesibo.com/api.php?op=useradd&token="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.mesibo.com/api.php?op=useradd&token="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/messagebird/messagebird.go b/pkg/detectors/messagebird/messagebird.goindex 4a88c2c50..67db8ea52 100644--- a/pkg/detectors/messagebird/messagebird.go+++ b/pkg/detectors/messagebird/messagebird.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://rest.messagebird.com/messages", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://rest.messagebird.com/messages", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("AccessKey %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/metaapi/metaapi.go b/pkg/detectors/metaapi/metaapi.goindex a095bb2ba..2ac4da826 100644--- a/pkg/detectors/metaapi/metaapi.go+++ b/pkg/detectors/metaapi/metaapi.go@@ -57,7 +57,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequest("GET", fmt.Sprintf("https://api.meta-api.io/api/spells/%s/runSync", resSpellMatch), nil)+ req, err := http.NewRequest("GET", fmt.Sprintf("https://api.meta-api.io/api/spells/%s/runSync", resSpellMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("apikey", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/metrilo/metrilo.go b/pkg/detectors/metrilo/metrilo.goindex f27cf2946..7319a3cd3 100644--- a/pkg/detectors/metrilo/metrilo.go+++ b/pkg/detectors/metrilo/metrilo.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(`{"time":1518004715732,"token": "` + resMatch + `" ,"platform":"Wordpress 4.2.7 / Woocommerce 3.5","pluginVersion":"1.1.0","params":{"id":"12","name":"Clothing","url":"https://dummysite.com"}}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://trk.mtrl.me/category", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://trk.mtrl.me/category", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Content-Length", `0`)res, err := client.Do(req)diff --git a/pkg/detectors/microsoftteamswebhook/microsoftteamswebhook.go b/pkg/detectors/microsoftteamswebhook/microsoftteamswebhook.goindex 72c1a0ba1..5a3172a29 100644--- a/pkg/detectors/microsoftteamswebhook/microsoftteamswebhook.go+++ b/pkg/detectors/microsoftteamswebhook/microsoftteamswebhook.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {payload := strings.NewReader(`{'text':'This is a verification message from TruffleHog. It means that there has been a live webhook credential found.'}`)- req, _ := http.NewRequestWithContext(ctx, "POST", resMatch, payload)+ req, err := http.NewRequestWithContext(ctx, "POST", resMatch, payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err != nil {diff --git a/pkg/detectors/midise/midise.go b/pkg/detectors/midise/midise.goindex a57446981..a4cc7516a 100644--- a/pkg/detectors/midise/midise.go+++ b/pkg/detectors/midise/midise.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultclient := common.SaneHttpClient()- req, _ := http.NewRequestWithContext(ctx, "GET", baseURL, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", baseURL, nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", match))req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)diff --git a/pkg/detectors/mindmeister/mindmeister.go b/pkg/detectors/mindmeister/mindmeister.goindex 9503759c1..952d36ab1 100644--- a/pkg/detectors/mindmeister/mindmeister.go+++ b/pkg/detectors/mindmeister/mindmeister.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://www.mindmeister.com/services/rest/oauth2?method=mm.maps.getList", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://www.mindmeister.com/services/rest/oauth2?method=mm.maps.getList", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/mite/mite.go b/pkg/detectors/mite/mite.goindex 04452689a..ffec13965 100644--- a/pkg/detectors/mite/mite.go+++ b/pkg/detectors/mite/mite.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s/account.json", resURL), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s/account.json", resURL), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("X-MiteApiKey", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/mite/mite/mite.go b/pkg/detectors/mite/mite/mite.goindex 04452689a..ffec13965 100644--- a/pkg/detectors/mite/mite/mite.go+++ b/pkg/detectors/mite/mite/mite.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s/account.json", resURL), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s/account.json", resURL), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("X-MiteApiKey", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/mixmax/mixmax.go b/pkg/detectors/mixmax/mixmax.goindex f0a86a705..1f86ed91d 100644--- a/pkg/detectors/mixmax/mixmax.go+++ b/pkg/detectors/mixmax/mixmax.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.mixmax.com/v1/users/me", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.mixmax.com/v1/users/me", nil)+ if err != nil {+ continue+ }req.Header.Add("X-API-Token", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/mixmax/mixmax/mixmax.go b/pkg/detectors/mixmax/mixmax/mixmax.goindex f0a86a705..1f86ed91d 100644--- a/pkg/detectors/mixmax/mixmax/mixmax.go+++ b/pkg/detectors/mixmax/mixmax/mixmax.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.mixmax.com/v1/users/me", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.mixmax.com/v1/users/me", nil)+ if err != nil {+ continue+ }req.Header.Add("X-API-Token", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/mixpanel/mixpanel.go b/pkg/detectors/mixpanel/mixpanel.goindex e8ac51172..83466e096 100644--- a/pkg/detectors/mixpanel/mixpanel.go+++ b/pkg/detectors/mixpanel/mixpanel.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://mixpanel.com/api/app/me", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://mixpanel.com/api/app/me", nil)+ if err != nil {+ continue+ }req.SetBasicAuth(userPatMatch, tokenPatMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/moderation/moderation.go b/pkg/detectors/moderation/moderation.goindex ae51aca5e..a6752b6a9 100644--- a/pkg/detectors/moderation/moderation.go+++ b/pkg/detectors/moderation/moderation.go@@ -52,7 +52,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resulttimeout := 5 * time.Secondclient.Timeout = timeoutpayload := strings.NewReader(`{"value": "This is an english text"}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://moderationapi.com/api/v1/analyze/language", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://moderationapi.com/api/v1/analyze/language", payload)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))req.Header.Add("Content-type", "application/json")res, err := client.Do(req)diff --git a/pkg/detectors/monday/monday.go b/pkg/detectors/monday/monday.goindex f58817911..3232cf2d5 100644--- a/pkg/detectors/monday/monday.go+++ b/pkg/detectors/monday/monday.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(`{"query":"{boards(limit:1){id name}}"}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.monday.com/v2", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api.monday.com/v2", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/moonclerck/moonclerck.go b/pkg/detectors/moonclerck/moonclerck.goindex 7b07cdff2..35534d4ab 100644--- a/pkg/detectors/moonclerck/moonclerck.go+++ b/pkg/detectors/moonclerck/moonclerck.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.moonclerk.com/forms", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.moonclerk.com/forms", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/vnd.moonclerk+json;version=1")req.Header.Add("Authorization", "Token token="+resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/moonclerk/moonclerk.go b/pkg/detectors/moonclerk/moonclerk.goindex 752a1a707..a19c4ff79 100644--- a/pkg/detectors/moonclerk/moonclerk.go+++ b/pkg/detectors/moonclerk/moonclerk.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.moonclerk.com/forms", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.moonclerk.com/forms", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/vnd.moonclerk+json;version=1")req.Header.Add("Authorization", "Token token="+resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/moosend/moosend.go b/pkg/detectors/moosend/moosend.goindex 18768fd9a..33e01f8fb 100644--- a/pkg/detectors/moosend/moosend.go+++ b/pkg/detectors/moosend/moosend.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.moosend.com/v3/lists.json?apikey="+resMatch+"&format=json", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.moosend.com/v3/lists.json?apikey="+resMatch+"&format=json", nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/mrticktock/mrticktock.go b/pkg/detectors/mrticktock/mrticktock.goindex 9b7ce5f50..2371ed060 100644--- a/pkg/detectors/mrticktock/mrticktock.go+++ b/pkg/detectors/mrticktock/mrticktock.go@@ -58,7 +58,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(fmt.Sprintf(`email=%s&password=%s`, resMatch, resPassword))- req, _ := http.NewRequestWithContext(ctx, "POST", "https://mrticktock.com/app/api/is_timer_active", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://mrticktock.com/app/api/is_timer_active", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/x-www-form-urlencoded")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/myfreshworks/myfreshworks.go b/pkg/detectors/myfreshworks/myfreshworks.goindex 19fa82d4a..37fe82e9d 100644--- a/pkg/detectors/myfreshworks/myfreshworks.go+++ b/pkg/detectors/myfreshworks/myfreshworks.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://"+resIdMatch+".myfreshworks.com/crm/sales/api/sales_accounts/filters", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://"+resIdMatch+".myfreshworks.com/crm/sales/api/sales_accounts/filters", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Token token=%s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/myintervals/myintervals.go b/pkg/detectors/myintervals/myintervals.goindex a47b217a4..25433cc46 100644--- a/pkg/detectors/myintervals/myintervals.go+++ b/pkg/detectors/myintervals/myintervals.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:X", resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.myintervals.com/client/", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.myintervals.com/client/", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)diff --git a/pkg/detectors/myintervals/myintervals/myintervals.go b/pkg/detectors/myintervals/myintervals/myintervals.goindex a47b217a4..25433cc46 100644--- a/pkg/detectors/myintervals/myintervals/myintervals.go+++ b/pkg/detectors/myintervals/myintervals/myintervals.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:X", resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.myintervals.com/client/", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.myintervals.com/client/", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)diff --git a/pkg/detectors/nasdaqdatalink/nasdaqdatalink.go b/pkg/detectors/nasdaqdatalink/nasdaqdatalink.goindex bc47dce23..7f9fb6b2e 100644--- a/pkg/detectors/nasdaqdatalink/nasdaqdatalink.go+++ b/pkg/detectors/nasdaqdatalink/nasdaqdatalink.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 10 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://data.nasdaq.com/api/v3/datasets/FRED/GDP.csv?api_key=%s&collapse=annual&rows=6&order=asc&column_index=1", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://data.nasdaq.com/api/v3/datasets/FRED/GDP.csv?api_key=%s&collapse=annual&rows=6&order=asc&column_index=1", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/nethunt/nethunt.go b/pkg/detectors/nethunt/nethunt.goindex bc096edbd..9e0daa04b 100644--- a/pkg/detectors/nethunt/nethunt.go+++ b/pkg/detectors/nethunt/nethunt.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://nethunt.com/api/v1/zapier/triggers/readable-folder", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://nethunt.com/api/v1/zapier/triggers/readable-folder", nil)+ if err != nil {+ continue+ }req.SetBasicAuth(userPatMatch, tokenPatMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/netlify/netlify.go b/pkg/detectors/netlify/netlify.goindex af71e8161..2802ab7e9 100644--- a/pkg/detectors/netlify/netlify.go+++ b/pkg/detectors/netlify/netlify.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.netlify.com/api/v1/sites", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.netlify.com/api/v1/sites", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/neutrinoapi/neutrinoapi.go b/pkg/detectors/neutrinoapi/neutrinoapi.goindex a692bdb8a..ab41b6e0c 100644--- a/pkg/detectors/neutrinoapi/neutrinoapi.go+++ b/pkg/detectors/neutrinoapi/neutrinoapi.go@@ -71,7 +71,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultcontinue}writer.Close()- req, _ := http.NewRequestWithContext(ctx, "POST", fmt.Sprintf("https://neutrinoapi.net/url-info?user-id=%s&api-key=%s", resIdMatch, resMatch), bytes.NewReader(body.Bytes()))+ req, err := http.NewRequestWithContext(ctx, "POST", fmt.Sprintf("https://neutrinoapi.net/url-info?user-id=%s&api-key=%s", resIdMatch, resMatch), bytes.NewReader(body.Bytes()))+ if err != nil {+ continue+ }req.Header.Add("Content-Type", writer.FormDataContentType())res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/newrelicpersonalapikey/newrelicpersonalapikey.go b/pkg/detectors/newrelicpersonalapikey/newrelicpersonalapikey.goindex 9ffd4665c..c7f8d117b 100644--- a/pkg/detectors/newrelicpersonalapikey/newrelicpersonalapikey.go+++ b/pkg/detectors/newrelicpersonalapikey/newrelicpersonalapikey.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.newrelic.com/v2/users.json", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.newrelic.com/v2/users.json", nil)+ if err != nil {+ continue+ }req.Header.Add("X-Api-Key", fmt.Sprintf("%s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/newsapi/newsapi.go b/pkg/detectors/newsapi/newsapi.goindex 81ea68b29..940829013 100644--- a/pkg/detectors/newsapi/newsapi.go+++ b/pkg/detectors/newsapi/newsapi.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://newsapi.org/v2/everything?q=Apple&from=2021-09-29&sortBy=popularity&apiKey="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://newsapi.org/v2/everything?q=Apple&from=2021-09-29&sortBy=popularity&apiKey="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/newscatcher/newscatcher.go b/pkg/detectors/newscatcher/newscatcher.goindex 1f5994f2d..b97d7edf3 100644--- a/pkg/detectors/newscatcher/newscatcher.go+++ b/pkg/detectors/newscatcher/newscatcher.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.newscatcherapi.com/v2/search?q=Tesla", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.newscatcherapi.com/v2/search?q=Tesla", nil)+ if err != nil {+ continue+ }req.Header.Add("x-api-key", fmt.Sprintf("%s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/nexmoapikey/nexmoapikey.go b/pkg/detectors/nexmoapikey/nexmoapikey.goindex 86e561041..f783c8924 100644--- a/pkg/detectors/nexmoapikey/nexmoapikey.go+++ b/pkg/detectors/nexmoapikey/nexmoapikey.go@@ -54,7 +54,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://rest.nexmo.com/account/get-balance?api_key="+resMatch+"&api_secret="+resSecret+"", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://rest.nexmo.com/account/get-balance?api_key="+resMatch+"&api_secret="+resSecret+"", nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/nftport/nftport.go b/pkg/detectors/nftport/nftport.goindex d864dd4d5..2e9c06b0f 100644--- a/pkg/detectors/nftport/nftport.go+++ b/pkg/detectors/nftport/nftport.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.nftport.xyz/me/contracts", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.nftport.xyz/me/contracts", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("%s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/nicereply/nicereply.go b/pkg/detectors/nicereply/nicereply.goindex 0af946a66..f788b5815 100644--- a/pkg/detectors/nicereply/nicereply.go+++ b/pkg/detectors/nicereply/nicereply.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf(":%s", resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.nicereply.com/v1/users/stats", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.nicereply.com/v1/users/stats", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/nimble/nimble.go b/pkg/detectors/nimble/nimble.goindex 700b273b8..f653b23f0 100644--- a/pkg/detectors/nimble/nimble.go+++ b/pkg/detectors/nimble/nimble.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.nimble.com/api/v1/myself", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://app.nimble.com/api/v1/myself", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/nitro/nitro.go b/pkg/detectors/nitro/nitro.goindex 06b63ebbe..5b74ab8b1 100644--- a/pkg/detectors/nitro/nitro.go+++ b/pkg/detectors/nitro/nitro.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://nitro.alconost.com/api/v1/account", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://nitro.alconost.com/api/v1/account", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.SetBasicAuth(resMatch, "")res, err := client.Do(req)diff --git a/pkg/detectors/noticeable/noticeable.go b/pkg/detectors/noticeable/noticeable.goindex 42719b919..9cebbf2d4 100644--- a/pkg/detectors/noticeable/noticeable.go+++ b/pkg/detectors/noticeable/noticeable.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(`{"query": "YOUR_GRAPHQL_PAYLOAD"}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.noticeable.io/graphql", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api.noticeable.io/graphql", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Apikey %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/notion/notion.go b/pkg/detectors/notion/notion.goindex ca7aa9440..b6e46774c 100644--- a/pkg/detectors/notion/notion.go+++ b/pkg/detectors/notion/notion.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.notion.com/v1/users", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.notion.com/v1/users", nil)+ if err != nil {+ continue+ }req.Header.Add("Notion-Version", "2021-05-11")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/nozbeteams/nozbeteams.go b/pkg/detectors/nozbeteams/nozbeteams.goindex 4c932155f..6a267c5ed 100644--- a/pkg/detectors/nozbeteams/nozbeteams.go+++ b/pkg/detectors/nozbeteams/nozbeteams.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api4.nozbe.com/v1/api/users", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api4.nozbe.com/v1/api/users", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("Authorization", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/numverify/numverify.go b/pkg/detectors/numverify/numverify.goindex a0be78d07..8df5f1129 100644--- a/pkg/detectors/numverify/numverify.go+++ b/pkg/detectors/numverify/numverify.go@@ -44,7 +44,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultRaw: []byte(resMatch),}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://apilayer.net/api/validate?access_key=%s&number=14158586273", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://apilayer.net/api/validate?access_key=%s&number=14158586273", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {bodyBytes, err := ioutil.ReadAll(res.Body)diff --git a/pkg/detectors/nutritionix/nutritionix.go b/pkg/detectors/nutritionix/nutritionix.goindex 142adc964..626d53566 100644--- a/pkg/detectors/nutritionix/nutritionix.go+++ b/pkg/detectors/nutritionix/nutritionix.go@@ -57,7 +57,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(`{"query":"for breakfast i ate 2 eggs, bacon, and french toast","timezone":"US/Eastern"}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://trackapi.nutritionix.com/v2/natural/nutrients", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://trackapi.nutritionix.com/v2/natural/nutrients", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("x-app-id", resIdMatch)req.Header.Add("x-app-key", resMatch)diff --git a/pkg/detectors/nylas/nylas.go b/pkg/detectors/nylas/nylas.goindex 9af72f029..fd180d549 100644--- a/pkg/detectors/nylas/nylas.go+++ b/pkg/detectors/nylas/nylas.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.nylas.com/account", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.nylas.com/account", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/vnd.nylas+json; version=3")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/nytimes/nytimes.go b/pkg/detectors/nytimes/nytimes.goindex 26dcebaba..85c4089fc 100644--- a/pkg/detectors/nytimes/nytimes.go+++ b/pkg/detectors/nytimes/nytimes.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.nytimes.com/svc/archive/v1/2019/1.json?api-key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.nytimes.com/svc/archive/v1/2019/1.json?api-key="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/oanda/oanda.go b/pkg/detectors/oanda/oanda.goindex 6d2b8eb37..99e9aed92 100644--- a/pkg/detectors/oanda/oanda.go+++ b/pkg/detectors/oanda/oanda.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://web-services.oanda.com/rates/api/v2/currencies.json", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://web-services.oanda.com/rates/api/v2/currencies.json", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/oanda/oanda/oanda.go b/pkg/detectors/oanda/oanda/oanda.goindex 6d2b8eb37..99e9aed92 100644--- a/pkg/detectors/oanda/oanda/oanda.go+++ b/pkg/detectors/oanda/oanda/oanda.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://web-services.oanda.com/rates/api/v2/currencies.json", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://web-services.oanda.com/rates/api/v2/currencies.json", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/omnisend/omnisend.go b/pkg/detectors/omnisend/omnisend.goindex 8959a640e..b76789fcb 100644--- a/pkg/detectors/omnisend/omnisend.go+++ b/pkg/detectors/omnisend/omnisend.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.omnisend.com/v3/contacts?limit=100&offset=0", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.omnisend.com/v3/contacts?limit=100&offset=0", nil)+ if err != nil {+ continue+ }req.Header.Add("X-API-KEY", fmt.Sprintf("%s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/onedesk/onedesk.go b/pkg/detectors/onedesk/onedesk.goindex 18d9d9ffd..9a8f5b3c4 100644--- a/pkg/detectors/onedesk/onedesk.go+++ b/pkg/detectors/onedesk/onedesk.go@@ -57,7 +57,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(fmt.Sprintf(`{"email": "%s", "password": "%s"}`, resMatch, resPword))- req, _ := http.NewRequestWithContext(ctx, "POST", "https://app.onedesk.com/rest/2.0/login/loginUser", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://app.onedesk.com/rest/2.0/login/loginUser", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/onelogin/onelogin.go b/pkg/detectors/onelogin/onelogin.goindex 45152bf00..df0df4fff 100644--- a/pkg/detectors/onelogin/onelogin.go+++ b/pkg/detectors/onelogin/onelogin.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {for _, domain := range apiDomains {tokenURL := fmt.Sprintf("https://%s/auth/oauth2/v2/token", domain)- req, _ := http.NewRequestWithContext(ctx, "POST", tokenURL, strings.NewReader(`{"grant_type":"client_credentials"}`))+ req, err := http.NewRequestWithContext(ctx, "POST", tokenURL, strings.NewReader(`{"grant_type":"client_credentials"}`))+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("client_id:%s, client_secret:%s", clientID[1], clientSecret[1]))req.Header.Add("Content-Type", "application/json; charset=utf-8")res, err := client.Do(req)diff --git a/pkg/detectors/onepagecrm/onepagecrm.go b/pkg/detectors/onepagecrm/onepagecrm.goindex be5b8e022..6695dfb43 100644--- a/pkg/detectors/onepagecrm/onepagecrm.go+++ b/pkg/detectors/onepagecrm/onepagecrm.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultRaw: []byte(tokenPatMatch),}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.onepagecrm.com/api/v3/contacts.json?per_page=20&page=1", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://app.onepagecrm.com/api/v3/contacts.json?per_page=20&page=1", nil)+ if err != nil {+ continue+ }req.SetBasicAuth(userPatMatch, tokenPatMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/onwaterio/onwaterio.go b/pkg/detectors/onwaterio/onwaterio.goindex 9930e544b..28e783442 100644--- a/pkg/detectors/onwaterio/onwaterio.go+++ b/pkg/detectors/onwaterio/onwaterio.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.onwater.io/api/v1/results/23.92323,-66.3?access_token=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.onwater.io/api/v1/results/23.92323,-66.3?access_token=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/oopspam/oopspam.go b/pkg/detectors/oopspam/oopspam.goindex 151fec5df..d2d0b9b37 100644--- a/pkg/detectors/oopspam/oopspam.go+++ b/pkg/detectors/oopspam/oopspam.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(`{"checkForLength":true,"content":"Dear Agent, We are a manufacturing company which specializes in supplying Aluminum Rod with Zinc Alloy Rod to customers worldwide, based in Japan, Asia. We have been unable to follow up payments effectively for transactions with debtor customers in your country due to our distant locations, thus our reason for requesting for your services representation.","senderIP":"185.234.219.246","allowedCountries":["it","us"],"allowedLanguages":["en"]}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.oopspam.com/v1/spamdetection", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api.oopspam.com/v1/spamdetection", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("X-Api-Key", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/opencagedata/opencagedata.go b/pkg/detectors/opencagedata/opencagedata.goindex f8311569e..fdf942643 100644--- a/pkg/detectors/opencagedata/opencagedata.go+++ b/pkg/detectors/opencagedata/opencagedata.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.opencagedata.com/geocode/v1/json?q=12.8797,121.7740&key=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.opencagedata.com/geocode/v1/json?q=12.8797,121.7740&key=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/opengraphr/opengraphr.go b/pkg/detectors/opengraphr/opengraphr.goindex b379411a9..536742869 100644--- a/pkg/detectors/opengraphr/opengraphr.go+++ b/pkg/detectors/opengraphr/opengraphr.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.opengraphr.com/v1/og?api_token="+resMatch+"&url=https://www.marlonpamisa.com/", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.opengraphr.com/v1/og?api_token="+resMatch+"&url=https://www.marlonpamisa.com/", nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/openuv/openuv.go b/pkg/detectors/openuv/openuv.goindex e33d3aab5..62766b172 100644--- a/pkg/detectors/openuv/openuv.go+++ b/pkg/detectors/openuv/openuv.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.openuv.io/api/v1/uv?lat=-33.34&lng=115.342", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.openuv.io/api/v1/uv?lat=-33.34&lng=115.342", nil)+ if err != nil {+ continue+ }req.Header.Add("x-access-token", fmt.Sprintf("%s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/openweather/openweather.go b/pkg/detectors/openweather/openweather.goindex ee7278dc9..269822540 100644--- a/pkg/detectors/openweather/openweather.go+++ b/pkg/detectors/openweather/openweather.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.openweathermap.org/data/2.5/weather?id=524901&lang=fr&appid="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.openweathermap.org/data/2.5/weather?id=524901&lang=fr&appid="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/optimizely/optimizely.go b/pkg/detectors/optimizely/optimizely.goindex 500ec742c..024798de0 100644--- a/pkg/detectors/optimizely/optimizely.go+++ b/pkg/detectors/optimizely/optimizely.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.optimizely.com/v2/projects", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.optimizely.com/v2/projects", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/owlbot/owlbot.go b/pkg/detectors/owlbot/owlbot.goindex 881eebc5a..4b63892de 100644--- a/pkg/detectors/owlbot/owlbot.go+++ b/pkg/detectors/owlbot/owlbot.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://owlbot.info/api/v4/dictionary/security", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://owlbot.info/api/v4/dictionary/security", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Token %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/pagerdutyapikey/pagerdutyapikey.go b/pkg/detectors/pagerdutyapikey/pagerdutyapikey.goindex 43af96237..96c3ef908 100644--- a/pkg/detectors/pagerdutyapikey/pagerdutyapikey.go+++ b/pkg/detectors/pagerdutyapikey/pagerdutyapikey.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.pagerduty.com/users", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.pagerduty.com/users", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/vnd.pagerduty+json;version=2")req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Token %s", resMatch))diff --git a/pkg/detectors/pandadoc/pandadoc.go b/pkg/detectors/pandadoc/pandadoc.goindex 1f377e9f1..dfa8a7e08 100644--- a/pkg/detectors/pandadoc/pandadoc.go+++ b/pkg/detectors/pandadoc/pandadoc.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.pandadoc.com/public/v1/documents", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.pandadoc.com/public/v1/documents", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("API-Key %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/pandascore/pandascore.go b/pkg/detectors/pandascore/pandascore.goindex bf85078fe..456e391ee 100644--- a/pkg/detectors/pandascore/pandascore.go+++ b/pkg/detectors/pandascore/pandascore.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequest("GET", "https://api.pandascore.co/videogames", nil)+ req, err := http.NewRequest("GET", "https://api.pandascore.co/videogames", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/paralleldots/paralleldots.go b/pkg/detectors/paralleldots/paralleldots.goindex a2b5cc27a..0d1d3b073 100644--- a/pkg/detectors/paralleldots/paralleldots.go+++ b/pkg/detectors/paralleldots/paralleldots.go@@ -70,7 +70,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultcontinue}writer.Close()- req, _ := http.NewRequestWithContext(ctx, "POST", "https://apis.paralleldots.com/v4/intent", bytes.NewReader(payload.Bytes()))+ req, err := http.NewRequestWithContext(ctx, "POST", "https://apis.paralleldots.com/v4/intent", bytes.NewReader(payload.Bytes()))+ if err != nil {+ continue+ }req.Header.Add("Content-Type", writer.FormDataContentType())res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/partnerstack/partnerstack.go b/pkg/detectors/partnerstack/partnerstack.goindex db03d6e79..99679cdd9 100644--- a/pkg/detectors/partnerstack/partnerstack.go+++ b/pkg/detectors/partnerstack/partnerstack.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.partnerstack.com/api/v2/partnerships", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.partnerstack.com/api/v2/partnerships", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/passbase/passbase.go b/pkg/detectors/passbase/passbase.goindex 4421947b0..c3c7f8dde 100644--- a/pkg/detectors/passbase/passbase.go+++ b/pkg/detectors/passbase/passbase.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.passbase.com/verification/v1/settings", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.passbase.com/verification/v1/settings", nil)+ if err != nil {+ continue+ }req.Header.Add("X-API-KEY", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/pastebin/pastebin.go b/pkg/detectors/pastebin/pastebin.goindex 665d059a7..57681e112 100644--- a/pkg/detectors/pastebin/pastebin.go+++ b/pkg/detectors/pastebin/pastebin.go@@ -77,7 +77,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultcontinue}writer.Close()- req, _ := http.NewRequestWithContext(ctx, "POST", "https://pastebin.com/api/api_post.php", bytes.NewReader(body.Bytes()))+ req, err := http.NewRequestWithContext(ctx, "POST", "https://pastebin.com/api/api_post.php", bytes.NewReader(body.Bytes()))+ if err != nil {+ continue+ }req.Header.Add("Content-Type", writer.FormDataContentType())res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/paymoapp/paymoapp.go b/pkg/detectors/paymoapp/paymoapp.goindex 34cc2f861..f15c2dd6d 100644--- a/pkg/detectors/paymoapp/paymoapp.go+++ b/pkg/detectors/paymoapp/paymoapp.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.paymoapp.com/api/me", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://app.paymoapp.com/api/me", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/paymoapp/paymoapp/paymoapp.go b/pkg/detectors/paymoapp/paymoapp/paymoapp.goindex 34cc2f861..f15c2dd6d 100644--- a/pkg/detectors/paymoapp/paymoapp/paymoapp.go+++ b/pkg/detectors/paymoapp/paymoapp/paymoapp.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.paymoapp.com/api/me", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://app.paymoapp.com/api/me", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/paymongo/paymongo.go b/pkg/detectors/paymongo/paymongo.goindex 157295d44..bff72e4a2 100644--- a/pkg/detectors/paymongo/paymongo.go+++ b/pkg/detectors/paymongo/paymongo.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(`{"data":{"attributes":{"type":"paymaya"}}}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.paymongo.com/v1/payment_methods", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api.paymongo.com/v1/payment_methods", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.SetBasicAuth(resMatch, "")res, err := client.Do(req)diff --git a/pkg/detectors/paypaloauth/paypaloauth.go b/pkg/detectors/paypaloauth/paypaloauth.goindex 3e21c0446..53070b395 100644--- a/pkg/detectors/paypaloauth/paypaloauth.go+++ b/pkg/detectors/paypaloauth/paypaloauth.go@@ -59,7 +59,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultdata := fmt.Sprintf("%s:%s", residMatch, resMatch)encoded := b64.StdEncoding.EncodeToString([]byte(data))payload := strings.NewReader("grant_type=client_credentials")- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api-m.sandbox.paypal.com/v1/oauth2/token", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api-m.sandbox.paypal.com/v1/oauth2/token", payload)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("Accept-Language", "en_US")req.Header.Add("Content-Type", "application/x-www-form-urlencoded")diff --git a/pkg/detectors/paystack/paystack.go b/pkg/detectors/paystack/paystack.goindex ce6d17ef4..bda350845 100644--- a/pkg/detectors/paystack/paystack.go+++ b/pkg/detectors/paystack/paystack.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.paystack.co/customer", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.paystack.co/customer", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/pdflayer/pdflayer.go b/pkg/detectors/pdflayer/pdflayer.goindex 0bd108ea4..d35a10806 100644--- a/pkg/detectors/pdflayer/pdflayer.go+++ b/pkg/detectors/pdflayer/pdflayer.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.pdflayer.com/api/convert?access_key=%s&document_url=https://pdflayer.com/downloads/invoice.html", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.pdflayer.com/api/convert?access_key=%s&document_url=https://pdflayer.com/downloads/invoice.html", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {bodyBytes, err := ioutil.ReadAll(res.Body)diff --git a/pkg/detectors/pdfshift/pdfshift.go b/pkg/detectors/pdfshift/pdfshift.goindex 0e734480c..0d64283c2 100644--- a/pkg/detectors/pdfshift/pdfshift.go+++ b/pkg/detectors/pdfshift/pdfshift.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.pdfshift.io/v3/credits/usage", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.pdfshift.io/v3/credits/usage", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.SetBasicAuth("api", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/peopledatalabs/peopledatalabs.go b/pkg/detectors/peopledatalabs/peopledatalabs.goindex 5ce0b17fa..04fa8d9a2 100644--- a/pkg/detectors/peopledatalabs/peopledatalabs.go+++ b/pkg/detectors/peopledatalabs/peopledatalabs.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.peopledatalabs.com/v5/person/enrich?min_likelihood=6&profile=https://linkedin.com/in/williamhgates", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.peopledatalabs.com/v5/person/enrich?min_likelihood=6&profile=https://linkedin.com/in/williamhgates", nil)+ if err != nil {+ continue+ }req.Header.Add("X-Api-Key", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/peopledatalabs/peopledatalabs/peopledatalabs.go b/pkg/detectors/peopledatalabs/peopledatalabs/peopledatalabs.goindex 6c3e8318e..53f1710c3 100644--- a/pkg/detectors/peopledatalabs/peopledatalabs/peopledatalabs.go+++ b/pkg/detectors/peopledatalabs/peopledatalabs/peopledatalabs.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.peopledatalabs.com/v5/person/enrich?min_likelihood=6&profile=http://linkedin.com/in/williamhgates", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.peopledatalabs.com/v5/person/enrich?min_likelihood=6&profile=http://linkedin.com/in/williamhgates", nil)+ if err != nil {+ continue+ }req.Header.Add("X-Api-Key", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/pepipost/pepipost.go b/pkg/detectors/pepipost/pepipost.goindex c49335f4f..4337620ae 100644--- a/pkg/detectors/pepipost/pepipost.go+++ b/pkg/detectors/pepipost/pepipost.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.pepipost.com/v5.1/domain/getDomains?domain=pepisandbox.com", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.pepipost.com/v5.1/domain/getDomains?domain=pepisandbox.com", nil)+ if err != nil {+ continue+ }req.Header.Add("api_key", fmt.Sprintf("%s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/pipedream/pipedream.go b/pkg/detectors/pipedream/pipedream.goindex 03ac6bbbb..5d9b4bc72 100644--- a/pkg/detectors/pipedream/pipedream.go+++ b/pkg/detectors/pipedream/pipedream.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 15 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequest("GET", "https://api.pipedream.com/v1/users/me", nil)+ req, err := http.NewRequest("GET", "https://api.pipedream.com/v1/users/me", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/pipedrive/pipedrive.go b/pkg/detectors/pipedrive/pipedrive.goindex 7112e9ab8..188f491ca 100644--- a/pkg/detectors/pipedrive/pipedrive.go+++ b/pkg/detectors/pipedrive/pipedrive.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://hooman.pipedrive.com/api/v1/users?api_token="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://hooman.pipedrive.com/api/v1/users?api_token="+resMatch, nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/pivotaltracker/pivotaltracker.go b/pkg/detectors/pivotaltracker/pivotaltracker.goindex bd6478e94..a13663c84 100644--- a/pkg/detectors/pivotaltracker/pivotaltracker.go+++ b/pkg/detectors/pivotaltracker/pivotaltracker.go@@ -50,7 +50,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {client := common.SaneHttpClient()// https://www.pivotaltracker.com/help/api/rest/v5#top- req, _ := http.NewRequestWithContext(ctx, "GET", "https://www.pivotaltracker.com/services/v5/me", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://www.pivotaltracker.com/services/v5/me", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json; charset=utf-8")req.Header.Add("X-TrackerToken", token)res, err := client.Do(req)diff --git a/pkg/detectors/pixabay/pixabay.go b/pkg/detectors/pixabay/pixabay.goindex 39572ac53..e6a103f00 100644--- a/pkg/detectors/pixabay/pixabay.go+++ b/pkg/detectors/pixabay/pixabay.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://pixabay.com/api/?key=%s&q=yellow+flowers&image_type=photo", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://pixabay.com/api/?key=%s&q=yellow+flowers&image_type=photo", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/plaidkey/plaidkey.go b/pkg/detectors/plaidkey/plaidkey.goindex 7ad31fbe2..21382f234 100644--- a/pkg/detectors/plaidkey/plaidkey.go+++ b/pkg/detectors/plaidkey/plaidkey.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(`{"client_id":"` + idresMatch + `","secret":"` + resMatch + `","user":{"client_user_id":"60e3ee4019a2660010f8bc54","phone_number_verified_time":"0001-01-01T00:00:00Z","email_address_verified_time":"0001-01-01T00:00:00Z"},"client_name":"Plaid Test App","products":["auth","transactions"],"country_codes":["US"],"webhook":"https://webhook-uri.com","account_filters":{"depository":{"account_subtypes":["checking","savings"]}},"language":"en","link_customization_name":"default"}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://development.plaid.com/link/token/create", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://development.plaid.com/link/token/create", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/planviewleankit/planviewleankit.go b/pkg/detectors/planviewleankit/planviewleankit.goindex 5eae14e0b..a2350d267 100644--- a/pkg/detectors/planviewleankit/planviewleankit.go+++ b/pkg/detectors/planviewleankit/planviewleankit.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequest("GET", fmt.Sprintf("https://%s.leankit.com/io/account", resSubdomainMatch), nil)+ req, err := http.NewRequest("GET", fmt.Sprintf("https://%s.leankit.com/io/account", resSubdomainMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/planyo/planyo.go b/pkg/detectors/planyo/planyo.goindex ac3562916..65c38485b 100644--- a/pkg/detectors/planyo/planyo.go+++ b/pkg/detectors/planyo/planyo.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://www.planyo.com/rest/?method=get_site_info&api_key=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://www.planyo.com/rest/?method=get_site_info&api_key=%s", resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/vnd.planyo+json; version=3")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/plivo/plivo.go b/pkg/detectors/plivo/plivo.goindex a8b7ec5ab..34b4e27ea 100644--- a/pkg/detectors/plivo/plivo.go+++ b/pkg/detectors/plivo/plivo.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultstringResMatch := fmt.Sprintf("%s:%s", id, resMatch)decodeSecret := b64.StdEncoding.EncodeToString([]byte(stringResMatch))if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.plivo.com/v1/Account/"+id+"/Number/", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.plivo.com/v1/Account/"+id+"/Number/", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", decodeSecret))res, err := client.Do(req)diff --git a/pkg/detectors/poloniex/poloniex.go b/pkg/detectors/poloniex/poloniex.goindex ed440e4a7..059bf6d00 100644--- a/pkg/detectors/poloniex/poloniex.go+++ b/pkg/detectors/poloniex/poloniex.go@@ -70,7 +70,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultsignature := getPoloniexSignature(resSecretMatch, payload.Encode())- req, _ := http.NewRequestWithContext(ctx, "POST", "https://poloniex.com/tradingApi", strings.NewReader(payload.Encode()))+ req, err := http.NewRequestWithContext(ctx, "POST", "https://poloniex.com/tradingApi", strings.NewReader(payload.Encode()))+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/x-www-form-urlencoded")req.Header.Add("Key", resMatch)req.Header.Add("Sign", signature)diff --git a/pkg/detectors/polygon/polygon.go b/pkg/detectors/polygon/polygon.goindex 7c9e574a3..71292b502 100644--- a/pkg/detectors/polygon/polygon.go+++ b/pkg/detectors/polygon/polygon.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.polygon.io/v2/reference/locales?apiKey="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.polygon.io/v2/reference/locales?apiKey="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/positionstack/positionstack.go b/pkg/detectors/positionstack/positionstack.goindex db4612671..89bbba695 100644--- a/pkg/detectors/positionstack/positionstack.go+++ b/pkg/detectors/positionstack/positionstack.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.positionstack.com/v1/forward?access_key=%s&query=Philippines", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.positionstack.com/v1/forward?access_key=%s&query=Philippines", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/postageapp/postageapp.go b/pkg/detectors/postageapp/postageapp.goindex ae129e1b9..3305d17b0 100644--- a/pkg/detectors/postageapp/postageapp.go+++ b/pkg/detectors/postageapp/postageapp.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.postageapp.com/v.1.0/get_account_info.json?api_key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api.postageapp.com/v.1.0/get_account_info.json?api_key="+resMatch, nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Transfer-Encoding", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/posthog/posthog.go b/pkg/detectors/posthog/posthog.goindex b8f6bcdf9..e56f10fb1 100644--- a/pkg/detectors/posthog/posthog.go+++ b/pkg/detectors/posthog/posthog.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result"api_key": "` + resMatch + `","distinct_id": "1234"}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://app.posthog.com/decide/", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://app.posthog.com/decide/", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/postman/postman.go b/pkg/detectors/postman/postman.goindex fb9428139..1be98918a 100644--- a/pkg/detectors/postman/postman.go+++ b/pkg/detectors/postman/postman.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.getpostman.com/collections", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.getpostman.com/collections", nil)+ if err != nil {+ continue+ }req.Header.Add("x-api-key", fmt.Sprintf("%s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/postmark/postmark.go b/pkg/detectors/postmark/postmark.goindex 0f200694a..557a00fa5 100644--- a/pkg/detectors/postmark/postmark.go+++ b/pkg/detectors/postmark/postmark.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.postmarkapp.com/deliverystats", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.postmarkapp.com/deliverystats", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("Content-Type", "application/json")req.Header.Add("X-Postmark-Server-Token", fmt.Sprintf("%s", resMatch))diff --git a/pkg/detectors/powrbot/powrbot.go b/pkg/detectors/powrbot/powrbot.goindex e7c6abdf4..3d5598ba9 100644--- a/pkg/detectors/powrbot/powrbot.go+++ b/pkg/detectors/powrbot/powrbot.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://powrbot.com/api/v1/search/single/?company=Apple", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://powrbot.com/api/v1/search/single/?company=Apple", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("secret-key %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/prospectcrm/prospectcrm.go b/pkg/detectors/prospectcrm/prospectcrm.goindex 37d91a3e2..b1321ab1e 100644--- a/pkg/detectors/prospectcrm/prospectcrm.go+++ b/pkg/detectors/prospectcrm/prospectcrm.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api-batch-v1.prospect365.com/Contacts", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api-batch-v1.prospect365.com/Contacts", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/prospectio/prospectio.go b/pkg/detectors/prospectio/prospectio.goindex 03bb9bda5..7014e784a 100644--- a/pkg/detectors/prospectio/prospectio.go+++ b/pkg/detectors/prospectio/prospectio.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.prospect.io/public/v1/prospects", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.prospect.io/public/v1/prospects", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("%s", resMatch))req.Header.Add("Content-Type", "application/vnd.api+json; charset=utf-8")res, err := client.Do(req)diff --git a/pkg/detectors/protocolsio/protocolsio.go b/pkg/detectors/protocolsio/protocolsio.goindex a6bcaedcf..d689026b2 100644--- a/pkg/detectors/protocolsio/protocolsio.go+++ b/pkg/detectors/protocolsio/protocolsio.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://www.protocols.io/api/v3/session/profile", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://www.protocols.io/api/v3/session/profile", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/proxycrawl/proxycrawl.go b/pkg/detectors/proxycrawl/proxycrawl.goindex 2ad785ddf..15d3e8ccd 100644--- a/pkg/detectors/proxycrawl/proxycrawl.go+++ b/pkg/detectors/proxycrawl/proxycrawl.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 10 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.proxycrawl.com/leads?token=%s&domain=slack.com", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.proxycrawl.com/leads?token=%s&domain=slack.com", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/pubnubpublishkey/pubnubpublishkey.go b/pkg/detectors/pubnubpublishkey/pubnubpublishkey.goindex d04ede5bb..96488ae87 100644--- a/pkg/detectors/pubnubpublishkey/pubnubpublishkey.go+++ b/pkg/detectors/pubnubpublishkey/pubnubpublishkey.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://ps.pndsn.com/signal/"+resMatch+"/"+ressubMatch+"/0/ch1/0/%22typing_on%22?uuid=user-123", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://ps.pndsn.com/signal/"+resMatch+"/"+ressubMatch+"/0/ch1/0/%22typing_on%22?uuid=user-123", nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/pubnubsubscriptionkey/pubnubsubscriptionkey.go b/pkg/detectors/pubnubsubscriptionkey/pubnubsubscriptionkey.goindex d0d2d7b74..09a373c05 100644--- a/pkg/detectors/pubnubsubscriptionkey/pubnubsubscriptionkey.go+++ b/pkg/detectors/pubnubsubscriptionkey/pubnubsubscriptionkey.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://ps.pndsn.com/v2/objects/"+resMatch+"/uuids", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://ps.pndsn.com/v2/objects/"+resMatch+"/uuids", nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/purestake/purestake.go b/pkg/detectors/purestake/purestake.goindex 0ecd29114..7e5fa3498 100644--- a/pkg/detectors/purestake/purestake.go+++ b/pkg/detectors/purestake/purestake.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://testnet-algorand.api.purestake.io/idx2/health", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://testnet-algorand.api.purestake.io/idx2/health", nil)+ if err != nil {+ continue+ }req.Header.Add("x-api-key", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/pushbulletapikey/pushbulletapikey.go b/pkg/detectors/pushbulletapikey/pushbulletapikey.goindex ba64484cb..098060480 100644--- a/pkg/detectors/pushbulletapikey/pushbulletapikey.go+++ b/pkg/detectors/pushbulletapikey/pushbulletapikey.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.pushbullet.com/v2/users/me", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.pushbullet.com/v2/users/me", nil)+ if err != nil {+ continue+ }req.Header.Add("Access-Token", fmt.Sprintf("%s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/pusherchannelkey/pusherchannelkey.go b/pkg/detectors/pusherchannelkey/pusherchannelkey.goindex 5e7f9f6ee..95ebd3b2e 100644--- a/pkg/detectors/pusherchannelkey/pusherchannelkey.go+++ b/pkg/detectors/pusherchannelkey/pusherchannelkey.go@@ -100,7 +100,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultmd5Str := "https://api-ap1.pusher.com/apps/" + resappMatch + "/events?auth_key=" + reskeyMatch + "&auth_signature=" + signature + "&auth_timestamp=" + timestamp + "&auth_version=1.0&body_md5=" + md5- req, _ := http.NewRequestWithContext(ctx, method, md5Str, payload)+ req, err := http.NewRequestWithContext(ctx, method, md5Str, payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/qualaroo/qualaroo.go b/pkg/detectors/qualaroo/qualaroo.goindex 3b7ba2399..3491c0796 100644--- a/pkg/detectors/qualaroo/qualaroo.go+++ b/pkg/detectors/qualaroo/qualaroo.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.qualaroo.com/api/v1/nudges", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.qualaroo.com/api/v1/nudges", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/qubole/qubole.go b/pkg/detectors/qubole/qubole.goindex cb3b2c00e..46c5a86ce 100644--- a/pkg/detectors/qubole/qubole.go+++ b/pkg/detectors/qubole/qubole.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://us.qubole.com/api/v1.2/account", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://us.qubole.com/api/v1.2/account", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Accept", "application/json")req.Header.Add("X-AUTH-TOKEN", fmt.Sprintf("%s", resMatch))diff --git a/pkg/detectors/quickmetrics/quickmetrics.go b/pkg/detectors/quickmetrics/quickmetrics.goindex d3229c23c..bf4286ff2 100644--- a/pkg/detectors/quickmetrics/quickmetrics.go+++ b/pkg/detectors/quickmetrics/quickmetrics.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(`[{"name":"api.response.time","dimension":null,"values":[[1568319841,12.4],[1568319856,9.3],[1568319860,234],[1568319863,3.2]]},{"name":"click.color","dimension":"green","values":[[1568319841,1],[1568319856,1],[1568319860,1],[1568319863,1]]}]`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://qckm.io/list", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://qckm.io/list", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("x-qm-key", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/rapidapi/rapidapi.go b/pkg/detectors/rapidapi/rapidapi.goindex c5365ce50..ff04385cd 100644--- a/pkg/detectors/rapidapi/rapidapi.go+++ b/pkg/detectors/rapidapi/rapidapi.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://covid-19-tracking.p.rapidapi.com/v1", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://covid-19-tracking.p.rapidapi.com/v1", nil)+ if err != nil {+ continue+ }req.Header.Add("x-rapidapi-key", fmt.Sprintf("%s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/raven/raven.go b/pkg/detectors/raven/raven.goindex 31e8036fa..af38366c1 100644--- a/pkg/detectors/raven/raven.go+++ b/pkg/detectors/raven/raven.go@@ -50,7 +50,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.raventools.com/api?key=%s&method=profile_info&format=json", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.raventools.com/api?key=%s&method=profile_info&format=json", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {bodyBytes, err := ioutil.ReadAll(res.Body)diff --git a/pkg/detectors/rawg/rawg.go b/pkg/detectors/rawg/rawg.goindex 1df245ade..681d8b9da 100644--- a/pkg/detectors/rawg/rawg.go+++ b/pkg/detectors/rawg/rawg.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.rawg.io/api/platforms?key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.rawg.io/api/platforms?key="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/readme/readme.go b/pkg/detectors/readme/readme.goindex 30c10b98c..3e7143b4c 100644--- a/pkg/detectors/readme/readme.go+++ b/pkg/detectors/readme/readme.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://dash.readme.com/api/v1", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://dash.readme.com/api/v1", nil)+ if err != nil {+ continue+ }req.SetBasicAuth(resMatch, "")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/reallysimplesystems/reallysimplesystems.go b/pkg/detectors/reallysimplesystems/reallysimplesystems.goindex 80dd94786..2a3a05bf1 100644--- a/pkg/detectors/reallysimplesystems/reallysimplesystems.go+++ b/pkg/detectors/reallysimplesystems/reallysimplesystems.go@@ -50,7 +50,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://apiv4.reallysimplesystems.com/accounts", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://apiv4.reallysimplesystems.com/accounts", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/rebrandly/rebrandly.go b/pkg/detectors/rebrandly/rebrandly.goindex 8f71f7a2d..2f5131783 100644--- a/pkg/detectors/rebrandly/rebrandly.go+++ b/pkg/detectors/rebrandly/rebrandly.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.rebrandly.com/v1/account", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.rebrandly.com/v1/account", nil)+ if err != nil {+ continue+ }req.Header.Add("apikey", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/refiner/refiner.go b/pkg/detectors/refiner/refiner.goindex 1d224ff8d..6ea1e9cab 100644--- a/pkg/detectors/refiner/refiner.go+++ b/pkg/detectors/refiner/refiner.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader("id=Your-User-Id&event=Your%20event%20name")- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.refiner.io/v1/identify-user", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api.refiner.io/v1/identify-user", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/x-www-form-urlencoded")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/repairshopr/repairshopr.go b/pkg/detectors/repairshopr/repairshopr.goindex 1df00a10d..b6a621d27 100644--- a/pkg/detectors/repairshopr/repairshopr.go+++ b/pkg/detectors/repairshopr/repairshopr.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequest("GET", "https://"+resDomainMatch+".repairshopr.com/api/v1/appointment_types", nil)+ req, err := http.NewRequest("GET", "https://"+resDomainMatch+".repairshopr.com/api/v1/appointment_types", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/vnd.sugester+json; version=3")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))diff --git a/pkg/detectors/restpack/restpack.go b/pkg/detectors/restpack/restpack.goindex d326f1987..b11ed85c4 100644--- a/pkg/detectors/restpack/restpack.go+++ b/pkg/detectors/restpack/restpack.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://restpack.io/api/screenshot/usage?access_token=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://restpack.io/api/screenshot/usage?access_token=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/restpackhtmltopdfapi/restpackhtmltopdfapi.go b/pkg/detectors/restpackhtmltopdfapi/restpackhtmltopdfapi.goindex 1d370f204..b6d5efc2a 100644--- a/pkg/detectors/restpackhtmltopdfapi/restpackhtmltopdfapi.go+++ b/pkg/detectors/restpackhtmltopdfapi/restpackhtmltopdfapi.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://restpack.io/api/html2pdf/usage", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://restpack.io/api/html2pdf/usage", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("X-Access-Token", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/restpackscreenshotapi/restpackscreenshotapi.go b/pkg/detectors/restpackscreenshotapi/restpackscreenshotapi.goindex bfc31ccb7..e337178f7 100644--- a/pkg/detectors/restpackscreenshotapi/restpackscreenshotapi.go+++ b/pkg/detectors/restpackscreenshotapi/restpackscreenshotapi.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://restpack.io/api/screenshot/usage", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://restpack.io/api/screenshot/usage", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("X-Access-Token", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/rev/rev.go b/pkg/detectors/rev/rev.goindex ad51c6f1e..c62ad3538 100644--- a/pkg/detectors/rev/rev.go+++ b/pkg/detectors/rev/rev.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://www.rev.com/api/v1/orders", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://www.rev.com/api/v1/orders", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Rev %s:%s", resClientMatch, resUserMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/revampcrm/revampcrm.go b/pkg/detectors/revampcrm/revampcrm.goindex 47934d0fa..e03d08837 100644--- a/pkg/detectors/revampcrm/revampcrm.go+++ b/pkg/detectors/revampcrm/revampcrm.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultRaw: []byte(tokenPatMatch),}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.revampcrm.com/api/1.0/User/WhoAmI", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://app.revampcrm.com/api/1.0/User/WhoAmI", nil)+ if err != nil {+ continue+ }req.SetBasicAuth(userPatMatch, tokenPatMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/ringcentral/ringcentral.go b/pkg/detectors/ringcentral/ringcentral.goindex 5c92c750e..2f528c86d 100644--- a/pkg/detectors/ringcentral/ringcentral.go+++ b/pkg/detectors/ringcentral/ringcentral.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://platform.devtest.ringcentral.com/restapi/oauth/authorize?response_type=code&redirect_uri=%s&client_id=%s", resURI, resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://platform.devtest.ringcentral.com/restapi/oauth/authorize?response_type=code&redirect_uri=%s&client_id=%s", resURI, resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/ritekit/ritekit.go b/pkg/detectors/ritekit/ritekit.goindex b3af34805..9359396eb 100644--- a/pkg/detectors/ritekit/ritekit.go+++ b/pkg/detectors/ritekit/ritekit.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.ritekit.com/v1/stats/multiple-hashtags?tags=hello&client_id=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.ritekit.com/v1/stats/multiple-hashtags?tags=hello&client_id=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/roaring/roaring.go b/pkg/detectors/roaring/roaring.goindex 6dd6a79c5..8e17db7c8 100644--- a/pkg/detectors/roaring/roaring.go+++ b/pkg/detectors/roaring/roaring.go@@ -60,7 +60,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultdata := fmt.Sprintf("%s:%s", resClient, resSecret)sEnc := b64.StdEncoding.EncodeToString([]byte(data))payload := strings.NewReader("grant_type=client_credentials")- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.roaring.io/token", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api.roaring.io/token", payload)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/rocketreach/rocketreach.go b/pkg/detectors/rocketreach/rocketreach.goindex c643da7b7..ce79b5e40 100644--- a/pkg/detectors/rocketreach/rocketreach.go+++ b/pkg/detectors/rocketreach/rocketreach.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.rocketreach.co/v2/api/account", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.rocketreach.co/v2/api/account", nil)+ if err != nil {+ continue+ }req.Header.Add("Api-Key", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/roninapp/roninapp.go b/pkg/detectors/roninapp/roninapp.goindex d4aa669ba..3450506b0 100644--- a/pkg/detectors/roninapp/roninapp.go+++ b/pkg/detectors/roninapp/roninapp.go@@ -59,7 +59,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:", resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://"+resIdMatch+".roninapp.com/api/v2/invoices", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://"+resIdMatch+".roninapp.com/api/v2/invoices", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)diff --git a/pkg/detectors/route4me/route4me.go b/pkg/detectors/route4me/route4me.goindex 14c1860ea..a8ae33b04 100644--- a/pkg/detectors/route4me/route4me.go+++ b/pkg/detectors/route4me/route4me.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.route4me.com/api.v4/address_book.php?api_key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.route4me.com/api.v4/address_book.php?api_key="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/rownd/rownd.go b/pkg/detectors/rownd/rownd.goindex cd4aaebb6..3be6496de 100644--- a/pkg/detectors/rownd/rownd.go+++ b/pkg/detectors/rownd/rownd.go@@ -65,7 +65,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.rownd.io/applications/"+resId+"/users/data", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.rownd.io/applications/"+resId+"/users/data", nil)+ if err != nil {+ continue+ }req.Header.Add("x-rownd-app-key", keyMatch)req.Header.Add("x-rownd-app-secret", secretMatch)res, err := client.Do(req)diff --git a/pkg/detectors/rubygems/rubygems.go b/pkg/detectors/rubygems/rubygems.goindex c3cd02288..c73545e85 100644--- a/pkg/detectors/rubygems/rubygems.go+++ b/pkg/detectors/rubygems/rubygems.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://rubygems.org/api/v1/gems", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://rubygems.org/api/v1/gems", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "*/*")req.Header.Add("Authorization", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/runrunit/runrunit.go b/pkg/detectors/runrunit/runrunit.goindex eefb3df39..5f8f504db 100644--- a/pkg/detectors/runrunit/runrunit.go+++ b/pkg/detectors/runrunit/runrunit.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://runrun.it/api/v1.0/users", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://runrun.it/api/v1.0/users", nil)+ if err != nil {+ continue+ }req.Header.Add("App-Key", resMatch)req.Header.Add("User-Token", resUserTokenMatch)res, err := client.Do(req)diff --git a/pkg/detectors/salesblink/salesblink.go b/pkg/detectors/salesblink/salesblink.goindex 41ce26ac6..fcb30b7eb 100644--- a/pkg/detectors/salesblink/salesblink.go+++ b/pkg/detectors/salesblink/salesblink.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://run.salesblink.io/api/campaigns", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://run.salesblink.io/api/campaigns", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/salescookie/salescookie.go b/pkg/detectors/salescookie/salescookie.goindex e64c15306..e5f415626 100644--- a/pkg/detectors/salescookie/salescookie.go+++ b/pkg/detectors/salescookie/salescookie.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(`{"date":"2021-07-04T02:47:42.1442597Z","uniqueId":"id-123","revenue":1.3,"profit":-2.5,"currency":"USD","transactionStatus":"closed won","customer":"Candy By Mail","product":"Lemon Cake","owner1":"John Doe","owner2":"Jane Doe","owner3":"Bob Smith","team1":"USA","team2":"Washington","team3":"98004","quantity":3,"costPerUnit":3.14,"taxes":6.54,"otherText1":"additional data","otherText2":"more data","otherText3":"even more data","otherNumeric1":123.45,"otherNumeric2":54.321,"otherNumeric3":-98.76,"otherDate1":"2019-01-03T06:03:01Z","otherDate2":"2019-05-10T08:05:09Z","otherDate3":"2019-09-04T12:17:33Z"}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://salescookie.com/app/Api/CreateTransaction", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://salescookie.com/app/Api/CreateTransaction", payload)+ if err != nil {+ continue+ }req.Header.Add("X-ApiKey", resMatch)req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)diff --git a/pkg/detectors/salesflare/salesflare.go b/pkg/detectors/salesflare/salesflare.goindex 04f091fe0..40f66f951 100644--- a/pkg/detectors/salesflare/salesflare.go+++ b/pkg/detectors/salesflare/salesflare.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.salesflare.com/me/contacts", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.salesflare.com/me/contacts", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/satismeterprojectkey/satismeterprojectkey.go b/pkg/detectors/satismeterprojectkey/satismeterprojectkey.goindex 7283dc5c3..c202202ee 100644--- a/pkg/detectors/satismeterprojectkey/satismeterprojectkey.go+++ b/pkg/detectors/satismeterprojectkey/satismeterprojectkey.go@@ -69,7 +69,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultdata := fmt.Sprintf("%s:%s", resEmailMatch, resPassMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.satismeter.com/api/users?project="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://app.satismeter.com/api/users?project="+resMatch, nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/satismeterwritekey/satismeterwritekey.go b/pkg/detectors/satismeterwritekey/satismeterwritekey.goindex 435576949..849f08722 100644--- a/pkg/detectors/satismeterwritekey/satismeterwritekey.go+++ b/pkg/detectors/satismeterwritekey/satismeterwritekey.go@@ -53,7 +53,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result"event": "This is the event name","writeKey": "` + resMatch + `"}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://app.satismeter.com/api/users?type=track", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://app.satismeter.com/api/users?type=track", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/saucelabs/saucelabs.go b/pkg/detectors/saucelabs/saucelabs.goindex fb2861c04..8f1129d23 100644--- a/pkg/detectors/saucelabs/saucelabs.go+++ b/pkg/detectors/saucelabs/saucelabs.go@@ -61,7 +61,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:%s", idMatch, keyMatch)encoded := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.eu-central-1.saucelabs.com/team-management/v1/teams", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.eu-central-1.saucelabs.com/team-management/v1/teams", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", encoded))//req.SetBasicAuth(idMatch, keyMatch)res, err := client.Do(req)diff --git a/pkg/detectors/scalewaykey/scalewaykey.go b/pkg/detectors/scalewaykey/scalewaykey.goindex 2fc9b3100..cfbdce810 100644--- a/pkg/detectors/scalewaykey/scalewaykey.go+++ b/pkg/detectors/scalewaykey/scalewaykey.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.scaleway.com/instance/v1/zones/fr-par-1/servers", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.scaleway.com/instance/v1/zones/fr-par-1/servers", nil)+ if err != nil {+ continue+ }req.Header.Add("X-Auth-Token", fmt.Sprintf("%s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/scrapeowl/scrapeowl.go b/pkg/detectors/scrapeowl/scrapeowl.goindex e4222f277..09dd5b62a 100644--- a/pkg/detectors/scrapeowl/scrapeowl.go+++ b/pkg/detectors/scrapeowl/scrapeowl.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.scrapeowl.com/v1/scrape?api_key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.scrapeowl.com/v1/scrape?api_key="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/scraperapi/scraperapi.go b/pkg/detectors/scraperapi/scraperapi.goindex bce3becb9..f838805b9 100644--- a/pkg/detectors/scraperapi/scraperapi.go+++ b/pkg/detectors/scraperapi/scraperapi.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 15 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.scraperapi.com?api_key=%s&url=google.com", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.scraperapi.com?api_key=%s&url=google.com", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/scraperbox/scraperbox.go b/pkg/detectors/scraperbox/scraperbox.goindex 6670e37d9..1789af113 100644--- a/pkg/detectors/scraperbox/scraperbox.go+++ b/pkg/detectors/scraperbox/scraperbox.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 10 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.scraperbox.com/scrape?token=%s&url=https://google.com", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.scraperbox.com/scrape?token=%s&url=https://google.com", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/scrapersite/scrapersite.go b/pkg/detectors/scrapersite/scrapersite.goindex b63abdad4..e00f40dc7 100644--- a/pkg/detectors/scrapersite/scrapersite.go+++ b/pkg/detectors/scrapersite/scrapersite.go@@ -52,7 +52,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 10 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://scrapersite.com/api-v1?api_key=%s&url=https://google.com", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://scrapersite.com/api-v1?api_key=%s&url=https://google.com", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {bodyBytes, _ := ioutil.ReadAll(res.Body)diff --git a/pkg/detectors/scrapestack/scrapestack.go b/pkg/detectors/scrapestack/scrapestack.goindex 42985b4de..03513b502 100644--- a/pkg/detectors/scrapestack/scrapestack.go+++ b/pkg/detectors/scrapestack/scrapestack.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.scrapestack.com/scrape?access_key=%s&url=https://apple.com", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.scrapestack.com/scrape?access_key=%s&url=https://apple.com", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {bodyBytes, err := ioutil.ReadAll(res.Body)diff --git a/pkg/detectors/scrapfly/scrapfly.go b/pkg/detectors/scrapfly/scrapfly.goindex b99358aac..588d83d84 100644--- a/pkg/detectors/scrapfly/scrapfly.go+++ b/pkg/detectors/scrapfly/scrapfly.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 10 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.scrapfly.io/scrape?key=%s&url=https://google.com", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.scrapfly.io/scrape?key=%s&url=https://google.com", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/scrapingant/scrapingant.go b/pkg/detectors/scrapingant/scrapingant.goindex 7371fbce8..5f594f377 100644--- a/pkg/detectors/scrapingant/scrapingant.go+++ b/pkg/detectors/scrapingant/scrapingant.go@@ -50,7 +50,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 10 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.scrapingant.com/v1/general?url=google.com", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.scrapingant.com/v1/general?url=google.com", nil)+ if err != nil {+ continue+ }req.Header.Add("x-api-key", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/scrapingbee/scrapingbee.go b/pkg/detectors/scrapingbee/scrapingbee.goindex 543da18b8..e35ab5135 100644--- a/pkg/detectors/scrapingbee/scrapingbee.go+++ b/pkg/detectors/scrapingbee/scrapingbee.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.scrapingbee.com/api/v1/?api_key="+resMatch+"&url=https://httpbin.org/anything?json&render_js=false", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://app.scrapingbee.com/api/v1/?api_key="+resMatch+"&url=https://httpbin.org/anything?json&render_js=false", nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/screenshotapi/screenshotapi.go b/pkg/detectors/screenshotapi/screenshotapi.goindex 517d3a0c4..aea7dacb0 100644--- a/pkg/detectors/screenshotapi/screenshotapi.go+++ b/pkg/detectors/screenshotapi/screenshotapi.go@@ -50,7 +50,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 10 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequestWithContext(ctx, "GET", "https://shot.screenshotapi.net/screenshot?token="+resMatch+"&url=https://google.com&width=1920&height=1080&output=image", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://shot.screenshotapi.net/screenshot?token="+resMatch+"&url=https://google.com&width=1920&height=1080&output=image", nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/screenshotlayer/screenshotlayer.go b/pkg/detectors/screenshotlayer/screenshotlayer.goindex 45b24c84b..bb460e948 100644--- a/pkg/detectors/screenshotlayer/screenshotlayer.go+++ b/pkg/detectors/screenshotlayer/screenshotlayer.go@@ -52,7 +52,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 10 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.screenshotlayer.com/api/capture?access_key=%s&url=https://google.com", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.screenshotlayer.com/api/capture?access_key=%s&url=https://google.com", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {bodyBytes, err := ioutil.ReadAll(res.Body)diff --git a/pkg/detectors/securitytrails/securitytrails.go b/pkg/detectors/securitytrails/securitytrails.goindex fbef1b4c2..de674bfd4 100644--- a/pkg/detectors/securitytrails/securitytrails.go+++ b/pkg/detectors/securitytrails/securitytrails.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.securitytrails.com/v1/ping", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.securitytrails.com/v1/ping", nil)+ if err != nil {+ continue+ }req.Header.Add("APIKEY", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/segmentapikey/segmentapikey.go b/pkg/detectors/segmentapikey/segmentapikey.goindex 8dcdda1e2..b8323126d 100644--- a/pkg/detectors/segmentapikey/segmentapikey.go+++ b/pkg/detectors/segmentapikey/segmentapikey.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://platform.segmentapis.com/v1beta/workspaces", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://platform.segmentapis.com/v1beta/workspaces", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/selectpdf/selectpdf.go b/pkg/detectors/selectpdf/selectpdf.goindex 57ff92d31..8d5dbfef6 100644--- a/pkg/detectors/selectpdf/selectpdf.go+++ b/pkg/detectors/selectpdf/selectpdf.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 10 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://selectpdf.com/api2/convert/?key=%s&url=google.com", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://selectpdf.com/api2/convert/?key=%s&url=google.com", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/semaphore/semaphore.go b/pkg/detectors/semaphore/semaphore.goindex 2b1fd099c..295b87f39 100644--- a/pkg/detectors/semaphore/semaphore.go+++ b/pkg/detectors/semaphore/semaphore.go@@ -53,7 +53,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.semaphore.co/api/v4/account?apikey=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.semaphore.co/api/v4/account?apikey=%s", resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/vnd.semaphore+json; version=3")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/sendbird/sendbird.go b/pkg/detectors/sendbird/sendbird.goindex 312c7592b..3c78496c0 100644--- a/pkg/detectors/sendbird/sendbird.go+++ b/pkg/detectors/sendbird/sendbird.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api-%s.sendbird.com/v3/users", resAppIdMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api-%s.sendbird.com/v3/users", resAppIdMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Api-Token", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/sendbirdorganizationapi/sendbirdorganizationapi.go b/pkg/detectors/sendbirdorganizationapi/sendbirdorganizationapi.goindex f32d76e88..0eae1aa3e 100644--- a/pkg/detectors/sendbirdorganizationapi/sendbirdorganizationapi.go+++ b/pkg/detectors/sendbirdorganizationapi/sendbirdorganizationapi.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://gate.sendbird.com/api/v2/applications", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://gate.sendbird.com/api/v2/applications", nil)+ if err != nil {+ continue+ }req.Header.Add("SENDBIRDORGANIZATIONAPITOKEN", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/sendgrid/sendgrid.go b/pkg/detectors/sendgrid/sendgrid.goindex d7ecf41a7..49d7bd2e8 100644--- a/pkg/detectors/sendgrid/sendgrid.go+++ b/pkg/detectors/sendgrid/sendgrid.go@@ -53,7 +53,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultbaseURL := "https://api.sendgrid.com/v3/templates"// test `read_user` scope- req, _ := http.NewRequestWithContext(ctx, "GET", baseURL, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", baseURL, nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", res))req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)diff --git a/pkg/detectors/sendinbluev2/sendinbluev2.go b/pkg/detectors/sendinbluev2/sendinbluev2.goindex e3dbba699..7302dca10 100644--- a/pkg/detectors/sendinbluev2/sendinbluev2.go+++ b/pkg/detectors/sendinbluev2/sendinbluev2.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.sendinblue.com/v3/account", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.sendinblue.com/v3/account", nil)+ if err != nil {+ continue+ }req.Header.Add("api-key", fmt.Sprintf("%s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/sentiment/sentiment.go b/pkg/detectors/sentiment/sentiment.goindex 2b0b0fc21..43bd6feea 100644--- a/pkg/detectors/sentiment/sentiment.go+++ b/pkg/detectors/sentiment/sentiment.go@@ -57,7 +57,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.sentimentinvestor.com/v4/parsed?symbol=AAPL&token="+tokenMatch+"&key="+keyMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.sentimentinvestor.com/v4/parsed?symbol=AAPL&token="+tokenMatch+"&key="+keyMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/serphouse/serphouse.go b/pkg/detectors/serphouse/serphouse.goindex b4bfd5635..2b48ded56 100644--- a/pkg/detectors/serphouse/serphouse.go+++ b/pkg/detectors/serphouse/serphouse.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.serphouse.com/account/info", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.serphouse.com/account/info", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/vnd.serphouse+json; version=3")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/serpstack/serpstack.go b/pkg/detectors/serpstack/serpstack.goindex e70d28e13..d625840ec 100644--- a/pkg/detectors/serpstack/serpstack.go+++ b/pkg/detectors/serpstack/serpstack.go@@ -52,7 +52,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 10 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.serpstack.com/search?access_key=%s&query=Mcdonalds", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.serpstack.com/search?access_key=%s&query=Mcdonalds", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {bodyBytes, err := ioutil.ReadAll(res.Body)diff --git a/pkg/detectors/sheety/sheety.go b/pkg/detectors/sheety/sheety.goindex dd0307f8d..a756e729b 100644--- a/pkg/detectors/sheety/sheety.go+++ b/pkg/detectors/sheety/sheety.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.sheety.co/"+resIdMatch+"/restaurantMenu/menuItems", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.sheety.co/"+resIdMatch+"/restaurantMenu/menuItems", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/sherpadesk/sherpadesk.go b/pkg/detectors/sherpadesk/sherpadesk.goindex aa9096e12..26fafbd0e 100644--- a/pkg/detectors/sherpadesk/sherpadesk.go+++ b/pkg/detectors/sherpadesk/sherpadesk.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("x:%s", resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.sherpadesk.com/organizations/", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.sherpadesk.com/organizations/", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)diff --git a/pkg/detectors/sherpadesk/sherpadesk/sherpadesk.go b/pkg/detectors/sherpadesk/sherpadesk/sherpadesk.goindex aa9096e12..26fafbd0e 100644--- a/pkg/detectors/sherpadesk/sherpadesk/sherpadesk.go+++ b/pkg/detectors/sherpadesk/sherpadesk/sherpadesk.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("x:%s", resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.sherpadesk.com/organizations/", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.sherpadesk.com/organizations/", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)diff --git a/pkg/detectors/shipday/shipday.go b/pkg/detectors/shipday/shipday.goindex d63fd2041..1307f354b 100644--- a/pkg/detectors/shipday/shipday.go+++ b/pkg/detectors/shipday/shipday.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.shipday.com/carriers", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.shipday.com/carriers", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/shodankey/shodankey.go b/pkg/detectors/shodankey/shodankey.goindex c48fb3993..2bc080814 100644--- a/pkg/detectors/shodankey/shodankey.go+++ b/pkg/detectors/shodankey/shodankey.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.shodan.io/shodan/host/count?key="+resMatch+"&query=port:22&facets=org,os", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.shodan.io/shodan/host/count?key="+resMatch+"&query=port:22&facets=org,os", nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/shotstack/shotstack.go b/pkg/detectors/shotstack/shotstack.goindex 5c4e802bd..eec5b141f 100644--- a/pkg/detectors/shotstack/shotstack.go+++ b/pkg/detectors/shotstack/shotstack.go@@ -77,7 +77,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result"output":{"format":"mp4", "resolution":"sd"}}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.shotstack.io/stage/render", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api.shotstack.io/stage/render", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Accept", "application/json")req.Header.Add("x-api-key", resMatch)diff --git a/pkg/detectors/shotstack/shotstack/shotstack.go b/pkg/detectors/shotstack/shotstack/shotstack.goindex 5c4e802bd..eec5b141f 100644--- a/pkg/detectors/shotstack/shotstack/shotstack.go+++ b/pkg/detectors/shotstack/shotstack/shotstack.go@@ -77,7 +77,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result"output":{"format":"mp4", "resolution":"sd"}}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.shotstack.io/stage/render", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api.shotstack.io/stage/render", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Accept", "application/json")req.Header.Add("x-api-key", resMatch)diff --git a/pkg/detectors/shutterstock/shutterstock.go b/pkg/detectors/shutterstock/shutterstock.goindex 565ffc501..8fef0e81b 100644--- a/pkg/detectors/shutterstock/shutterstock.go+++ b/pkg/detectors/shutterstock/shutterstock.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.shutterstock.com/v2/images/search", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.shutterstock.com/v2/images/search", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.SetBasicAuth(resMatch, resSecretMatch)res, err := client.Do(req)diff --git a/pkg/detectors/shutterstockoauth/shutterstockoauth.go b/pkg/detectors/shutterstockoauth/shutterstockoauth.goindex 59dae1ce5..f2c80a674 100644--- a/pkg/detectors/shutterstockoauth/shutterstockoauth.go+++ b/pkg/detectors/shutterstockoauth/shutterstockoauth.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.shutterstock.com/v2/user", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.shutterstock.com/v2/user", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/signalwire/signalwire.go b/pkg/detectors/signalwire/signalwire.goindex d169a04eb..5f15da689 100644--- a/pkg/detectors/signalwire/signalwire.go+++ b/pkg/detectors/signalwire/signalwire.go@@ -67,7 +67,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:%s", resID, resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s/api/laml/2010-04-01/Accounts", resURL), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s/api/laml/2010-04-01/Accounts", resURL), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)diff --git a/pkg/detectors/signaturit/signaturit.go b/pkg/detectors/signaturit/signaturit.goindex 02e51da57..d3d929fba 100644--- a/pkg/detectors/signaturit/signaturit.go+++ b/pkg/detectors/signaturit/signaturit.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.sandbox.signaturit.com/v3/signatures.json", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.sandbox.signaturit.com/v3/signatures.json", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/signupgenius/signupgenius.go b/pkg/detectors/signupgenius/signupgenius.goindex 5b611f77c..9c9dc47df 100644--- a/pkg/detectors/signupgenius/signupgenius.go+++ b/pkg/detectors/signupgenius/signupgenius.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.signupgenius.com/v2/k/user/profile/?user_key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.signupgenius.com/v2/k/user/profile/?user_key="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/sigopt/sigopt.go b/pkg/detectors/sigopt/sigopt.goindex 4ed14f0e0..cbc5fd37f 100644--- a/pkg/detectors/sigopt/sigopt.go+++ b/pkg/detectors/sigopt/sigopt.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:", resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.sigopt.com/v1/experiments", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.sigopt.com/v1/experiments", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)diff --git a/pkg/detectors/sigopt/sigopt/sigopt.go b/pkg/detectors/sigopt/sigopt/sigopt.goindex 4ed14f0e0..cbc5fd37f 100644--- a/pkg/detectors/sigopt/sigopt/sigopt.go+++ b/pkg/detectors/sigopt/sigopt/sigopt.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:", resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.sigopt.com/v1/experiments", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.sigopt.com/v1/experiments", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)diff --git a/pkg/detectors/simplesat/simplesat.go b/pkg/detectors/simplesat/simplesat.goindex 75970c01d..1b15cf6b0 100644--- a/pkg/detectors/simplesat/simplesat.go+++ b/pkg/detectors/simplesat/simplesat.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.simplesat.io/api/answers/", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.simplesat.io/api/answers/", nil)+ if err != nil {+ continue+ }req.Header.Add("X-Simplesat-Token", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/simplynoted/simplynoted.go b/pkg/detectors/simplynoted/simplynoted.goindex 67d21f04b..80f6c3afe 100644--- a/pkg/detectors/simplynoted/simplynoted.go+++ b/pkg/detectors/simplynoted/simplynoted.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.simplynoted.com/api/products", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.simplynoted.com/api/products", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/simplynoted/simplynoted/simplynoted.go b/pkg/detectors/simplynoted/simplynoted/simplynoted.goindex 67d21f04b..80f6c3afe 100644--- a/pkg/detectors/simplynoted/simplynoted/simplynoted.go+++ b/pkg/detectors/simplynoted/simplynoted/simplynoted.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.simplynoted.com/api/products", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.simplynoted.com/api/products", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/simvoly/simvoly.go b/pkg/detectors/simvoly/simvoly.goindex 63d77c733..944b78649 100644--- a/pkg/detectors/simvoly/simvoly.go+++ b/pkg/detectors/simvoly/simvoly.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://rendyplayground.simvoly.com/api/site/members?group_id=12&limit=25&skip=25", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://rendyplayground.simvoly.com/api/site/members?group_id=12&limit=25&skip=25", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/sinchmessage/sinchmessage.go b/pkg/detectors/sinchmessage/sinchmessage.goindex 5e2fbe4da..84810750d 100644--- a/pkg/detectors/sinchmessage/sinchmessage.go+++ b/pkg/detectors/sinchmessage/sinchmessage.go@@ -61,7 +61,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result"to": [ "639668957581" ],"body": "This is a test message from your Sinch account"}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://sms.api.sinch.com/xms/v1/"+resIdMatch+"/batches", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://sms.api.sinch.com/xms/v1/"+resIdMatch+"/batches", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/sirv/sirv.go b/pkg/detectors/sirv/sirv.goindex 985081a93..c4e985581 100644--- a/pkg/detectors/sirv/sirv.go+++ b/pkg/detectors/sirv/sirv.go@@ -60,7 +60,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resulttimeout := 10 * time.Secondclient.Timeout = timeoutpayload := strings.NewReader(fmt.Sprintf(`{"clientId":"%s","clientSecret":"%s"}`, resIdMatch, resMatch))- req, _ := http.NewRequest("POST", "https://api.sirv.com/v2/token", payload)+ req, err := http.NewRequest("POST", "https://api.sirv.com/v2/token", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/siteleaf/siteleaf.go b/pkg/detectors/siteleaf/siteleaf.goindex d124c6367..c9351598d 100644--- a/pkg/detectors/siteleaf/siteleaf.go+++ b/pkg/detectors/siteleaf/siteleaf.go@@ -60,7 +60,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultdata := fmt.Sprintf("%s:%s", resIdMatch, resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.siteleaf.com/v2/sites", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.siteleaf.com/v2/sites", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)diff --git a/pkg/detectors/skrappio/skrappio.go b/pkg/detectors/skrappio/skrappio.goindex 5ef120797..050b879ee 100644--- a/pkg/detectors/skrappio/skrappio.go+++ b/pkg/detectors/skrappio/skrappio.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.skrapp.io/api/v2/account", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.skrapp.io/api/v2/account", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("X-Access-Key", fmt.Sprintf("%s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/skybiometry/skybiometry.go b/pkg/detectors/skybiometry/skybiometry.goindex 5bb9d07b0..8a0a26906 100644--- a/pkg/detectors/skybiometry/skybiometry.go+++ b/pkg/detectors/skybiometry/skybiometry.go@@ -61,7 +61,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultpayload.Add("api_key", resMatch)payload.Add("api_secret", resSecretMatch)- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.skybiometry.com/fc/account/authenticate?"+payload.Encode(), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.skybiometry.com/fc/account/authenticate?"+payload.Encode(), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/slack/slack.go b/pkg/detectors/slack/slack.goindex 32bedbae8..8c27343b1 100644--- a/pkg/detectors/slack/slack.go+++ b/pkg/detectors/slack/slack.go@@ -59,7 +59,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {client := common.SaneHttpClient()- req, _ := http.NewRequestWithContext(ctx, "POST", verifyURL, nil)+ req, err := http.NewRequestWithContext(ctx, "POST", verifyURL, nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json; charset=utf-8")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", token))res, err := client.Do(req)diff --git a/pkg/detectors/slackwebhook/slackwebhook.go b/pkg/detectors/slackwebhook/slackwebhook.goindex 7e271bcd0..a20d86252 100644--- a/pkg/detectors/slackwebhook/slackwebhook.go+++ b/pkg/detectors/slackwebhook/slackwebhook.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(`{"text": ""}`)- req, _ := http.NewRequestWithContext(ctx, "POST", resMatch, payload)+ req, err := http.NewRequestWithContext(ctx, "POST", resMatch, payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/smartsheets/smartsheets.go b/pkg/detectors/smartsheets/smartsheets.goindex 8843c7f79..7e720612f 100644--- a/pkg/detectors/smartsheets/smartsheets.go+++ b/pkg/detectors/smartsheets/smartsheets.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.smartsheet.com/2.0/sheets", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.smartsheet.com/2.0/sheets", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/smartystreets/smartystreets.go b/pkg/detectors/smartystreets/smartystreets.goindex e2360dd4d..aeecb265b 100644--- a/pkg/detectors/smartystreets/smartystreets.go+++ b/pkg/detectors/smartystreets/smartystreets.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://us-zipcode.api.smartystreets.com/lookup?auth-id=%s&auth-token=%s&state=CA&zipcode=94035", resIdMatch, resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://us-zipcode.api.smartystreets.com/lookup?auth-id=%s&auth-token=%s&state=CA&zipcode=94035", resIdMatch, resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/smooch/smooch.go b/pkg/detectors/smooch/smooch.goindex 7c69cc8af..b7487e8c2 100644--- a/pkg/detectors/smooch/smooch.go+++ b/pkg/detectors/smooch/smooch.go@@ -59,7 +59,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:%s", resMatch, resSecret)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.smooch.io/v2/apps", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.smooch.io/v2/apps", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/vnd.smooch+json; version=3")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)diff --git a/pkg/detectors/snipcart/snipcart.go b/pkg/detectors/snipcart/snipcart.goindex 5e282e322..dc3cd8a2c 100644--- a/pkg/detectors/snipcart/snipcart.go+++ b/pkg/detectors/snipcart/snipcart.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:", resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.snipcart.com/api/orders", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://app.snipcart.com/api/orders", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)diff --git a/pkg/detectors/snykkey/snykkey.go b/pkg/detectors/snykkey/snykkey.goindex 2e552a75e..b59acc608 100644--- a/pkg/detectors/snykkey/snykkey.go+++ b/pkg/detectors/snykkey/snykkey.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://snyk.io/api/v1/user/me", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://snyk.io/api/v1/user/me", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("token %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/sparkpost/sparkpost.go b/pkg/detectors/sparkpost/sparkpost.goindex 60cc2cce1..3d0011cd2 100644--- a/pkg/detectors/sparkpost/sparkpost.go+++ b/pkg/detectors/sparkpost/sparkpost.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.sparkpost.com/api/v1/account", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.sparkpost.com/api/v1/account", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/splunkobservabilitytoken/splunkobservabilitytoken.go b/pkg/detectors/splunkobservabilitytoken/splunkobservabilitytoken.goindex dd4b0caa1..93bbe27ba 100644--- a/pkg/detectors/splunkobservabilitytoken/splunkobservabilitytoken.go+++ b/pkg/detectors/splunkobservabilitytoken/splunkobservabilitytoken.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.us1.signalfx.com/v2/dashboard", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.us1.signalfx.com/v2/dashboard", nil)+ if err != nil {+ continue+ }req.Header.Set("Content-Type", "application/json")req.Header.Set("X-Sf-Token", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/spoonacular/spoonacular.go b/pkg/detectors/spoonacular/spoonacular.goindex df1c7f667..b3f154ee5 100644--- a/pkg/detectors/spoonacular/spoonacular.go+++ b/pkg/detectors/spoonacular/spoonacular.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.spoonacular.com/recipes/random?apiKey=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.spoonacular.com/recipes/random?apiKey=%s", resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/sportsmonk/sportsmonk.go b/pkg/detectors/sportsmonk/sportsmonk.goindex 863831c6c..c3e5e5a59 100644--- a/pkg/detectors/sportsmonk/sportsmonk.go+++ b/pkg/detectors/sportsmonk/sportsmonk.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://soccer.sportmonks.com/api/v2.0/leagues?api_token="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://soccer.sportmonks.com/api/v2.0/leagues?api_token="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/square/square.go b/pkg/detectors/square/square.goindex e32dfba25..6aea2c3f7 100644--- a/pkg/detectors/square/square.go+++ b/pkg/detectors/square/square.go@@ -58,7 +58,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultclient := common.SaneHttpClient()// test `merchants` scope - its commonly allowed and low sensitivity- req, _ := http.NewRequestWithContext(ctx, "GET", baseURL, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", baseURL, nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", res))req.Header.Add("Content-Type", "application/json")// unclear if this version needs to be set or matters, seems to work without, but docs want itdiff --git a/pkg/detectors/squareapp/squareapp.go b/pkg/detectors/squareapp/squareapp.goindex fbbb5d9d5..0740c0223 100644--- a/pkg/detectors/squareapp/squareapp.go+++ b/pkg/detectors/squareapp/squareapp.go@@ -65,7 +65,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultreturn results, err}- req, _ := http.NewRequestWithContext(ctx, "POST", baseURL, bytes.NewReader(reqData))+ req, err := http.NewRequestWithContext(ctx, "POST", baseURL, bytes.NewReader(reqData))+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Client %s", secMatch))req.Header.Add("Content-Type", "application/json")diff --git a/pkg/detectors/squarespace/squarespace.go b/pkg/detectors/squarespace/squarespace.goindex c50c49fb1..6e2923e41 100644--- a/pkg/detectors/squarespace/squarespace.go+++ b/pkg/detectors/squarespace/squarespace.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.squarespace.com/1.0/profiles?sortField=email&sortDirection=asc&filter=isCustomer,true;hasAccount,true", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.squarespace.com/1.0/profiles?sortField=email&sortDirection=asc&filter=isCustomer,true;hasAccount,true", nil)+ if err != nil {+ continue+ }req.Header.Add("User-Agent", "YOUR_CUSTOM_APP_DESCRIPTION")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/squareup/squareup.go b/pkg/detectors/squareup/squareup.goindex c05cddd7a..b946d64d8 100644--- a/pkg/detectors/squareup/squareup.go+++ b/pkg/detectors/squareup/squareup.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://connect.squareup.com/oauth2/authorize?client_id=%s&scope=CUSTOMERS_WRITE+CUSTOMERS_READ&session=False&state=82201dd8d83d23cc8a48caf52b", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://connect.squareup.com/oauth2/authorize?client_id=%s&scope=CUSTOMERS_WRITE+CUSTOMERS_READ&session=False&state=82201dd8d83d23cc8a48caf52b", resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/sslmate/sslmate.go b/pkg/detectors/sslmate/sslmate.goindex d77205f82..b82befad9 100644--- a/pkg/detectors/sslmate/sslmate.go+++ b/pkg/detectors/sslmate/sslmate.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://sslmate.com/api/v2/certs/example.com?expand=current.crt", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://sslmate.com/api/v2/certs/example.com?expand=current.crt", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/stitchdata/stitchdata.go b/pkg/detectors/stitchdata/stitchdata.goindex de3bf769f..86c220496 100644--- a/pkg/detectors/stitchdata/stitchdata.go+++ b/pkg/detectors/stitchdata/stitchdata.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.stitchdata.com/v4/sources", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.stitchdata.com/v4/sources", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)diff --git a/pkg/detectors/stockdata/stockdata.go b/pkg/detectors/stockdata/stockdata.goindex cd9a065f6..96245eff9 100644--- a/pkg/detectors/stockdata/stockdata.go+++ b/pkg/detectors/stockdata/stockdata.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.stockdata.org/v1/data/quote?symbols=AAPL,TSLA,MSFT&api_token="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.stockdata.org/v1/data/quote?symbols=AAPL,TSLA,MSFT&api_token="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/storecove/storecove.go b/pkg/detectors/storecove/storecove.goindex 356c8fe87..bf489a1aa 100644--- a/pkg/detectors/storecove/storecove.go+++ b/pkg/detectors/storecove/storecove.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.storecove.com/api/v2/discovery/identifiers", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.storecove.com/api/v2/discovery/identifiers", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/stormglass/stormglass.go b/pkg/detectors/stormglass/stormglass.goindex a24e3efba..87fedc252 100644--- a/pkg/detectors/stormglass/stormglass.go+++ b/pkg/detectors/stormglass/stormglass.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.stormglass.io/v2/weather/point?lat=58.7984&lng=17.8081¶ms=windSpeed", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.stormglass.io/v2/weather/point?lat=58.7984&lng=17.8081¶ms=windSpeed", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("%s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/storyblok/storyblok.go b/pkg/detectors/storyblok/storyblok.goindex ee2070caf..b8917590d 100644--- a/pkg/detectors/storyblok/storyblok.go+++ b/pkg/detectors/storyblok/storyblok.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.storyblok.com/v1/cdn/spaces/me/?token="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.storyblok.com/v1/cdn/spaces/me/?token="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/storychief/storychief.go b/pkg/detectors/storychief/storychief.goindex 65d2ed6c9..0d75ac609 100644--- a/pkg/detectors/storychief/storychief.go+++ b/pkg/detectors/storychief/storychief.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.storychief.io/1.0/users?page=1&count=10", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.storychief.io/1.0/users?page=1&count=10", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/strava/strava.go b/pkg/detectors/strava/strava.goindex 8bd2da2c0..5c4f6e016 100644--- a/pkg/detectors/strava/strava.go+++ b/pkg/detectors/strava/strava.go@@ -65,7 +65,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader("grant_type=refresh_token&client_id=" + resId + "&client_secret=" + resSecret + "&refresh_token=" + resKey)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://www.strava.com/oauth/token", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://www.strava.com/oauth/token", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/x-www-form-urlencoded")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/streak/streak.go b/pkg/detectors/streak/streak.goindex 271c3a0c2..bfebbc8c9 100644--- a/pkg/detectors/streak/streak.go+++ b/pkg/detectors/streak/streak.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:", resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://www.streak.com/api/v1/pipelines", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://www.streak.com/api/v1/pipelines", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/stripe/stripe.go b/pkg/detectors/stripe/stripe.goindex 809f70bd7..b93d3347e 100644--- a/pkg/detectors/stripe/stripe.go+++ b/pkg/detectors/stripe/stripe.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultclient := common.SaneHttpClient()// test `read_user` scope- req, _ := http.NewRequestWithContext(ctx, "GET", baseURL, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", baseURL, nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", match))req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)diff --git a/pkg/detectors/stytch/stytch.go b/pkg/detectors/stytch/stytch.goindex 252156589..e8ae4426b 100644--- a/pkg/detectors/stytch/stytch.go+++ b/pkg/detectors/stytch/stytch.go@@ -57,7 +57,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {fmt.Println(userPatMatch)fmt.Println(tokenPatMatch)- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.stytch.com/v1/users/pending", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.stytch.com/v1/users/pending", nil)+ if err != nil {+ continue+ }req.SetBasicAuth(userPatMatch, tokenPatMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/sugester/sugester.go b/pkg/detectors/sugester/sugester.goindex afbb029cb..b4f4c4b1a 100644--- a/pkg/detectors/sugester/sugester.go+++ b/pkg/detectors/sugester/sugester.go@@ -54,7 +54,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequest("GET", "https://"+resDomainMatch+".sugester.com/app/clients.json?api_token="+resMatch, nil)+ req, err := http.NewRequest("GET", "https://"+resDomainMatch+".sugester.com/app/clients.json?api_token="+resMatch, nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/vnd.sugester+json; version=3")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/sumologickey/sumologickey.go b/pkg/detectors/sumologickey/sumologickey.goindex 6899386c0..9c6fb75d8 100644--- a/pkg/detectors/sumologickey/sumologickey.go+++ b/pkg/detectors/sumologickey/sumologickey.go@@ -57,7 +57,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:%s", resIdMatch, resMatch)encoded := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.us2.sumologic.com/api/v1/users", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.us2.sumologic.com/api/v1/users", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", encoded))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/supernotesapi/supernotesapi.go b/pkg/detectors/supernotesapi/supernotesapi.goindex 746555e1e..cea3aa876 100644--- a/pkg/detectors/supernotesapi/supernotesapi.go+++ b/pkg/detectors/supernotesapi/supernotesapi.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.supernotes.app/v1/user/", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.supernotes.app/v1/user/", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("Api-Key", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/surveyanyplace/surveyanyplace.go b/pkg/detectors/surveyanyplace/surveyanyplace.goindex 8e9f3edd6..cc39681ff 100644--- a/pkg/detectors/surveyanyplace/surveyanyplace.go+++ b/pkg/detectors/surveyanyplace/surveyanyplace.go@@ -62,7 +62,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result"code2"]}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.surveyanyplace.com/v1/surveys/"+resIdMatch+"/accesscodes", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api.surveyanyplace.com/v1/surveys/"+resIdMatch+"/accesscodes", payload)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("API %s", resMatch))req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)diff --git a/pkg/detectors/surveybot/surveybot.go b/pkg/detectors/surveybot/surveybot.goindex 017ce8f38..0fc75e1b7 100644--- a/pkg/detectors/surveybot/surveybot.go+++ b/pkg/detectors/surveybot/surveybot.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.surveybot.io/api/v1/surveys?page=1&per_page=20&offset=0", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://app.surveybot.io/api/v1/surveys?page=1&per_page=20&offset=0", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("X-Api-Key", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/surveysparrow/surveysparrow.go b/pkg/detectors/surveysparrow/surveysparrow.goindex 065023365..926aa3c71 100644--- a/pkg/detectors/surveysparrow/surveysparrow.go+++ b/pkg/detectors/surveysparrow/surveysparrow.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.surveysparrow.com/v1/contacts", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.surveysparrow.com/v1/contacts", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/survicate/survicate.go b/pkg/detectors/survicate/survicate.goindex 323b009b3..07dfd4a73 100644--- a/pkg/detectors/survicate/survicate.go+++ b/pkg/detectors/survicate/survicate.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://data-api.survicate.com/v1/surveys", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://data-api.survicate.com/v1/surveys", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/swell/swell.go b/pkg/detectors/swell/swell.goindex 36393ebda..3a330223f 100644--- a/pkg/detectors/swell/swell.go+++ b/pkg/detectors/swell/swell.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultRaw: []byte(tokenPatMatch),}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.swell.store/products?limit=100", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.swell.store/products?limit=100", nil)+ if err != nil {+ continue+ }req.SetBasicAuth(userPatMatch, tokenPatMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/swiftype/swiftype.go b/pkg/detectors/swiftype/swiftype.goindex b9f206acb..83ac2f57f 100644--- a/pkg/detectors/swiftype/swiftype.go+++ b/pkg/detectors/swiftype/swiftype.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(`{"auth_token":"` + resMatch + `","q": "gatsby"}`)- req, _ := http.NewRequestWithContext(ctx, "GET", "https://search-api.swiftype.com/api/v1/engines/bookstore/document_types/books/search.json", payload)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://search-api.swiftype.com/api/v1/engines/bookstore/document_types/books/search.json", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/swiftype/swiftype/swiftype.go b/pkg/detectors/swiftype/swiftype/swiftype.goindex b9f206acb..83ac2f57f 100644--- a/pkg/detectors/swiftype/swiftype/swiftype.go+++ b/pkg/detectors/swiftype/swiftype/swiftype.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(`{"auth_token":"` + resMatch + `","q": "gatsby"}`)- req, _ := http.NewRequestWithContext(ctx, "GET", "https://search-api.swiftype.com/api/v1/engines/bookstore/document_types/books/search.json", payload)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://search-api.swiftype.com/api/v1/engines/bookstore/document_types/books/search.json", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/tallyfy/tallyfy.go b/pkg/detectors/tallyfy/tallyfy.goindex 1619b576e..29c327533 100644--- a/pkg/detectors/tallyfy/tallyfy.go+++ b/pkg/detectors/tallyfy/tallyfy.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.tallyfy.com/me", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.tallyfy.com/me", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/tatumio/tatumio.go b/pkg/detectors/tatumio/tatumio.goindex f9f826476..1bbdfb60d 100644--- a/pkg/detectors/tatumio/tatumio.go+++ b/pkg/detectors/tatumio/tatumio.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api-eu1.tatum.io/v3/ledger/account?pageSize=10&offset=0&accountCode=AC_1011_B", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api-eu1.tatum.io/v3/ledger/account?pageSize=10&offset=0&accountCode=AC_1011_B", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/vnd.tatumio+json; version=3")req.Header.Add("x-api-key", fmt.Sprintf("%s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/taxjar/taxjar.go b/pkg/detectors/taxjar/taxjar.goindex 62fdaf228..f794a0c47 100644--- a/pkg/detectors/taxjar/taxjar.go+++ b/pkg/detectors/taxjar/taxjar.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.taxjar.com/v2/categories", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.taxjar.com/v2/categories", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/teamgate/teamgate.go b/pkg/detectors/teamgate/teamgate.goindex 28b4cde30..cb4056098 100644--- a/pkg/detectors/teamgate/teamgate.go+++ b/pkg/detectors/teamgate/teamgate.go@@ -54,7 +54,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultRaw: []byte(resMatch),}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.teamgate.com/v4/users", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.teamgate.com/v4/users", nil)+ if err != nil {+ continue+ }req.Header.Add("X-Auth-Token", resMatch)req.Header.Add("X-App-Key", resKeyMatch)diff --git a/pkg/detectors/teamworkcrm/teamworkcrm.go b/pkg/detectors/teamworkcrm/teamworkcrm.goindex e0658b224..498c48f0c 100644--- a/pkg/detectors/teamworkcrm/teamworkcrm.go+++ b/pkg/detectors/teamworkcrm/teamworkcrm.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://example.teamwork.com/crm/api/v2/users.json", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://example.teamwork.com/crm/api/v2/users.json", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/teamworkdesk/teamworkdesk.go b/pkg/detectors/teamworkdesk/teamworkdesk.goindex 1c578dc2a..6bd39fc16 100644--- a/pkg/detectors/teamworkdesk/teamworkdesk.go+++ b/pkg/detectors/teamworkdesk/teamworkdesk.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://example.teamwork.com/desk/api/v2/me.json", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://example.teamwork.com/desk/api/v2/me.json", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/teamworkspaces/teamworkspaces.go b/pkg/detectors/teamworkspaces/teamworkspaces.goindex 229c888e0..a338e42ba 100644--- a/pkg/detectors/teamworkspaces/teamworkspaces.go+++ b/pkg/detectors/teamworkspaces/teamworkspaces.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://example.teamwork.com/spaces/api/v1/users.json", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://example.teamwork.com/spaces/api/v1/users.json", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/technicalanalysisapi/technicalanalysisapi.go b/pkg/detectors/technicalanalysisapi/technicalanalysisapi.goindex e185f2ffe..ada996899 100644--- a/pkg/detectors/technicalanalysisapi/technicalanalysisapi.go+++ b/pkg/detectors/technicalanalysisapi/technicalanalysisapi.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {timeout := 10 * time.Secondclient.Timeout = timeout- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://technical-analysis-api.com/api/v1/analysis/BTC?apiKey=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://technical-analysis-api.com/api/v1/analysis/BTC?apiKey=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/telegrambottoken/telegrambottoken.go b/pkg/detectors/telegrambottoken/telegrambottoken.goindex b18967e3f..bec15cb16 100644--- a/pkg/detectors/telegrambottoken/telegrambottoken.go+++ b/pkg/detectors/telegrambottoken/telegrambottoken.go@@ -50,7 +50,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {// https://core.telegram.org/bots/api#getme- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.telegram.org/bot"+key+"/getMe", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.telegram.org/bot"+key+"/getMe", nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/telnyx/telnyx.go b/pkg/detectors/telnyx/telnyx.goindex a123636a5..e0d2683ef 100644--- a/pkg/detectors/telnyx/telnyx.go+++ b/pkg/detectors/telnyx/telnyx.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.telnyx.com/v2/messaging_profiles", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.telnyx.com/v2/messaging_profiles", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/vnd.telnyx+json; version=3")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/terraformcloudpersonaltoken/terraformcloudpersonaltoken.go b/pkg/detectors/terraformcloudpersonaltoken/terraformcloudpersonaltoken.goindex 38b55e214..d6b700192 100644--- a/pkg/detectors/terraformcloudpersonaltoken/terraformcloudpersonaltoken.go+++ b/pkg/detectors/terraformcloudpersonaltoken/terraformcloudpersonaltoken.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.terraform.io/api/v2/account/details", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://app.terraform.io/api/v2/account/details", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/text2data/text2data.go b/pkg/detectors/text2data/text2data.goindex 22606e377..9a2da399f 100644--- a/pkg/detectors/text2data/text2data.go+++ b/pkg/detectors/text2data/text2data.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultdata.Add("DocumentText", "Excellent location, opposite a very large mall with wide variety of shops, restaurants and more.")data.Add("PrivateKey", resMatch)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.text2data.com/v3/analyze", strings.NewReader(data.Encode()))+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api.text2data.com/v3/analyze", strings.NewReader(data.Encode()))+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("Content-Type", "application/x-www-form-urlencoded")res, err := client.Do(req)diff --git a/pkg/detectors/textmagic/textmagic.go b/pkg/detectors/textmagic/textmagic.goindex 67afd2ec4..a862844f1 100644--- a/pkg/detectors/textmagic/textmagic.go+++ b/pkg/detectors/textmagic/textmagic.go@@ -59,7 +59,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:%s", resUser, resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://rest.textmagic.com/api/v2/user", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://rest.textmagic.com/api/v2/user", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)diff --git a/pkg/detectors/theoddsapi/theoddsapi.go b/pkg/detectors/theoddsapi/theoddsapi.goindex cd79593c1..81b79d653 100644--- a/pkg/detectors/theoddsapi/theoddsapi.go+++ b/pkg/detectors/theoddsapi/theoddsapi.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequest("GET", "https://api.the-odds-api.com/v4/sports/?apiKey="+resMatch, nil)+ req, err := http.NewRequest("GET", "https://api.the-odds-api.com/v4/sports/?apiKey="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/thinkific/thinkific.go b/pkg/detectors/thinkific/thinkific.goindex cef0e32d5..d01dbcb57 100644--- a/pkg/detectors/thinkific/thinkific.go+++ b/pkg/detectors/thinkific/thinkific.go@@ -57,7 +57,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {domainRes := fmt.Sprintf("%s-s-school", resDomainMatch)- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.thinkific.com/api/public/v1/users", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.thinkific.com/api/public/v1/users", nil)+ if err != nil {+ continue+ }req.Header.Add("X-Auth-API-Key", resMatch)req.Header.Add("X-Auth-Subdomain", domainRes)req.Header.Add("Content-Type", "application/json")diff --git a/pkg/detectors/thousandeyes/thousandeyes.go b/pkg/detectors/thousandeyes/thousandeyes.goindex 1d936368d..9a7ece7c5 100644--- a/pkg/detectors/thousandeyes/thousandeyes.go+++ b/pkg/detectors/thousandeyes/thousandeyes.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.thousandeyes.com/v6/endpoint-data/user-sessions/web.json", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.thousandeyes.com/v6/endpoint-data/user-sessions/web.json", nil)+ if err != nil {+ continue+ }req.SetBasicAuth(userPatMatch, tokenPatMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/thousandeyes/thousandeyes/thousandeyes.go b/pkg/detectors/thousandeyes/thousandeyes/thousandeyes.goindex 1d936368d..9a7ece7c5 100644--- a/pkg/detectors/thousandeyes/thousandeyes/thousandeyes.go+++ b/pkg/detectors/thousandeyes/thousandeyes/thousandeyes.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.thousandeyes.com/v6/endpoint-data/user-sessions/web.json", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.thousandeyes.com/v6/endpoint-data/user-sessions/web.json", nil)+ if err != nil {+ continue+ }req.SetBasicAuth(userPatMatch, tokenPatMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/ticketmaster/ticketmaster.go b/pkg/detectors/ticketmaster/ticketmaster.goindex 89900748d..c51541a7d 100644--- a/pkg/detectors/ticketmaster/ticketmaster.go+++ b/pkg/detectors/ticketmaster/ticketmaster.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://app.ticketmaster.com/discovery/v2/events.json?apikey=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://app.ticketmaster.com/discovery/v2/events.json?apikey=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/tiingo/tiingo.go b/pkg/detectors/tiingo/tiingo.goindex 4a4cd5735..317854d85 100644--- a/pkg/detectors/tiingo/tiingo.go+++ b/pkg/detectors/tiingo/tiingo.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.tiingo.com/tiingo/fundamentals/definitions", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.tiingo.com/tiingo/fundamentals/definitions", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Token %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/timezoneapi/timezoneapi.go b/pkg/detectors/timezoneapi/timezoneapi.goindex 0718f5efc..095902e8f 100644--- a/pkg/detectors/timezoneapi/timezoneapi.go+++ b/pkg/detectors/timezoneapi/timezoneapi.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://timezoneapi.io/api/ip/?token="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://timezoneapi.io/api/ip/?token="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/tly/tly.go b/pkg/detectors/tly/tly.goindex 33b537414..323c463c8 100644--- a/pkg/detectors/tly/tly.go+++ b/pkg/detectors/tly/tly.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://t.ly/api/v1/link/stats?api_token="+resMatch+"&short_url=https://t.ly/h9YS", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://t.ly/api/v1/link/stats?api_token="+resMatch+"&short_url=https://t.ly/h9YS", nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/tmetric/tmetric.go b/pkg/detectors/tmetric/tmetric.goindex 72b5f6394..a658d6d09 100644--- a/pkg/detectors/tmetric/tmetric.go+++ b/pkg/detectors/tmetric/tmetric.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.tmetric.com/api/v3/user", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://app.tmetric.com/api/v3/user", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/todoist/todoist.go b/pkg/detectors/todoist/todoist.goindex 732c1f244..0545155ad 100644--- a/pkg/detectors/todoist/todoist.go+++ b/pkg/detectors/todoist/todoist.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.todoist.com/rest/v1/projects", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.todoist.com/rest/v1/projects", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/toggltrack/toggltrack.go b/pkg/detectors/toggltrack/toggltrack.goindex a6ef74493..c099a4264 100644--- a/pkg/detectors/toggltrack/toggltrack.go+++ b/pkg/detectors/toggltrack/toggltrack.go@@ -52,7 +52,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultdata := fmt.Sprintf("%s:api_token", resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.track.toggl.com/api/v8/me", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.track.toggl.com/api/v8/me", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/tomorrowio/tomorrowio.go b/pkg/detectors/tomorrowio/tomorrowio.goindex ba3db4ceb..f4e949d72 100644--- a/pkg/detectors/tomorrowio/tomorrowio.go+++ b/pkg/detectors/tomorrowio/tomorrowio.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.tomorrow.io/v4/alerts?apikey=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.tomorrow.io/v4/alerts?apikey=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/tomtom/tomtom.go b/pkg/detectors/tomtom/tomtom.goindex 0a1276742..e02077b46 100644--- a/pkg/detectors/tomtom/tomtom.go+++ b/pkg/detectors/tomtom/tomtom.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.tomtom.com/map/1/tile/basic/main/0/0/0.png?view=Unified&key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.tomtom.com/map/1/tile/basic/main/0/0/0.png?view=Unified&key="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/tradier/tradier.go b/pkg/detectors/tradier/tradier.goindex 3ec623c9d..3940602a7 100644--- a/pkg/detectors/tradier/tradier.go+++ b/pkg/detectors/tradier/tradier.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.tradier.com/v1/watchlists", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.tradier.com/v1/watchlists", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/travelpayouts/travelpayouts.go b/pkg/detectors/travelpayouts/travelpayouts.goindex 348c3f299..9a42a338f 100644--- a/pkg/detectors/travelpayouts/travelpayouts.go+++ b/pkg/detectors/travelpayouts/travelpayouts.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.travelpayouts.com/v2/prices/latest?currency=usd&limit=5&token=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.travelpayouts.com/v2/prices/latest?currency=usd&limit=5&token=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/travisci/travisci.go b/pkg/detectors/travisci/travisci.goindex 7b2d9213c..03290a5f9 100644--- a/pkg/detectors/travisci/travisci.go+++ b/pkg/detectors/travisci/travisci.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.travis-ci.com/user", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.travis-ci.com/user", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("token %s", resMatch))req.Header.Add("User-Agent", "API Explorer")req.Header.Add("Travis-API-Version", "3")diff --git a/pkg/detectors/trelloapikey/trelloapikey.go b/pkg/detectors/trelloapikey/trelloapikey.goindex 692c06531..7e8813e3a 100644--- a/pkg/detectors/trelloapikey/trelloapikey.go+++ b/pkg/detectors/trelloapikey/trelloapikey.go@@ -53,7 +53,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.trello.com/1/members/me?key="+resMatch+"&token="+token, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.trello.com/1/members/me?key="+resMatch+"&token="+token, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/tru/tru.go b/pkg/detectors/tru/tru.goindex f2b8391f3..961a125f4 100644--- a/pkg/detectors/tru/tru.go+++ b/pkg/detectors/tru/tru.go@@ -59,7 +59,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultdata := fmt.Sprintf("%s:%s", resMatch, resSecret)baseToken := b64.StdEncoding.EncodeToString([]byte(data))payload := strings.NewReader("grant_type=client_credentials")- req, _ := http.NewRequestWithContext(ctx, "POST", "https://eu.api.tru.id/oauth2/v1/token", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://eu.api.tru.id/oauth2/v1/token", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/x-www-form-urlencoded")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", baseToken))res, err := client.Do(req)diff --git a/pkg/detectors/twelvedata/twelvedata.go b/pkg/detectors/twelvedata/twelvedata.goindex 8035ed903..e3bb4088a 100644--- a/pkg/detectors/twelvedata/twelvedata.go+++ b/pkg/detectors/twelvedata/twelvedata.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.twelvedata.com/earliest_timestamp?symbol=AAPL&interval=1day&apikey="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.twelvedata.com/earliest_timestamp?symbol=AAPL&interval=1day&apikey="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/twilio/twilio.go b/pkg/detectors/twilio/twilio.goindex 211fa149b..617474493 100644--- a/pkg/detectors/twilio/twilio.go+++ b/pkg/detectors/twilio/twilio.go@@ -57,10 +57,14 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultform := url.Values{}form.Add("FriendlyName", "MyServiceName")- req, _ := http.NewRequestWithContext(+ req, err := http.NewRequestWithContext(ctx, "POST", "https://verify.twilio.com/v2/Services",+strings.NewReader(form.Encode()),)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/x-www-form-urlencoded")req.Header.Add("Accept", "*/*")req.SetBasicAuth(sid, key)diff --git a/pkg/detectors/tyntec/tyntec.go b/pkg/detectors/tyntec/tyntec.goindex 88ae0444e..629c62fa5 100644--- a/pkg/detectors/tyntec/tyntec.go+++ b/pkg/detectors/tyntec/tyntec.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.tyntec.com/2fa/v1/application", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.tyntec.com/2fa/v1/application", nil)+ if err != nil {+ continue+ }req.Header.Add("apiKey", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/typeform/typeform.go b/pkg/detectors/typeform/typeform.goindex 49f40176f..8ba03d705 100644--- a/pkg/detectors/typeform/typeform.go+++ b/pkg/detectors/typeform/typeform.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.typeform.com/me", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.typeform.com/me", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/ubidots/ubidots.go b/pkg/detectors/ubidots/ubidots.goindex 9371f8d5c..0e4f1a9cf 100644--- a/pkg/detectors/ubidots/ubidots.go+++ b/pkg/detectors/ubidots/ubidots.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://industrial.api.ubidots.com/api/v1.6/variables/", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://industrial.api.ubidots.com/api/v1.6/variables/", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("X-Auth-Token", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/unifyid/unifyid.go b/pkg/detectors/unifyid/unifyid.goindex f68fb9d32..14341cfed 100644--- a/pkg/detectors/unifyid/unifyid.go+++ b/pkg/detectors/unifyid/unifyid.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(`{"token": "sample"}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.unify.id/v1/humandetect/verify", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api.unify.id/v1/humandetect/verify", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("X-API-Key", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/unplugg/unplugg.go b/pkg/detectors/unplugg/unplugg.goindex 7f7c50612..ca6cb0625 100644--- a/pkg/detectors/unplugg/unplugg.go+++ b/pkg/detectors/unplugg/unplugg.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(`{"data":[{"timestamp":1466640000,"value":0.27589941523037853},{"timestamp":1466640900,"value":0.4059699097648263}],"forecast_to":1458136800,"callback":"https://yourdomain.com/samplecallback"}`)- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.unplu.gg/forecast", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api.unplu.gg/forecast", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("x-access-token", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/unsplash/unsplash.go b/pkg/detectors/unsplash/unsplash.goindex bd9c2d390..089f6ae10 100644--- a/pkg/detectors/unsplash/unsplash.go+++ b/pkg/detectors/unsplash/unsplash.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.unsplash.com/photos/?client_id="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.unsplash.com/photos/?client_id="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/upcdatabase/upcdatabase.go b/pkg/detectors/upcdatabase/upcdatabase.goindex 825191bbb..b34191b81 100644--- a/pkg/detectors/upcdatabase/upcdatabase.go+++ b/pkg/detectors/upcdatabase/upcdatabase.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.upcdatabase.org/product/0111222333446?apikey=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.upcdatabase.org/product/0111222333446?apikey=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {bodyBytes, err := ioutil.ReadAll(res.Body)diff --git a/pkg/detectors/uplead/uplead.go b/pkg/detectors/uplead/uplead.goindex 139d087cf..3cdf8d027 100644--- a/pkg/detectors/uplead/uplead.go+++ b/pkg/detectors/uplead/uplead.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.uplead.com/v2/credits", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.uplead.com/v2/credits", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/uploadcare/uploadcare.go b/pkg/detectors/uploadcare/uploadcare.goindex bafae0cd9..983e181dd 100644--- a/pkg/detectors/uploadcare/uploadcare.go+++ b/pkg/detectors/uploadcare/uploadcare.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequest("GET", "https://api.uploadcare.com/files/", nil)+ req, err := http.NewRequest("GET", "https://api.uploadcare.com/files/", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/vnd.uploadcare-v0.5+json")req.Header.Add("Authorization", fmt.Sprintf("Uploadcare.Simple %s:%s", publicKeyMatch, resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/upwave/upwave.go b/pkg/detectors/upwave/upwave.goindex 09e6684c4..a5448f403 100644--- a/pkg/detectors/upwave/upwave.go+++ b/pkg/detectors/upwave/upwave.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.upwave.io/workspaces/", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.upwave.io/workspaces/", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Token %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/upwave/upwave/upwave.go b/pkg/detectors/upwave/upwave/upwave.goindex 09e6684c4..a5448f403 100644--- a/pkg/detectors/upwave/upwave/upwave.go+++ b/pkg/detectors/upwave/upwave/upwave.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.upwave.io/workspaces/", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.upwave.io/workspaces/", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Token %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/uri/uri.go b/pkg/detectors/uri/uri.goindex 4d90b99c4..15fbaf289 100644--- a/pkg/detectors/uri/uri.go+++ b/pkg/detectors/uri/uri.go@@ -98,7 +98,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result// Assume a 200 response is a valid credentialpostValues := map[string]string{"protocol": parsedURL.Scheme, "credentialed_uri": token}jsonValue, _ := json.Marshal(postValues)- req, _ := http.NewRequestWithContext(ctx, "POST", ssrfProtectorURL, bytes.NewBuffer(jsonValue))+ req, err := http.NewRequestWithContext(ctx, "POST", ssrfProtectorURL, bytes.NewBuffer(jsonValue))+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err != nil {diff --git a/pkg/detectors/urlscan/urlscan.go b/pkg/detectors/urlscan/urlscan.goindex 3af42b923..79971d726 100644--- a/pkg/detectors/urlscan/urlscan.go+++ b/pkg/detectors/urlscan/urlscan.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://urlscan.io/user/quotas", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://urlscan.io/user/quotas", nil)+ if err != nil {+ continue+ }req.Header.Add("API-Key", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/user/user.go b/pkg/detectors/user/user.goindex 810ceaa0f..08579d766 100644--- a/pkg/detectors/user/user.go+++ b/pkg/detectors/user/user.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://secretscanner.user.com/api/public/users/", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://secretscanner.user.com/api/public/users/", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Token %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/userstack/userstack.go b/pkg/detectors/userstack/userstack.goindex c091ab17a..3e7db2379 100644--- a/pkg/detectors/userstack/userstack.go+++ b/pkg/detectors/userstack/userstack.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.userstack.com/detect?access_key=%s&ua=Mozilla/5.0", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.userstack.com/detect?access_key=%s&ua=Mozilla/5.0", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {bodyBytes, err := ioutil.ReadAll(res.Body)diff --git a/pkg/detectors/vatlayer/vatlayer.go b/pkg/detectors/vatlayer/vatlayer.goindex fbf09e990..bfe82dc68 100644--- a/pkg/detectors/vatlayer/vatlayer.go+++ b/pkg/detectors/vatlayer/vatlayer.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://www.apilayer.net/api/validate?access_key=%s&vat_number=LU26375245&format=1", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://www.apilayer.net/api/validate?access_key=%s&vat_number=LU26375245&format=1", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {bodyBytes, err := ioutil.ReadAll(res.Body)diff --git a/pkg/detectors/vercel/vercel.go b/pkg/detectors/vercel/vercel.goindex 165ebecfb..2b8afb1a0 100644--- a/pkg/detectors/vercel/vercel.go+++ b/pkg/detectors/vercel/vercel.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.vercel.com/www/user", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.vercel.com/www/user", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/verifier/verifier.go b/pkg/detectors/verifier/verifier.goindex 138909192..db5e60a94 100644--- a/pkg/detectors/verifier/verifier.go+++ b/pkg/detectors/verifier/verifier.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultRaw: []byte(resMatch),}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://verifier.meetchopra.com/verify/%s?token=%s", userPatMatch, resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://verifier.meetchopra.com/verify/%s?token=%s", userPatMatch, resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/verimail/verimail.go b/pkg/detectors/verimail/verimail.goindex 92f909da4..89025009d 100644--- a/pkg/detectors/verimail/verimail.go+++ b/pkg/detectors/verimail/verimail.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.verimail.io/v3/verify?key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.verimail.io/v3/verify?key="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/veriphone/veriphone.go b/pkg/detectors/veriphone/veriphone.goindex 60e881730..5036dd7ca 100644--- a/pkg/detectors/veriphone/veriphone.go+++ b/pkg/detectors/veriphone/veriphone.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.veriphone.io/v2/verify?phone=%252B49-15123577723&key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.veriphone.io/v2/verify?phone=%252B49-15123577723&key="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/versioneye/versioneye.go b/pkg/detectors/versioneye/versioneye.goindex 6e84ceb61..bada2d0db 100644--- a/pkg/detectors/versioneye/versioneye.go+++ b/pkg/detectors/versioneye/versioneye.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://www.versioneye.com/api/v1/scans", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://www.versioneye.com/api/v1/scans", nil)+ if err != nil {+ continue+ }req.Header.Add("apiKey", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/versioneye/versioneye/versioneye.go b/pkg/detectors/versioneye/versioneye/versioneye.goindex 6e84ceb61..bada2d0db 100644--- a/pkg/detectors/versioneye/versioneye/versioneye.go+++ b/pkg/detectors/versioneye/versioneye/versioneye.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://www.versioneye.com/api/v1/scans", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://www.versioneye.com/api/v1/scans", nil)+ if err != nil {+ continue+ }req.Header.Add("apiKey", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/viewneo/viewneo.go b/pkg/detectors/viewneo/viewneo.goindex 724fbc278..9e2a0746d 100644--- a/pkg/detectors/viewneo/viewneo.go+++ b/pkg/detectors/viewneo/viewneo.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://cloud.viewneo.com/api/v1.0/playlist", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://cloud.viewneo.com/api/v1.0/playlist", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/viewneo/viewneo/viewneo.go b/pkg/detectors/viewneo/viewneo/viewneo.goindex 724fbc278..9e2a0746d 100644--- a/pkg/detectors/viewneo/viewneo/viewneo.go+++ b/pkg/detectors/viewneo/viewneo/viewneo.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://cloud.viewneo.com/api/v1.0/playlist", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://cloud.viewneo.com/api/v1.0/playlist", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/virustotal/virustotal.go b/pkg/detectors/virustotal/virustotal.goindex 5def39c3a..96218e637 100644--- a/pkg/detectors/virustotal/virustotal.go+++ b/pkg/detectors/virustotal/virustotal.go@@ -61,7 +61,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultcontinue}writer.Close()- req, _ := http.NewRequestWithContext(ctx, "POST", "https://www.virustotal.com/api/v3/urls", bytes.NewReader(body.Bytes()))+ req, err := http.NewRequestWithContext(ctx, "POST", "https://www.virustotal.com/api/v3/urls", bytes.NewReader(body.Bytes()))+ if err != nil {+ continue+ }req.Header.Add("Content-Type", writer.FormDataContentType())req.Header.Add("x-apikey", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/visualcrossing/visualcrossing.go b/pkg/detectors/visualcrossing/visualcrossing.goindex 76ec155be..07f87ec0c 100644--- a/pkg/detectors/visualcrossing/visualcrossing.go+++ b/pkg/detectors/visualcrossing/visualcrossing.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/LA?key=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/LA?key=%s", resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/voicegain/voicegain.go b/pkg/detectors/voicegain/voicegain.goindex dc3a0936a..5639d8c44 100644--- a/pkg/detectors/voicegain/voicegain.go+++ b/pkg/detectors/voicegain/voicegain.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.voicegain.ai/v1/sa/config", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.voicegain.ai/v1/sa/config", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/vouchery/vouchery.go b/pkg/detectors/vouchery/vouchery.goindex 3b424c4fe..c7a933b85 100644--- a/pkg/detectors/vouchery/vouchery.go+++ b/pkg/detectors/vouchery/vouchery.go@@ -57,7 +57,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s.vouchery.io/api/v2.0/users", subMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s.vouchery.io/api/v2.0/users", subMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/vpnapi/vpnapi.go b/pkg/detectors/vpnapi/vpnapi.goindex 2b8f1442a..917595fbb 100644--- a/pkg/detectors/vpnapi/vpnapi.go+++ b/pkg/detectors/vpnapi/vpnapi.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://vpnapi.io/api/8.8.8.8?key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://vpnapi.io/api/8.8.8.8?key="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/vultrapikey/vultrapikey.go b/pkg/detectors/vultrapikey/vultrapikey.goindex 5312d1e3f..a0bece152 100644--- a/pkg/detectors/vultrapikey/vultrapikey.go+++ b/pkg/detectors/vultrapikey/vultrapikey.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.vultr.com/v2/account", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.vultr.com/v2/account", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/vyte/vyte.go b/pkg/detectors/vyte/vyte.goindex 534fbba80..7f3cceb01 100644--- a/pkg/detectors/vyte/vyte.go+++ b/pkg/detectors/vyte/vyte.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.vyte.in/v2/events", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.vyte.in/v2/events", nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/vnd.vyte+json; version=3")req.Header.Add("Authorization", resMatch)res, err := client.Do(req)diff --git a/pkg/detectors/walkscore/walkscore.go b/pkg/detectors/walkscore/walkscore.goindex e3c5301a3..b6c33df75 100644--- a/pkg/detectors/walkscore/walkscore.go+++ b/pkg/detectors/walkscore/walkscore.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://transit.walkscore.com/transit/search/stops/?lat=47.6101359&lon=-122.3420567&wsapikey=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://transit.walkscore.com/transit/search/stops/?lat=47.6101359&lon=-122.3420567&wsapikey=%s", resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/weatherbit/weatherbit.go b/pkg/detectors/weatherbit/weatherbit.goindex 413677b15..f30b073e1 100644--- a/pkg/detectors/weatherbit/weatherbit.go+++ b/pkg/detectors/weatherbit/weatherbit.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.weatherbit.io/v2.0/history/airquality?lat=38.0&lon=-78.0&key=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.weatherbit.io/v2.0/history/airquality?lat=38.0&lon=-78.0&key=%s", resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/weatherstack/weatherstack.go b/pkg/detectors/weatherstack/weatherstack.goindex 4ffe5498a..d6d5bd689 100644--- a/pkg/detectors/weatherstack/weatherstack.go+++ b/pkg/detectors/weatherstack/weatherstack.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.weatherstack.com/current?access_key=%s&query=LA", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.weatherstack.com/current?access_key=%s&query=LA", resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/webex/webex.go b/pkg/detectors/webex/webex.goindex 7788ab87a..5f0f5754a 100644--- a/pkg/detectors/webex/webex.go+++ b/pkg/detectors/webex/webex.go@@ -59,7 +59,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader("grant_type=authorization_code&code=362ad374-735c-4f69-aa8e-bf384f8602de&client_id=" + id + "&client_secret=" + resMatch + "&redirect_uri=http%3A%2F%2Flocalhost.com%2Fb")- req, _ := http.NewRequestWithContext(ctx, "POST", "https://webexapis.com/v1/access_token", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://webexapis.com/v1/access_token", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/x-www-form-urlencoded")res, err := client.Do(req)if err != nil {diff --git a/pkg/detectors/webflow/webflow.go b/pkg/detectors/webflow/webflow.goindex 273b38894..07df14845 100644--- a/pkg/detectors/webflow/webflow.go+++ b/pkg/detectors/webflow/webflow.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.webflow.com/info", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.webflow.com/info", nil)+ if err != nil {+ continue+ }req.Header.Add("accept-version", "1.0.0")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/webscraper/webscraper.go b/pkg/detectors/webscraper/webscraper.goindex 6169ae955..466557409 100644--- a/pkg/detectors/webscraper/webscraper.go+++ b/pkg/detectors/webscraper/webscraper.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.webscraper.io/api/v1/sitemaps?api_token=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.webscraper.io/api/v1/sitemaps?api_token=%s", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/webscraping/webscraping.go b/pkg/detectors/webscraping/webscraping.goindex 1836d455d..12d4dbb29 100644--- a/pkg/detectors/webscraping/webscraping.go+++ b/pkg/detectors/webscraping/webscraping.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", `https://api.webscrapingapi.com/v1?api_key=`+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", `https://api.webscrapingapi.com/v1?api_key=`+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/wepay/wepay.go b/pkg/detectors/wepay/wepay.goindex 71ce83a4e..53a063350 100644--- a/pkg/detectors/wepay/wepay.go+++ b/pkg/detectors/wepay/wepay.go@@ -58,7 +58,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://stage-api.wepay.com/payments?type=credit_card&credit_card=4003830171874018", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://stage-api.wepay.com/payments?type=credit_card&credit_card=4003830171874018", nil)+ if err != nil {+ continue+ }req.Header.Add("App-Token", resMatch)req.Header.Add("App-Id", resAppIDMatch)req.Header.Add("Api-Version", "3.0")diff --git a/pkg/detectors/whoxy/whoxy.go b/pkg/detectors/whoxy/whoxy.goindex 863340a65..6ca653284 100644--- a/pkg/detectors/whoxy/whoxy.go+++ b/pkg/detectors/whoxy/whoxy.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.whoxy.com/?key=%s&account=balance", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.whoxy.com/?key=%s&account=balance", resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/worksnaps/worksnaps.go b/pkg/detectors/worksnaps/worksnaps.goindex 5fcb5cf34..0df209b37 100644--- a/pkg/detectors/worksnaps/worksnaps.go+++ b/pkg/detectors/worksnaps/worksnaps.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:ignored", resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.worksnaps.com/api/projects.xml", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.worksnaps.com/api/projects.xml", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/worksnaps/worksnaps/worksnaps.go b/pkg/detectors/worksnaps/worksnaps/worksnaps.goindex 5fcb5cf34..0df209b37 100644--- a/pkg/detectors/worksnaps/worksnaps/worksnaps.go+++ b/pkg/detectors/worksnaps/worksnaps/worksnaps.go@@ -51,7 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:ignored", resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.worksnaps.com/api/projects.xml", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.worksnaps.com/api/projects.xml", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/workstack/workstack.go b/pkg/detectors/workstack/workstack.goindex 548e3303f..b2cb64a9b 100644--- a/pkg/detectors/workstack/workstack.go+++ b/pkg/detectors/workstack/workstack.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.workstack.io/api/team?api_token="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://app.workstack.io/api/team?api_token="+resMatch, nil)+ if err != nil {+ continue+ }req.Header.Add("Accept", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/worldcoinindex/worldcoinindex.go b/pkg/detectors/worldcoinindex/worldcoinindex.goindex cf6f32d9f..cf1807b42 100644--- a/pkg/detectors/worldcoinindex/worldcoinindex.go+++ b/pkg/detectors/worldcoinindex/worldcoinindex.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://www.worldcoinindex.com/apiservice/ticker?key=%s&label=ethbtc-ltcbtc&fiat=btc", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://www.worldcoinindex.com/apiservice/ticker?key=%s&label=ethbtc-ltcbtc&fiat=btc", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {bodyBytes, err := ioutil.ReadAll(res.Body)diff --git a/pkg/detectors/worldweather/worldweather.go b/pkg/detectors/worldweather/worldweather.goindex 9212c152d..c5d43e362 100644--- a/pkg/detectors/worldweather/worldweather.go+++ b/pkg/detectors/worldweather/worldweather.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.worldweatheronline.com/premium/v1/search.ashx?query=LA&key=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.worldweatheronline.com/premium/v1/search.ashx?query=LA&key=%s", resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/wrike/wrike.go b/pkg/detectors/wrike/wrike.goindex 65b631594..e2b30a70c 100644--- a/pkg/detectors/wrike/wrike.go+++ b/pkg/detectors/wrike/wrike.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://app-us2.wrike.com/api/v4/contacts?me=true", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://app-us2.wrike.com/api/v4/contacts?me=true", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/yandex/yandex.go b/pkg/detectors/yandex/yandex.goindex d8e6107f8..95f227cc8 100644--- a/pkg/detectors/yandex/yandex.go+++ b/pkg/detectors/yandex/yandex.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://dictionary.yandex.net/api/v1/dicservice.json/getLangs?key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://dictionary.yandex.net/api/v1/dicservice.json/getLangs?key="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/youneedabudget/youneedabudget.go b/pkg/detectors/youneedabudget/youneedabudget.goindex 97881b45c..aab7a95f4 100644--- a/pkg/detectors/youneedabudget/youneedabudget.go+++ b/pkg/detectors/youneedabudget/youneedabudget.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.youneedabudget.com/v1/user", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.youneedabudget.com/v1/user", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/yousign/yousign.go b/pkg/detectors/yousign/yousign.goindex e10c827d6..e9021daec 100644--- a/pkg/detectors/yousign/yousign.go+++ b/pkg/detectors/yousign/yousign.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://staging-api.yousign.com/users", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://staging-api.yousign.com/users", nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)diff --git a/pkg/detectors/youtubeapikey/youtubeapikey.go b/pkg/detectors/youtubeapikey/youtubeapikey.goindex 21c2597a3..471b21854 100644--- a/pkg/detectors/youtubeapikey/youtubeapikey.go+++ b/pkg/detectors/youtubeapikey/youtubeapikey.go@@ -55,7 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://www.googleapis.com/youtube/v3/channelSections?key="+resMatch+"&channelId="+resIdmatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://www.googleapis.com/youtube/v3/channelSections?key="+resMatch+"&channelId="+resIdmatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/zapierwebhook/zapierwebhook.go b/pkg/detectors/zapierwebhook/zapierwebhook.goindex 3b3bc4b12..e90890560 100644--- a/pkg/detectors/zapierwebhook/zapierwebhook.go+++ b/pkg/detectors/zapierwebhook/zapierwebhook.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "POST", "https://hooks.zapier.com/hooks/catch/"+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://hooks.zapier.com/hooks/catch/"+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/zendeskapi/zendeskapi.go b/pkg/detectors/zendeskapi/zendeskapi.goindex b1ea3d517..e4ddd2f30 100644--- a/pkg/detectors/zendeskapi/zendeskapi.go+++ b/pkg/detectors/zendeskapi/zendeskapi.go@@ -71,7 +71,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s/token:%s", resEmail, resMatch)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", "https://"+resDomain+"/api/v2/users.json", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://"+resDomain+"/api/v2/users.json", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/zenkitapi/zenkitapi.go b/pkg/detectors/zenkitapi/zenkitapi.goindex 38e027a48..f5cd4a0a5 100644--- a/pkg/detectors/zenkitapi/zenkitapi.go+++ b/pkg/detectors/zenkitapi/zenkitapi.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://base.zenkit.com/api/v1/users/me", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://base.zenkit.com/api/v1/users/me", nil)+ if err != nil {+ continue+ }req.Header.Add("Zenkit-API-Key", resMatch)res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/zenscrape/zenscrape.go b/pkg/detectors/zenscrape/zenscrape.goindex 9201dc207..bea8f4dc9 100644--- a/pkg/detectors/zenscrape/zenscrape.go+++ b/pkg/detectors/zenscrape/zenscrape.go@@ -49,7 +49,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.zenscrape.com/api/v1/get?url=http://www.google.com", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://app.zenscrape.com/api/v1/get?url=http://www.google.com", nil)+ if err != nil {+ continue+ }req.Header.Add("apikey", fmt.Sprintf("%s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/zenserp/zenserp.go b/pkg/detectors/zenserp/zenserp.goindex a6ad4c42b..cc42b1cc4 100644--- a/pkg/detectors/zenserp/zenserp.go+++ b/pkg/detectors/zenserp/zenserp.go@@ -47,7 +47,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.zenserp.com/api/v2/search?apikey="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://app.zenserp.com/api/v2/search?apikey="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/zeplin/zeplin.go b/pkg/detectors/zeplin/zeplin.goindex fec492f8e..21f0272dc 100644--- a/pkg/detectors/zeplin/zeplin.go+++ b/pkg/detectors/zeplin/zeplin.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.zeplin.dev/v1/users/me", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.zeplin.dev/v1/users/me", nil)+ if err != nil {+ continue+ }req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/zerobounce/zerobounce.go b/pkg/detectors/zerobounce/zerobounce.goindex de78ba7c4..e335b3af2 100644--- a/pkg/detectors/zerobounce/zerobounce.go+++ b/pkg/detectors/zerobounce/zerobounce.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.zerobounce.net/v2/getcredits?api_key="+resMatch, nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://api.zerobounce.net/v2/getcredits?api_key="+resMatch, nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/zipapi/zipapi.go b/pkg/detectors/zipapi/zipapi.goindex 356d82317..d34c52c5c 100644--- a/pkg/detectors/zipapi/zipapi.go+++ b/pkg/detectors/zipapi/zipapi.go@@ -65,7 +65,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {data := fmt.Sprintf("%s:%s", resEmail, resPword)sEnc := b64.StdEncoding.EncodeToString([]byte(data))- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://service.zipapi.us/zipcode/90210/?X-API-KEY=%s", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://service.zipapi.us/zipcode/90210/?X-API-KEY=%s", resMatch), nil)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))res, err := client.Do(req)diff --git a/pkg/detectors/zipbooks/zipbooks.go b/pkg/detectors/zipbooks/zipbooks.goindex f0a5ba8bc..03b258935 100644--- a/pkg/detectors/zipbooks/zipbooks.go+++ b/pkg/detectors/zipbooks/zipbooks.go@@ -56,7 +56,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif verify {payload := strings.NewReader(fmt.Sprintf(`{"email": "%s", "password": "%s"}`, resMatch, resPword))- req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.zipbooks.com/v2/auth/login", payload)+ req, err := http.NewRequestWithContext(ctx, "POST", "https://api.zipbooks.com/v2/auth/login", payload)+ if err != nil {+ continue+ }req.Header.Add("Content-Type", "application/json")res, err := client.Do(req)if err == nil {diff --git a/pkg/detectors/zipcodeapi/zipcodeapi.go b/pkg/detectors/zipcodeapi/zipcodeapi.goindex 724b4a98b..675bd4a9e 100644--- a/pkg/detectors/zipcodeapi/zipcodeapi.go+++ b/pkg/detectors/zipcodeapi/zipcodeapi.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://www.zipcodeapi.com/rest/%s/distance.json/71601/72959/mile", resMatch), nil)+ req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://www.zipcodeapi.com/rest/%s/distance.json/71601/72959/mile", resMatch), nil)+ if err != nil {+ continue+ }res, err := client.Do(req)if err == nil {defer res.Body.Close()diff --git a/pkg/detectors/zonkafeedback/zonkafeedback.go b/pkg/detectors/zonkafeedback/zonkafeedback.goindex 5b311271a..2c3bb607f 100644--- a/pkg/detectors/zonkafeedback/zonkafeedback.go+++ b/pkg/detectors/zonkafeedback/zonkafeedback.go@@ -48,7 +48,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result}if verify {- req, _ := http.NewRequestWithContext(ctx, "GET", "https://app-us1.zonkafeedback.com/responses?page=1&limit=25&startDate=2020-05-02&endDate=2020-05-09", nil)+ req, err := http.NewRequestWithContext(ctx, "GET", "https://app-us1.zonkafeedback.com/responses?page=1&limit=25&startDate=2020-05-02&endDate=2020-05-09", nil)+ if err != nil {+ continue+ }req.Header.Add("Z-API-TOKEN", fmt.Sprintf("%s", resMatch))res, err := client.Do(req)if err == nil {