mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-11-10 07:04:24 +00:00
Remove the check to filter and return only a single unverified result.
This commit is contained in:
parent
46bc010165
commit
494e432803
736 changed files with 879 additions and 909 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -78,5 +78,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
}
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
}
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -85,5 +85,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
}
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
}
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -128,5 +128,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
}
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -86,5 +86,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
}
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
}
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
}
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -82,5 +82,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -78,5 +78,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
}
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -81,5 +81,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
}
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -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,12 +2,12 @@ package apilayer
|
|||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"regexp"
|
||||
"strings"
|
||||
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
|
||||
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
|
||||
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
|
||||
"net/http"
|
||||
"regexp"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type Scanner struct{}
|
||||
|
@ -18,7 +18,7 @@ var _ detectors.Detector = (*Scanner)(nil)
|
|||
var (
|
||||
client = common.SaneHttpClient()
|
||||
|
||||
//Make sure that your group is surrounded in boundry characters such as below to reduce false positives
|
||||
// Make sure that your group is surrounded in boundry characters such as below to reduce false positives
|
||||
keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"apilayer"}) + `\b([a-zA-Z0-9]{32})\b`)
|
||||
)
|
||||
|
||||
|
@ -57,7 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
if res.StatusCode >= 200 && res.StatusCode < 300 {
|
||||
s1.Verified = true
|
||||
} else {
|
||||
//This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
|
||||
// This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
|
||||
if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
|
||||
continue
|
||||
}
|
||||
|
@ -68,5 +68,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
results = append(results, s1)
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -90,5 +90,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
}
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -89,5 +89,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
}
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -88,5 +88,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
}
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -114,5 +114,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
}
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
}
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ var (
|
|||
client = common.SaneHttpClient()
|
||||
|
||||
// Make sure that your group is surrounded in boundary characters such as below to reduce false positives.
|
||||
//The number prefix increments for every Personal Access Token created.
|
||||
// The number prefix increments for every Personal Access Token created.
|
||||
keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"avaza"}) + `\b([0-9]+-[0-9a-f]{40})\b`)
|
||||
)
|
||||
|
||||
|
@ -71,5 +71,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
results = append(results, s1)
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
}
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -83,5 +83,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
}
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -77,5 +77,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
results = append(results, s1)
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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,11 +2,11 @@ package besnappy
|
|||
|
||||
import (
|
||||
"context"
|
||||
b64 "encoding/base64"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"regexp"
|
||||
"strings"
|
||||
b64 "encoding/base64"
|
||||
|
||||
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
|
||||
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
|
||||
|
@ -21,7 +21,7 @@ var _ detectors.Detector = (*Scanner)(nil)
|
|||
var (
|
||||
client = common.SaneHttpClient()
|
||||
|
||||
//Make sure that your group is surrounded in boundry characters such as below to reduce false positives
|
||||
// Make sure that your group is surrounded in boundry characters such as below to reduce false positives
|
||||
keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"besnappy"}) + `\b([a-f0-9]{64})\b`)
|
||||
)
|
||||
|
||||
|
@ -61,7 +61,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
if res.StatusCode >= 200 && res.StatusCode < 300 {
|
||||
s1.Verified = true
|
||||
} else {
|
||||
//This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
|
||||
// This function will check false positives for common test words, but also it will make sure the key appears 'random' enough to be a real key
|
||||
if detectors.IsKnownFalsePositive(resMatch, detectors.DefaultFalsePositives, true) {
|
||||
continue
|
||||
}
|
||||
|
@ -72,5 +72,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
results = append(results, s1)
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -80,5 +80,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
}
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -99,5 +99,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
}
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
}
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
||||
func getBitmexSignature(timeStamp string, secret string, action string, path string, payload string) string {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -67,5 +67,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
results = append(results, s1)
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -85,5 +85,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
results = append(results, s1)
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -91,5 +91,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
}
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -20,8 +20,8 @@ var (
|
|||
client = common.SaneHttpClient()
|
||||
|
||||
// Make sure that your group is surrounded in boundary characters such as below to reduce false positives.
|
||||
keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"browserstack","key","automate","local"}) + `\b([0-9a-zA-Z]{20})\b`)
|
||||
userPat = regexp.MustCompile(detectors.PrefixRegex([]string{"browserstack","user","automate","local"}) + `\b(^[a-zA-Z\d]+([._-]?[a-zA-Z\d]+)*[a-zA-Z\d]+$)\b`)
|
||||
keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"browserstack", "key", "automate", "local"}) + `\b([0-9a-zA-Z]{20})\b`)
|
||||
userPat = regexp.MustCompile(detectors.PrefixRegex([]string{"browserstack", "user", "automate", "local"}) + `\b(^[a-zA-Z\d]+([._-]?[a-zA-Z\d]+)*[a-zA-Z\d]+$)\b`)
|
||||
)
|
||||
|
||||
// Keywords are used for efficiently pre-filtering chunks.
|
||||
|
@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
results = append(results, s1)
|
||||
}
|
||||
}
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -83,5 +83,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
results = append(results, s1)
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -83,5 +83,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -79,5 +79,5 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
}
|
||||
}
|
||||
|
||||
return detectors.CleanResults(results), nil
|
||||
return results, nil
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue