Skip to content

Commit

Permalink
Remove the check to filter and return only a single unverified result.
Browse files Browse the repository at this point in the history
  • Loading branch information
ahrav committed Oct 21, 2022
1 parent 46bc010 commit 494e432
Show file tree
Hide file tree
Showing 736 changed files with 879 additions and 909 deletions.
2 changes: 1 addition & 1 deletion pkg/detectors/abbysale/abbysale.go
Expand Up @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/abstract/abstract.go
Expand Up @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/abuseipdb/abuseipdb.go
Expand Up @@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/accuweather/accuweather.go
Expand Up @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/adafruitio/adafruitio.go
Expand Up @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/adobeio/adobeio.go
Expand Up @@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result

}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/adzuna/adzuna.go
Expand Up @@ -78,5 +78,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/aeroworkflow/aeroworkflow.go
Expand Up @@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result

}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/agora/agora.go
Expand Up @@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/aha/aha.go
Expand Up @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/airbrakeprojectkey/airbrakeprojectkey.go
Expand Up @@ -85,5 +85,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result

}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/airbrakeuserkey/airbrakeuserkey.go
Expand Up @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/airship/airship.go
Expand Up @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/airtableapikey/airtableapikey.go
Expand Up @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/airvisual/airvisual.go
Expand Up @@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/alconost/alconost.go
Expand Up @@ -74,5 +74,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/alegra/alegra.go
Expand Up @@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/aletheiaapi/aletheiaapi.go
Expand Up @@ -72,5 +72,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/algoliaadminkey/algoliaadminkey.go
Expand Up @@ -78,5 +78,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}
}
return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/alibaba/alibaba.go
Expand Up @@ -128,5 +128,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/alienvault/alienvault.go
Expand Up @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/allsports/allsports.go
Expand Up @@ -75,5 +75,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/amadeus/amadeus.go
Expand Up @@ -86,5 +86,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/ambee/ambee.go
Expand Up @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/amplitudeapikey/amplitudeapikey.go
Expand Up @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/anypoint/anypoint.go
Expand Up @@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/apacta/apacta.go
Expand Up @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/api2cart/api2cart.go
Expand Up @@ -80,7 +80,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}

type Response struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/detectors/apideck/apideck.go
Expand Up @@ -82,5 +82,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result

}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/apiflash/apiflash.go
Expand Up @@ -78,5 +78,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/apifonica/apifonica.go
Expand Up @@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/apify/apify.go
Expand Up @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
12 changes: 6 additions & 6 deletions pkg/detectors/apilayer/apilayer.go
Expand Up @@ -2,12 +2,12 @@ package apilayer

import (
"context"
"net/http"
"regexp"
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"net/http"
"regexp"
"strings"
)

type Scanner struct{}
Expand All @@ -18,7 +18,7 @@ var _ detectors.Detector = (*Scanner)(nil)
var (
client = common.SaneHttpClient()

//Make sure that your group is surrounded in boundry characters such as below to reduce false positives
// Make sure that your group is surrounded in boundry characters such as below to reduce false positives
keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"apilayer"}) + `\b([a-zA-Z0-9]{32})\b`)
)

Expand Down Expand Up @@ -57,7 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
} else {
//This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
// This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
continue
}
Expand All @@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/apimatic/apimatic.go
Expand Up @@ -82,5 +82,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}
}
return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/apiscience/apiscience.go
Expand Up @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/apitemplate/apitemplate.go
Expand Up @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/apollo/apollo.go
Expand Up @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/appcues/appcues.go
Expand Up @@ -90,5 +90,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/appfollow/appfollow.go
Expand Up @@ -73,5 +73,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/appointedd/appointedd.go
Expand Up @@ -74,5 +74,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/appsynergy/appsynergy.go
Expand Up @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/apptivo/apptivo.go
Expand Up @@ -89,5 +89,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/artifactory/artifactory.go
Expand Up @@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/artsy/artsy.go
Expand Up @@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result

}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/asanaoauth/asanaoauth.go
Expand Up @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
Expand Up @@ -69,5 +69,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/assemblyai/assemblyai.go
Expand Up @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/atera/atera.go
Expand Up @@ -70,5 +70,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/audd/audd.go
Expand Up @@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, s1)
}

return detectors.CleanResults(results), nil
return results, nil
}
Expand Up @@ -88,5 +88,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/auth0oauth/auth0oauth.go
Expand Up @@ -114,5 +114,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}

return detectors.CleanResults(results), nil
return results, nil
}
2 changes: 1 addition & 1 deletion pkg/detectors/autodesk/autodesk.go
Expand Up @@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
}

return detectors.CleanResults(results), nil
return results, nil
}

0 comments on commit 494e432

Please sign in to comment.