Split out detector types into separate proto file in order to narrow CODEOWNERS scope (#4871)
Lint / golangci-lint (push) Waiting to run
Lint / semgrep (push) Waiting to run
Scan for secrets / test (push) Waiting to run
Test / test (push) Waiting to run
Test / test-community (push) Waiting to run
Release / mark-latest (push) Canceled after 0s
Release / Release (push) Canceled after 0s

We want to move the detector types out of the Scanning team purview. So I split off detector types into its own proto file (so that file detector_type.proto can be owned by the Integrations team), regenerated the pb files with "make protos", and made the detector files use the new generated detector_type.pb.go. Included the new detector_type.proto file in CODEOWNERS and made CODEOWNERS categories that contain larger teams be towards the top so that more fine grained ownership is filtered properly.
This commit is contained in:
Casey Tran
2026-04-07 16:16:31 -05:00
committed by GitHub
parent 9bfdb3e85e
commit 47e7b7cd74
1802 changed files with 12190 additions and 12062 deletions
+11 -10
View File
@@ -1,6 +1,16 @@
# catch-all
* @trufflesecurity/product-eng
# Shared
pkg/decoders/ @trufflesecurity/Scanning @trufflesecurity/OSS
pkg/engine/ @trufflesecurity/Scanning @trufflesecurity/OSS
pkg/gitparse/ @trufflesecurity/Scanning @trufflesecurity/OSS
pkg/giturl/ @trufflesecurity/Scanning @trufflesecurity/OSS
pkg/handlers/ @trufflesecurity/Scanning @trufflesecurity/OSS
pkg/iobuf/ @trufflesecurity/Scanning @trufflesecurity/OSS
pkg/sanitizer/ @trufflesecurity/Scanning @trufflesecurity/OSS
proto/ @trufflesecurity/Scanning @trufflesecurity/Integrations
# Scanning
pkg/sources/ @trufflesecurity/Scanning
pkg/writers/ @trufflesecurity/Scanning
@@ -18,16 +28,7 @@ pkg/sources/jenkins/ @trufflesecurity/Integrations
pkg/sources/postman/ @trufflesecurity/Integrations
pkg/sources/s3/ @trufflesecurity/Integrations
pkg/sources/travisci/ @trufflesecurity/Integrations
# Shared
pkg/decoders/ @trufflesecurity/Scanning @trufflesecurity/OSS
pkg/engine/ @trufflesecurity/Scanning @trufflesecurity/OSS
pkg/gitparse/ @trufflesecurity/Scanning @trufflesecurity/OSS
pkg/giturl/ @trufflesecurity/Scanning @trufflesecurity/OSS
pkg/handlers/ @trufflesecurity/Scanning @trufflesecurity/OSS
pkg/iobuf/ @trufflesecurity/Scanning @trufflesecurity/OSS
pkg/sanitizer/ @trufflesecurity/Scanning @trufflesecurity/OSS
proto/ @trufflesecurity/Scanning @trufflesecurity/Integrations
proto/detector_type.proto @trufflesecurity/Integrations
# OSS
pkg/detectors/ @trufflesecurity/OSS
+2 -2
View File
@@ -63,7 +63,7 @@ Note: Be sure to update the tests to reference the new secret values in GSM, or
### Creating a new Secret Scanner
1. Identify the Secret Detector name from the [/proto/detectors.proto](/proto/detectors.proto) `DetectorType` enum.
1. Identify the Secret Detector name from the [/proto/detector_type.proto](/proto/detector_type.proto) `DetectorType` enum.
2. Generate the Secret Detector
@@ -154,7 +154,7 @@ Do not embed test credentials in the test code. Instead, use GCP Secrets Manager
```bash
dos2unix ./scripts/gen_proto.sh
```
5. Open [/proto/detectors.proto](/proto/detectors.proto) file and add new detectors then save it. Make sure Docker is running and run this in Ubuntu command line.
5. Open [/proto/detector_type.proto](/proto/detector_type.proto) file and add new detectors then save it. Make sure Docker is running and run this in Ubuntu command line.
```bash
make protos
```
+5 -6
View File
@@ -59,7 +59,7 @@ Note: Be sure to update the tests to reference the new secret values in GSM, or
### Creating a new Secret Detector
1. Add a new Secret Detector enum to the [`DetectorType` list here](/proto/detectors.proto).
1. Add a new Secret Detector enum to the [`DetectorType` list here](/proto/detector_type.proto).
2. Run `make protos` to update the `.pb` files.
@@ -71,7 +71,7 @@ Note: Be sure to update the tests to reference the new secret values in GSM, or
```
4. Add the Secret Detector to TruffleHog's Default Detectors
Add the secret scanner to the [`pkg/engine/defaults/defaults.go`](https://github.com/trufflesecurity/trufflehog/blob/main/pkg/engine/defaults/defaults.go) file like [`github.com/trufflesecurity/trufflehog/v3/pkg/detectors/<detector_name>`](https://github.com/trufflesecurity/trufflehog/blob/b71ea27a696bdf1c3141f637fda4ee4936c2f2d6/pkg/engine/defaults/defaults.go#L9) and
Add the secret scanner to the [`pkg/engine/defaults/defaults.go`](https://github.com/trufflesecurity/trufflehog/blob/main/pkg/engine/defaults/defaults.go) file like [`github.com/trufflesecurity/trufflehog/v3/pkg/detectors/<detector_name>`](https://github.com/trufflesecurity/trufflehog/blob/b71ea27a696bdf1c3141f637fda4ee4936c2f2d6/pkg/engine/defaults/defaults.go#L9) and
[`<detector_name>.Scanner{}`](https://github.com/trufflesecurity/trufflehog/blob/b71ea27a696bdf1c3141f637fda4ee4936c2f2d6/pkg/engine/defaults/defaults.go#L1546)
5. Complete the Secret Detector.
@@ -117,7 +117,7 @@ To ensure the quality of your PR, make sure your tests are passing with verified
4. Found and unverified (indeterminately due to an unexpected API response)
5. Not found
Make any necessary updates to the tests. Note there might not be any changes required as the tests generated by the `go run hack/generate/generate.go` command are pretty good.
Make any necessary updates to the tests. Note there might not be any changes required as the tests generated by the `go run hack/generate/generate.go` command are pretty good.
[Here is an exemplary test file for a detector which covers all 5 test cases](https://github.com/trufflesecurity/trufflehog/blob/6f9065b0aae981133a7fa3431c17a5c6213be226/pkg/detectors/browserstack/browserstack_test.go).
4. Now run the tests and check to make sure they are passing ✔️!
@@ -125,7 +125,7 @@ To ensure the quality of your PR, make sure your tests are passing with verified
go test ./pkg/detectors/<detector> -tags=detectors
```
If the tests are passing, feel free to open a PR!
If the tests are passing, feel free to open a PR!
@@ -157,8 +157,7 @@ For example, consider a hypothetical authentication endpoint that returns `200 O
```bash
dos2unix ./scripts/gen_proto.sh
```
5. Open [/proto/detectors.proto](/proto/detectors.proto) file and add new detectors then save it. Make sure Docker is running and run this in Ubuntu command line.
5. Open [/proto/detector_type.proto](/proto/detector_type.proto) file and add new detectors then save it. Make sure Docker is running and run this in Ubuntu command line.
```bash
make protos
```
+13 -13
View File
@@ -8,7 +8,7 @@ import (
"strings"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
dpb "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
var (
@@ -16,15 +16,15 @@ var (
"all": allDetectors(),
}
detectorTypeValue = make(map[string]dpb.DetectorType, len(dpb.DetectorType_value))
validDetectors = make(map[dpb.DetectorType]struct{}, len(dpb.DetectorType_value))
maxDetectorType dpb.DetectorType
detectorTypeValue = make(map[string]detector_typepb.DetectorType, len(detector_typepb.DetectorType_value))
validDetectors = make(map[detector_typepb.DetectorType]struct{}, len(detector_typepb.DetectorType_value))
maxDetectorType detector_typepb.DetectorType
)
// Setup package local global variables.
func init() {
for k, v := range dpb.DetectorType_value {
dt := dpb.DetectorType(v)
for k, v := range detector_typepb.DetectorType_value {
dt := detector_typepb.DetectorType(v)
detectorTypeValue[strings.ToLower(k)] = dt
validDetectors[dt] = struct{}{}
if dt > maxDetectorType {
@@ -37,7 +37,7 @@ func init() {
// way for users to identify detectors, whether unique or not. A DetectorID
// with Version = 0 indicates all possible versions of a detector.
type DetectorID struct {
ID dpb.DetectorType
ID detector_typepb.DetectorType
Version int
}
@@ -117,7 +117,7 @@ func ParseVerifierEndpoints(verifierURLs map[string]string) (map[DetectorID][]st
}
func (id DetectorID) String() string {
name := dpb.DetectorType_name[int32(id.ID)]
name := detector_typepb.DetectorType_name[int32(id.ID)]
if name == "" {
name = "<invalid ID>"
}
@@ -129,9 +129,9 @@ func (id DetectorID) String() string {
// allDetectors returns an ordered slice of all detector types.
func allDetectors() []DetectorID {
all := make([]DetectorID, 0, len(dpb.DetectorType_name))
for id := range dpb.DetectorType_name {
all = append(all, DetectorID{ID: dpb.DetectorType(id)})
all := make([]DetectorID, 0, len(detector_typepb.DetectorType_name))
for id := range detector_typepb.DetectorType_name {
all = append(all, DetectorID{ID: detector_typepb.DetectorType(id)})
}
sort.Slice(all, func(i, j int) bool { return all[i].ID < all[j].ID })
return all
@@ -173,7 +173,7 @@ func asRange(input string) ([]DetectorID, error) {
return nil, fmt.Errorf("versions within ranges are not supported: %s", input)
}
step := dpb.DetectorType(1)
step := detector_typepb.DetectorType(1)
if dtStart.ID > dtEnd.ID {
step = -1
}
@@ -212,7 +212,7 @@ func asDetectorID(input string) (DetectorID, error) {
}
// Check if it's a detector ID.
if i, err := strconv.ParseInt(input, 10, 32); err == nil {
dt := dpb.DetectorType(i)
dt := detector_typepb.DetectorType(i)
if _, ok := validDetectors[dt]; !ok {
return DetectorID{}, fmt.Errorf("invalid detector ID: %s", input)
}
+6 -6
View File
@@ -4,7 +4,7 @@ import (
"testing"
"github.com/stretchr/testify/assert"
dpb "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestDetectorParsing(t *testing.T) {
@@ -15,9 +15,9 @@ func TestDetectorParsing(t *testing.T) {
"all": {"AlL", allDetectors()},
"trailing range": {"0-", allDetectors()},
"all after 1": {"1-", allDetectors()[1:]},
"named and valid range": {"aWs,8-9", []DetectorID{{ID: dpb.DetectorType_AWS}, {ID: dpb.DetectorType_Github}, {ID: dpb.DetectorType_Gitlab}}},
"named and valid range": {"aWs,8-9", []DetectorID{{ID: detector_typepb.DetectorType_AWS}, {ID: detector_typepb.DetectorType_Github}, {ID: detector_typepb.DetectorType_Gitlab}}},
"duplicate order preserved": {"9, 8, 9", []DetectorID{{ID: 9}, {ID: 8}}},
"named range": {"github - gitlab", []DetectorID{{ID: dpb.DetectorType_Github}, {ID: dpb.DetectorType_Gitlab}}},
"named range": {"github - gitlab", []DetectorID{{ID: detector_typepb.DetectorType_Github}, {ID: detector_typepb.DetectorType_Gitlab}}},
"range preserved": {"8-9, 7-10", []DetectorID{{ID: 8}, {ID: 9}, {ID: 7}, {ID: 10}}},
"reverse range": {"9-8", []DetectorID{{ID: 9}, {ID: 8}}},
"range preserved with all": {"10-,all", append(allDetectors()[10:], allDetectors()[:10]...)},
@@ -25,12 +25,12 @@ func TestDetectorParsing(t *testing.T) {
"invalid end range": {"0-1337", nil},
"invalid name": {"foo", nil},
"negative": {"-1", nil},
"github.v1": {"github.v1", []DetectorID{{ID: dpb.DetectorType_Github, Version: 1}}},
"gitlab.v100": {"gitlab.v100", []DetectorID{{ID: dpb.DetectorType_Gitlab, Version: 100}}},
"github.v1": {"github.v1", []DetectorID{{ID: detector_typepb.DetectorType_Github, Version: 1}}},
"gitlab.v100": {"gitlab.v100", []DetectorID{{ID: detector_typepb.DetectorType_Gitlab, Version: 100}}},
"range with versions": {"github.v2 - gitlab.v1", nil},
"invalid version no v": {"gitlab.2", nil},
"invalid version no number": {"gitlab.github", nil},
"capital V is fine": {"GiTlAb.V2", []DetectorID{{ID: dpb.DetectorType_Gitlab, Version: 2}}},
"capital V is fine": {"GiTlAb.V2", []DetectorID{{ID: detector_typepb.DetectorType_Gitlab, Version: 2}}},
"id number with version": {"8.v2", []DetectorID{{ID: 8, Version: 2}}},
}
+4 -4
View File
@@ -16,7 +16,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/custom_detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
// The maximum number of matches from one chunk. This const is used when
@@ -222,7 +222,7 @@ func (c *CustomRegexWebhook) createResults(ctx context.Context, match map[string
}
result := detectors.Result{
DetectorType: detectorspb.DetectorType_CustomRegex,
DetectorType: detector_typepb.DetectorType_CustomRegex,
DetectorName: c.GetName(),
ExtraData: map[string]string{},
}
@@ -398,8 +398,8 @@ func permutateMatches(regexMatches map[string][][]string) []map[string][]string
return matches
}
func (c *CustomRegexWebhook) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_CustomRegex
func (c *CustomRegexWebhook) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_CustomRegex
}
const defaultDescription = "This is a user-defined detector with no description provided."
@@ -11,7 +11,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/custom_detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
"github.com/trufflesecurity/trufflehog/v3/pkg/protoyaml"
)
@@ -317,7 +317,7 @@ func TestDetectorValidations(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_CustomRegex,
DetectorType: detector_typepb.DetectorType_CustomRegex,
DetectorName: "test",
Verified: false,
Raw: []byte("MyStr0ngP@ssword!"),
@@ -364,7 +364,7 @@ func TestDetectorValidations(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_CustomRegex,
DetectorType: detector_typepb.DetectorType_CustomRegex,
DetectorName: "test",
Verified: false,
Raw: []byte("MyStrongPassword!"),
@@ -411,7 +411,7 @@ func TestDetectorValidations(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_CustomRegex,
DetectorType: detector_typepb.DetectorType_CustomRegex,
DetectorName: "test",
Verified: false,
Raw: []byte("MyStrongPassword!"),
@@ -458,7 +458,7 @@ func TestDetectorValidations(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_CustomRegex,
DetectorType: detector_typepb.DetectorType_CustomRegex,
DetectorName: "test",
Verified: false,
Raw: []byte("MyStr@ngP@ssword!"),
@@ -506,7 +506,7 @@ func TestDetectorValidations(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_CustomRegex,
DetectorType: detector_typepb.DetectorType_CustomRegex,
DetectorName: "test",
Verified: false,
Raw: []byte("MyStrongP@ssword"),
@@ -554,7 +554,7 @@ func TestDetectorValidations(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_CustomRegex,
DetectorType: detector_typepb.DetectorType_CustomRegex,
DetectorName: "test",
Verified: false,
Raw: []byte("mystrongp@ssword"),
@@ -590,7 +590,7 @@ func TestDetectorValidations(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_CustomRegex,
DetectorType: detector_typepb.DetectorType_CustomRegex,
DetectorName: "test",
Verified: false,
Raw: []byte("c392c9837d69b44c764cbf260b-e6184MyStrongP@ssword"),
+4 -4
View File
@@ -9,7 +9,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
resMatch := strings.TrimSpace(match[1])
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_Abstract,
DetectorType: detector_typepb.DetectorType_Abstract,
Raw: []byte(resMatch),
}
@@ -92,8 +92,8 @@ func verifyAbstract(ctx context.Context, client *http.Client, resMatch string) (
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Abstract
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_Abstract
}
func (s Scanner) Description() string {
@@ -14,7 +14,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAbstract_FromChunk(t *testing.T) {
@@ -49,7 +49,7 @@ func TestAbstract_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Abstract,
DetectorType: detector_typepb.DetectorType_Abstract,
Verified: true,
},
},
@@ -65,7 +65,7 @@ func TestAbstract_FromChunk(t *testing.T) {
},
want: func() []detectors.Result {
r := detectors.Result{
DetectorType: detectorspb.DetectorType_Abstract,
DetectorType: detector_typepb.DetectorType_Abstract,
Verified: false,
}
r.SetVerificationError(context.DeadlineExceeded)
@@ -83,7 +83,7 @@ func TestAbstract_FromChunk(t *testing.T) {
},
want: func() []detectors.Result {
r := detectors.Result{
DetectorType: detectorspb.DetectorType_Abstract,
DetectorType: detector_typepb.DetectorType_Abstract,
Verified: false,
}
r.SetVerificationError(fmt.Errorf("unexpected HTTP response status 500"))
@@ -101,7 +101,7 @@ func TestAbstract_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Abstract,
DetectorType: detector_typepb.DetectorType_Abstract,
Verified: false,
},
},
+4 -4
View File
@@ -12,7 +12,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -54,7 +54,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
resMatch := strings.TrimSpace(match[1])
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_AbuseIPDB,
DetectorType: detector_typepb.DetectorType_AbuseIPDB,
Raw: []byte(resMatch),
}
@@ -103,8 +103,8 @@ func verifyAbuseIPDB(ctx context.Context, client *http.Client, resMatch string)
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_AbuseIPDB
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_AbuseIPDB
}
func (s Scanner) Description() string {
@@ -14,7 +14,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAbuseIPDB_FromChunk(t *testing.T) {
@@ -49,7 +49,7 @@ func TestAbuseIPDB_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AbuseIPDB,
DetectorType: detector_typepb.DetectorType_AbuseIPDB,
Verified: true,
},
},
@@ -65,7 +65,7 @@ func TestAbuseIPDB_FromChunk(t *testing.T) {
},
want: func() []detectors.Result {
r := detectors.Result{
DetectorType: detectorspb.DetectorType_AbuseIPDB,
DetectorType: detector_typepb.DetectorType_AbuseIPDB,
Verified: false,
}
r.SetVerificationError(context.DeadlineExceeded)
@@ -83,7 +83,7 @@ func TestAbuseIPDB_FromChunk(t *testing.T) {
},
want: func() []detectors.Result {
r := detectors.Result{
DetectorType: detectorspb.DetectorType_AbuseIPDB,
DetectorType: detector_typepb.DetectorType_AbuseIPDB,
Verified: false,
}
r.SetVerificationError(fmt.Errorf("unexpected HTTP response status 500"))
@@ -101,7 +101,7 @@ func TestAbuseIPDB_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AbuseIPDB,
DetectorType: detector_typepb.DetectorType_AbuseIPDB,
Verified: false,
},
},
+4 -4
View File
@@ -10,7 +10,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -52,7 +52,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
resMatch := strings.TrimSpace(match[1])
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_Abyssale,
DetectorType: detector_typepb.DetectorType_Abyssale,
Raw: []byte(resMatch),
}
@@ -92,8 +92,8 @@ func verifyAbyssale(ctx context.Context, client *http.Client, resMatch string) (
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Abyssale
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_Abyssale
}
func (s Scanner) Description() string {
@@ -11,7 +11,7 @@ import (
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
"github.com/google/go-cmp/cmp"
@@ -50,7 +50,7 @@ func TestAbyssale_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Abyssale,
DetectorType: detector_typepb.DetectorType_Abyssale,
Verified: true,
},
},
@@ -66,7 +66,7 @@ func TestAbyssale_FromChunk(t *testing.T) {
},
want: func() []detectors.Result {
r := detectors.Result{
DetectorType: detectorspb.DetectorType_Abyssale,
DetectorType: detector_typepb.DetectorType_Abyssale,
Verified: false,
}
r.SetVerificationError(context.DeadlineExceeded)
@@ -84,7 +84,7 @@ func TestAbyssale_FromChunk(t *testing.T) {
},
want: func() []detectors.Result {
r := detectors.Result{
DetectorType: detectorspb.DetectorType_Abyssale,
DetectorType: detector_typepb.DetectorType_Abyssale,
Verified: false,
}
r.SetVerificationError(fmt.Errorf("unexpected HTTP response status 500"))
@@ -102,7 +102,7 @@ func TestAbyssale_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Abyssale,
DetectorType: detector_typepb.DetectorType_Abyssale,
Verified: false,
},
},
+4 -4
View File
@@ -9,7 +9,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -54,7 +54,7 @@ func (s Scanner) ProcessMatches(ctx context.Context, matches [][]string, verify
uniqueMatches := getUniqueMatches(matches)
for key := range uniqueMatches {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_Accuweather,
DetectorType: detector_typepb.DetectorType_Accuweather,
Raw: []byte(key),
}
@@ -106,8 +106,8 @@ func verifyAccuweather(ctx context.Context, client *http.Client, key string) (bo
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Accuweather
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_Accuweather
}
func (s Scanner) Description() string {
@@ -14,7 +14,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAccuweather_FromChunk(t *testing.T) {
@@ -49,7 +49,7 @@ func TestAccuweather_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Accuweather,
DetectorType: detector_typepb.DetectorType_Accuweather,
Verified: true,
},
},
@@ -65,7 +65,7 @@ func TestAccuweather_FromChunk(t *testing.T) {
},
want: func() []detectors.Result {
r := detectors.Result{
DetectorType: detectorspb.DetectorType_Accuweather,
DetectorType: detector_typepb.DetectorType_Accuweather,
Verified: false,
}
r.SetVerificationError(context.DeadlineExceeded)
@@ -83,7 +83,7 @@ func TestAccuweather_FromChunk(t *testing.T) {
},
want: func() []detectors.Result {
r := detectors.Result{
DetectorType: detectorspb.DetectorType_Accuweather,
DetectorType: detector_typepb.DetectorType_Accuweather,
Verified: false,
}
r.SetVerificationError(fmt.Errorf("unexpected HTTP response status 500"))
@@ -101,7 +101,7 @@ func TestAccuweather_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Accuweather,
DetectorType: detector_typepb.DetectorType_Accuweather,
Verified: false,
},
},
@@ -15,7 +15,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
v1 "github.com/trufflesecurity/trufflehog/v3/pkg/detectors/accuweather/v1"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAccuweather_FromChunk(t *testing.T) {
@@ -50,7 +50,7 @@ func TestAccuweather_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Accuweather,
DetectorType: detector_typepb.DetectorType_Accuweather,
Verified: true,
},
},
@@ -66,7 +66,7 @@ func TestAccuweather_FromChunk(t *testing.T) {
},
want: func() []detectors.Result {
r := detectors.Result{
DetectorType: detectorspb.DetectorType_Accuweather,
DetectorType: detector_typepb.DetectorType_Accuweather,
Verified: false,
}
r.SetVerificationError(context.DeadlineExceeded)
@@ -84,7 +84,7 @@ func TestAccuweather_FromChunk(t *testing.T) {
},
want: func() []detectors.Result {
r := detectors.Result{
DetectorType: detectorspb.DetectorType_Accuweather,
DetectorType: detector_typepb.DetectorType_Accuweather,
Verified: false,
}
r.SetVerificationError(fmt.Errorf("unexpected HTTP response status 500"))
@@ -102,7 +102,7 @@ func TestAccuweather_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Accuweather,
DetectorType: detector_typepb.DetectorType_Accuweather,
Verified: false,
},
},
+4 -4
View File
@@ -10,7 +10,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -52,7 +52,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
resMatch := strings.TrimSpace(match[1])
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_AdafruitIO,
DetectorType: detector_typepb.DetectorType_AdafruitIO,
Raw: []byte(resMatch),
}
@@ -91,8 +91,8 @@ func verifyAdafruitIO(ctx context.Context, client *http.Client, resMatch string)
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_AdafruitIO
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_AdafruitIO
}
func (s Scanner) Description() string {
@@ -14,7 +14,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAdafruitIO_FromChunk(t *testing.T) {
@@ -49,7 +49,7 @@ func TestAdafruitIO_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AdafruitIO,
DetectorType: detector_typepb.DetectorType_AdafruitIO,
Verified: true,
},
},
@@ -65,7 +65,7 @@ func TestAdafruitIO_FromChunk(t *testing.T) {
},
want: func() []detectors.Result {
r := detectors.Result{
DetectorType: detectorspb.DetectorType_AdafruitIO,
DetectorType: detector_typepb.DetectorType_AdafruitIO,
Verified: false,
}
r.SetVerificationError(context.DeadlineExceeded)
@@ -83,7 +83,7 @@ func TestAdafruitIO_FromChunk(t *testing.T) {
},
want: func() []detectors.Result {
r := detectors.Result{
DetectorType: detectorspb.DetectorType_AdafruitIO,
DetectorType: detector_typepb.DetectorType_AdafruitIO,
Verified: false,
}
r.SetVerificationError(fmt.Errorf("unexpected HTTP response status 500"))
@@ -101,7 +101,7 @@ func TestAdafruitIO_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AdafruitIO,
DetectorType: detector_typepb.DetectorType_AdafruitIO,
Verified: false,
},
},
+4 -4
View File
@@ -10,7 +10,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -52,7 +52,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for key := range uniqueKeys {
for id := range uniqueIds {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_AdobeIO,
DetectorType: detector_typepb.DetectorType_AdobeIO,
Raw: []byte(key),
RawV2: []byte(key + id),
}
@@ -105,8 +105,8 @@ func verifyAdobeIOSecret(ctx context.Context, client *http.Client, key string, i
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_AdobeIO
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_AdobeIO
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAdobeIO_FromChunk(t *testing.T) {
@@ -49,7 +49,7 @@ func TestAdobeIO_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AdobeIO,
DetectorType: detector_typepb.DetectorType_AdobeIO,
Verified: true,
},
},
@@ -65,7 +65,7 @@ func TestAdobeIO_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AdobeIO,
DetectorType: detector_typepb.DetectorType_AdobeIO,
Verified: false,
},
},
+4 -4
View File
@@ -10,7 +10,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -57,7 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
resIdMatch := strings.TrimSpace(idMatch[1])
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_Adzuna,
DetectorType: detector_typepb.DetectorType_Adzuna,
Raw: []byte(resMatch),
RawV2: []byte(resMatch + resIdMatch),
}
@@ -100,8 +100,8 @@ func verifyAdzuna(ctx context.Context, client *http.Client, resMatch, resIdMatch
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Adzuna
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_Adzuna
}
func (s Scanner) Description() string {
@@ -14,7 +14,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAdzuna_FromChunk(t *testing.T) {
@@ -50,7 +50,7 @@ func TestAdzuna_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Adzuna,
DetectorType: detector_typepb.DetectorType_Adzuna,
Verified: true,
},
},
@@ -66,7 +66,7 @@ func TestAdzuna_FromChunk(t *testing.T) {
},
want: func() []detectors.Result {
r := detectors.Result{
DetectorType: detectorspb.DetectorType_Adzuna,
DetectorType: detector_typepb.DetectorType_Adzuna,
Verified: false,
}
r.SetVerificationError(context.DeadlineExceeded)
@@ -84,7 +84,7 @@ func TestAdzuna_FromChunk(t *testing.T) {
},
want: func() []detectors.Result {
r := detectors.Result{
DetectorType: detectorspb.DetectorType_Adzuna,
DetectorType: detector_typepb.DetectorType_Adzuna,
Verified: false,
}
r.SetVerificationError(fmt.Errorf("unexpected HTTP response status 500"))
@@ -102,7 +102,7 @@ func TestAdzuna_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Adzuna,
DetectorType: detector_typepb.DetectorType_Adzuna,
Verified: false,
},
},
+4 -4
View File
@@ -10,7 +10,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -58,7 +58,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
resIdMatch := strings.TrimSpace(idmatch[1])
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_Aeroworkflow,
DetectorType: detector_typepb.DetectorType_Aeroworkflow,
Raw: []byte(resMatch),
RawV2: []byte(resMatch + resIdMatch),
}
@@ -104,8 +104,8 @@ func verifyAeroworkflow(ctx context.Context, client *http.Client, resMatch, resI
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Aeroworkflow
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_Aeroworkflow
}
func (s Scanner) Description() string {
@@ -14,7 +14,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAeroworkflow_FromChunk(t *testing.T) {
@@ -50,7 +50,7 @@ func TestAeroworkflow_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Aeroworkflow,
DetectorType: detector_typepb.DetectorType_Aeroworkflow,
Verified: true,
},
},
@@ -66,7 +66,7 @@ func TestAeroworkflow_FromChunk(t *testing.T) {
},
want: func() []detectors.Result {
r := detectors.Result{
DetectorType: detectorspb.DetectorType_Aeroworkflow,
DetectorType: detector_typepb.DetectorType_Aeroworkflow,
Verified: false,
}
r.SetVerificationError(context.DeadlineExceeded)
@@ -84,7 +84,7 @@ func TestAeroworkflow_FromChunk(t *testing.T) {
},
want: func() []detectors.Result {
r := detectors.Result{
DetectorType: detectorspb.DetectorType_Aeroworkflow,
DetectorType: detector_typepb.DetectorType_Aeroworkflow,
Verified: false,
}
r.SetVerificationError(fmt.Errorf("unexpected HTTP response status 500"))
@@ -102,7 +102,7 @@ func TestAeroworkflow_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Aeroworkflow,
DetectorType: detector_typepb.DetectorType_Aeroworkflow,
Verified: false,
},
},
+4 -4
View File
@@ -10,7 +10,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -65,7 +65,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_Agora,
DetectorType: detector_typepb.DetectorType_Agora,
Raw: []byte(resMatch),
RawV2: []byte(resMatch + resSecret),
}
@@ -108,8 +108,8 @@ func verifyAgora(ctx context.Context, client *http.Client, resMatch, resSecret s
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Agora
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_Agora
}
func (s Scanner) Description() string {
@@ -14,7 +14,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAgora_FromChunk(t *testing.T) {
@@ -50,11 +50,11 @@ func TestAgora_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Agora,
DetectorType: detector_typepb.DetectorType_Agora,
Verified: true,
},
{
DetectorType: detectorspb.DetectorType_Agora,
DetectorType: detector_typepb.DetectorType_Agora,
Verified: false,
},
},
@@ -70,7 +70,7 @@ func TestAgora_FromChunk(t *testing.T) {
},
want: func() []detectors.Result {
r := detectors.Result{
DetectorType: detectorspb.DetectorType_Agora,
DetectorType: detector_typepb.DetectorType_Agora,
Verified: false,
}
r.SetVerificationError(context.DeadlineExceeded)
@@ -88,7 +88,7 @@ func TestAgora_FromChunk(t *testing.T) {
},
want: func() []detectors.Result {
r := detectors.Result{
DetectorType: detectorspb.DetectorType_Agora,
DetectorType: detector_typepb.DetectorType_Agora,
Verified: false,
}
r.SetVerificationError(fmt.Errorf("unexpected HTTP response status 500"))
@@ -106,11 +106,11 @@ func TestAgora_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Agora,
DetectorType: detector_typepb.DetectorType_Agora,
Verified: false,
},
{
DetectorType: detectorspb.DetectorType_Agora,
DetectorType: detector_typepb.DetectorType_Agora,
Verified: false,
},
},
+4 -4
View File
@@ -9,7 +9,7 @@ import (
regexp "github.com/wasilibs/go-re2"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -34,8 +34,8 @@ func (s Scanner) Keywords() []string {
return []string{"aha.io"}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Aha
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_Aha
}
func (s Scanner) Description() string {
@@ -71,7 +71,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
resMatch := strings.TrimSpace(match[1])
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_Aha,
DetectorType: detector_typepb.DetectorType_Aha,
Raw: []byte(resMatch),
RawV2: []byte(resMatch + url),
}
+5 -5
View File
@@ -14,7 +14,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAha_FromChunk(t *testing.T) {
@@ -50,7 +50,7 @@ func TestAha_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Aha,
DetectorType: detector_typepb.DetectorType_Aha,
Verified: true,
},
},
@@ -66,7 +66,7 @@ func TestAha_FromChunk(t *testing.T) {
},
want: func() []detectors.Result {
r := detectors.Result{
DetectorType: detectorspb.DetectorType_Aha,
DetectorType: detector_typepb.DetectorType_Aha,
Verified: false,
}
r.SetVerificationError(context.DeadlineExceeded)
@@ -84,7 +84,7 @@ func TestAha_FromChunk(t *testing.T) {
},
want: func() []detectors.Result {
r := detectors.Result{
DetectorType: detectorspb.DetectorType_Aha,
DetectorType: detector_typepb.DetectorType_Aha,
Verified: false,
}
r.SetVerificationError(fmt.Errorf("unexpected HTTP response status 500"))
@@ -102,7 +102,7 @@ func TestAha_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Aha,
DetectorType: detector_typepb.DetectorType_Aha,
Verified: false,
},
},
@@ -11,7 +11,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -53,7 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for key := range uniqueKeys {
for id := range uniqueIds {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_AirbrakeProjectKey,
DetectorType: detector_typepb.DetectorType_AirbrakeProjectKey,
Raw: []byte(key),
RawV2: []byte(key + id),
}
@@ -113,8 +113,8 @@ func verifyAirbrakeProjectKey(ctx context.Context, client *http.Client, key stri
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_AirbrakeProjectKey
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_AirbrakeProjectKey
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAirbrakeProjectKey_FromChunk(t *testing.T) {
@@ -49,7 +49,7 @@ func TestAirbrakeProjectKey_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AirbrakeProjectKey,
DetectorType: detector_typepb.DetectorType_AirbrakeProjectKey,
Verified: true,
},
},
@@ -65,7 +65,7 @@ func TestAirbrakeProjectKey_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AirbrakeProjectKey,
DetectorType: detector_typepb.DetectorType_AirbrakeProjectKey,
Verified: false,
},
},
@@ -10,7 +10,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for key := range uniqueKeys {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_AirbrakeUserKey,
DetectorType: detector_typepb.DetectorType_AirbrakeUserKey,
Raw: []byte(key),
ExtraData: map[string]string{
"rotation_guide": "https://howtorotate.com/docs/tutorials/airbrake/",
@@ -97,8 +97,8 @@ func verifyAirbrakeUserKey(ctx context.Context, client *http.Client, key string)
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_AirbrakeUserKey
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_AirbrakeUserKey
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAirbrakeUserKey_FromChunk(t *testing.T) {
@@ -48,7 +48,7 @@ func TestAirbrakeUserKey_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AirbrakeUserKey,
DetectorType: detector_typepb.DetectorType_AirbrakeUserKey,
Verified: true,
},
},
@@ -64,7 +64,7 @@ func TestAirbrakeUserKey_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AirbrakeUserKey,
DetectorType: detector_typepb.DetectorType_AirbrakeUserKey,
Verified: false,
},
},
+4 -4
View File
@@ -10,7 +10,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for key := range uniqueKeys {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_Airship,
DetectorType: detector_typepb.DetectorType_Airship,
Raw: []byte(key),
}
@@ -94,8 +94,8 @@ func verifyAirshipKey(ctx context.Context, client *http.Client, key string) (boo
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Airship
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_Airship
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAirship_FromChunk(t *testing.T) {
@@ -48,7 +48,7 @@ func TestAirship_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Airship,
DetectorType: detector_typepb.DetectorType_Airship,
Verified: true,
},
},
@@ -64,7 +64,7 @@ func TestAirship_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Airship,
DetectorType: detector_typepb.DetectorType_Airship,
Verified: false,
},
},
+4 -4
View File
@@ -10,7 +10,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for match := range uniqueMatches {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_AirtableOAuth,
DetectorType: detector_typepb.DetectorType_AirtableOAuth,
Raw: []byte(match),
}
@@ -99,8 +99,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool,
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_AirtableOAuth
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_AirtableOAuth
}
func (s Scanner) Description() string {
@@ -14,7 +14,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
// TestAirtableoauth_FromChunk verifies the validity of an Airtable OAuth token
@@ -56,7 +56,7 @@ func TestAirtableoauth_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AirtableOAuth,
DetectorType: detector_typepb.DetectorType_AirtableOAuth,
Verified: true,
},
},
@@ -73,7 +73,7 @@ func TestAirtableoauth_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AirtableOAuth,
DetectorType: detector_typepb.DetectorType_AirtableOAuth,
Verified: false,
},
},
@@ -102,7 +102,7 @@ func TestAirtableoauth_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AirtableOAuth,
DetectorType: detector_typepb.DetectorType_AirtableOAuth,
Verified: false,
},
},
@@ -119,7 +119,7 @@ func TestAirtableoauth_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AirtableOAuth,
DetectorType: detector_typepb.DetectorType_AirtableOAuth,
Verified: false,
},
},
@@ -10,7 +10,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -40,7 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for match := range uniqueMatches {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_AirtablePersonalAccessToken,
DetectorType: detector_typepb.DetectorType_AirtablePersonalAccessToken,
Raw: []byte(match),
}
@@ -94,8 +94,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool,
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_AirtablePersonalAccessToken
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_AirtablePersonalAccessToken
}
func (s Scanner) Description() string {
@@ -14,7 +14,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAirtablepersonalaccesstoken_FromChunk(t *testing.T) {
@@ -50,7 +50,7 @@ func TestAirtablepersonalaccesstoken_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AirtablePersonalAccessToken,
DetectorType: detector_typepb.DetectorType_AirtablePersonalAccessToken,
Verified: true,
},
},
@@ -67,7 +67,7 @@ func TestAirtablepersonalaccesstoken_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AirtablePersonalAccessToken,
DetectorType: detector_typepb.DetectorType_AirtablePersonalAccessToken,
Verified: false,
},
},
@@ -96,7 +96,7 @@ func TestAirtablepersonalaccesstoken_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AirtablePersonalAccessToken,
DetectorType: detector_typepb.DetectorType_AirtablePersonalAccessToken,
Verified: false,
},
},
@@ -113,7 +113,7 @@ func TestAirtablepersonalaccesstoken_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AirtablePersonalAccessToken,
DetectorType: detector_typepb.DetectorType_AirtablePersonalAccessToken,
Verified: false,
},
},
+4 -4
View File
@@ -10,7 +10,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for key := range uniqueKeys {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_AirVisual,
DetectorType: detector_typepb.DetectorType_AirVisual,
Raw: []byte(key),
}
@@ -94,8 +94,8 @@ func verifyAirVisualKey(ctx context.Context, client *http.Client, key string) (b
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_AirVisual
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_AirVisual
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAirVisual_FromChunk(t *testing.T) {
@@ -48,7 +48,7 @@ func TestAirVisual_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AirVisual,
DetectorType: detector_typepb.DetectorType_AirVisual,
Verified: true,
},
},
@@ -64,7 +64,7 @@ func TestAirVisual_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AirVisual,
DetectorType: detector_typepb.DetectorType_AirVisual,
Verified: false,
},
},
+4 -4
View File
@@ -10,7 +10,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for key := range uniqueKeys {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_Aiven,
DetectorType: detector_typepb.DetectorType_Aiven,
Raw: []byte(key),
}
@@ -92,8 +92,8 @@ func verifyAivenKey(ctx context.Context, client *http.Client, key string) (bool,
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Aiven
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_Aiven
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAiven_FromChunk(t *testing.T) {
@@ -48,7 +48,7 @@ func TestAiven_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Aiven,
DetectorType: detector_typepb.DetectorType_Aiven,
Verified: true,
},
},
@@ -64,7 +64,7 @@ func TestAiven_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Aiven,
DetectorType: detector_typepb.DetectorType_Aiven,
Verified: false,
},
},
+4 -4
View File
@@ -10,7 +10,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -43,7 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for match := range uniqueMatches {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_Alchemy,
DetectorType: detector_typepb.DetectorType_Alchemy,
Raw: []byte(match),
}
@@ -92,8 +92,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool,
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Alchemy
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_Alchemy
}
func (s Scanner) Description() string {
@@ -14,7 +14,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAlchemy_FromChunk(t *testing.T) {
@@ -50,7 +50,7 @@ func TestAlchemy_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Alchemy,
DetectorType: detector_typepb.DetectorType_Alchemy,
Verified: true,
},
},
@@ -67,7 +67,7 @@ func TestAlchemy_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Alchemy,
DetectorType: detector_typepb.DetectorType_Alchemy,
Verified: false,
},
},
@@ -96,7 +96,7 @@ func TestAlchemy_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Alchemy,
DetectorType: detector_typepb.DetectorType_Alchemy,
Verified: false,
},
},
@@ -113,7 +113,7 @@ func TestAlchemy_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Alchemy,
DetectorType: detector_typepb.DetectorType_Alchemy,
Verified: false,
},
},
+4 -4
View File
@@ -11,7 +11,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for key := range uniqueKeys {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_Alconost,
DetectorType: detector_typepb.DetectorType_Alconost,
Raw: []byte(key),
}
@@ -96,8 +96,8 @@ func verifyAlconostKey(ctx context.Context, client *http.Client, key string) (bo
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Alconost
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_Alconost
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAlconost_FromChunk(t *testing.T) {
@@ -48,7 +48,7 @@ func TestAlconost_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Alconost,
DetectorType: detector_typepb.DetectorType_Alconost,
Verified: true,
},
},
@@ -64,7 +64,7 @@ func TestAlconost_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Alconost,
DetectorType: detector_typepb.DetectorType_Alconost,
Verified: false,
},
},
+4 -4
View File
@@ -11,7 +11,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -56,7 +56,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for token := range uniqueTokens {
for id := range uniqueIDs {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_Alegra,
DetectorType: detector_typepb.DetectorType_Alegra,
Raw: []byte(token),
RawV2: []byte(token + ":" + id),
}
@@ -105,8 +105,8 @@ func verifyCredentials(ctx context.Context, client *http.Client, username, token
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Alegra
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_Alegra
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAlegra_FromChunk(t *testing.T) {
@@ -49,7 +49,7 @@ func TestAlegra_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Alegra,
DetectorType: detector_typepb.DetectorType_Alegra,
Verified: true,
},
},
@@ -65,7 +65,7 @@ func TestAlegra_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Alegra,
DetectorType: detector_typepb.DetectorType_Alegra,
Verified: false,
},
},
+4 -4
View File
@@ -11,7 +11,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for key := range uniqueKeys {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_AletheiaApi,
DetectorType: detector_typepb.DetectorType_AletheiaApi,
Raw: []byte(key),
}
@@ -95,8 +95,8 @@ func verifyAletheiaAPIKey(ctx context.Context, client *http.Client, key string)
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_AletheiaApi
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_AletheiaApi
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAletheiaApi_FromChunk(t *testing.T) {
@@ -48,7 +48,7 @@ func TestAletheiaApi_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AletheiaApi,
DetectorType: detector_typepb.DetectorType_AletheiaApi,
Verified: true,
},
},
@@ -64,7 +64,7 @@ func TestAletheiaApi_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AletheiaApi,
DetectorType: detector_typepb.DetectorType_AletheiaApi,
Verified: false,
},
},
@@ -16,7 +16,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
logContext "github.com/trufflesecurity/trufflehog/v3/pkg/context"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -75,7 +75,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
r := detectors.Result{
DetectorType: detectorspb.DetectorType_AlgoliaAdminKey,
DetectorType: detector_typepb.DetectorType_AlgoliaAdminKey,
Raw: []byte(key),
RawV2: []byte(id + ":" + key),
}
@@ -179,8 +179,8 @@ type keyResponse struct {
Description string `json:"description"`
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_AlgoliaAdminKey
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_AlgoliaAdminKey
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAlgoliaAdminKey_FromChunk(t *testing.T) {
@@ -49,7 +49,7 @@ func TestAlgoliaAdminKey_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AlgoliaAdminKey,
DetectorType: detector_typepb.DetectorType_AlgoliaAdminKey,
Verified: true,
RawV2: []byte(fmt.Sprintf("%s%s", secret, id)),
},
@@ -66,7 +66,7 @@ func TestAlgoliaAdminKey_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AlgoliaAdminKey,
DetectorType: detector_typepb.DetectorType_AlgoliaAdminKey,
Verified: false,
RawV2: []byte(fmt.Sprintf("%s%s", inactiveSecret, id)),
},
+4 -4
View File
@@ -18,7 +18,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -103,7 +103,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
resIdMatch := strings.TrimSpace(idMatch[1])
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_Alibaba,
DetectorType: detector_typepb.DetectorType_Alibaba,
Raw: []byte(resMatch),
RawV2: []byte(resMatch + resIdMatch),
}
@@ -174,6 +174,6 @@ func verifyAlibaba(ctx context.Context, client *http.Client, resIdMatch, resMatc
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Alibaba
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_Alibaba
}
@@ -14,7 +14,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAlibaba_FromChunk(t *testing.T) {
@@ -50,7 +50,7 @@ func TestAlibaba_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Alibaba,
DetectorType: detector_typepb.DetectorType_Alibaba,
Verified: true,
},
},
@@ -66,7 +66,7 @@ func TestAlibaba_FromChunk(t *testing.T) {
},
want: func() []detectors.Result {
r := detectors.Result{
DetectorType: detectorspb.DetectorType_Alibaba,
DetectorType: detector_typepb.DetectorType_Alibaba,
Verified: false,
}
r.SetVerificationError(context.DeadlineExceeded)
@@ -84,7 +84,7 @@ func TestAlibaba_FromChunk(t *testing.T) {
},
want: func() []detectors.Result {
r := detectors.Result{
DetectorType: detectorspb.DetectorType_Alibaba,
DetectorType: detector_typepb.DetectorType_Alibaba,
Verified: false,
}
r.SetVerificationError(fmt.Errorf("unexpected HTTP response status 500"))
@@ -102,7 +102,7 @@ func TestAlibaba_FromChunk(t *testing.T) {
},
want: func() []detectors.Result {
r := detectors.Result{
DetectorType: detectorspb.DetectorType_Alibaba,
DetectorType: detector_typepb.DetectorType_Alibaba,
Verified: false,
}
r.SetVerificationError(fmt.Errorf("unexpected EOF"))
@@ -120,7 +120,7 @@ func TestAlibaba_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Alibaba,
DetectorType: detector_typepb.DetectorType_Alibaba,
Verified: false,
},
},
+4 -4
View File
@@ -10,7 +10,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for key := range uniqueKeys {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_AlienVault,
DetectorType: detector_typepb.DetectorType_AlienVault,
Raw: []byte(key),
}
@@ -66,8 +66,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
return results, nil
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_AlienVault
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_AlienVault
}
func verifyAlienVaultKey(ctx context.Context, client *http.Client, key string) (bool, error) {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAlienVault_FromChunk(t *testing.T) {
@@ -48,7 +48,7 @@ func TestAlienVault_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AlienVault,
DetectorType: detector_typepb.DetectorType_AlienVault,
Verified: true,
},
},
@@ -64,7 +64,7 @@ func TestAlienVault_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AlienVault,
DetectorType: detector_typepb.DetectorType_AlienVault,
Verified: false,
},
},
+4 -4
View File
@@ -11,7 +11,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for key := range uniqueKeys {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_Allsports,
DetectorType: detector_typepb.DetectorType_Allsports,
Raw: []byte(key),
}
@@ -100,8 +100,8 @@ func verifyAllSportsKey(ctx context.Context, client *http.Client, key string) (b
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Allsports
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_Allsports
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAllsports_FromChunk(t *testing.T) {
@@ -48,7 +48,7 @@ func TestAllsports_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Allsports,
DetectorType: detector_typepb.DetectorType_Allsports,
Verified: true,
},
},
@@ -64,7 +64,7 @@ func TestAllsports_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Allsports,
DetectorType: detector_typepb.DetectorType_Allsports,
Verified: false,
},
},
+4 -4
View File
@@ -11,7 +11,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -53,7 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for key := range uniqueKeys {
for secret := range uniqueSecrets {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_Amadeus,
DetectorType: detector_typepb.DetectorType_Amadeus,
Raw: []byte(key),
RawV2: []byte(key + secret),
}
@@ -112,8 +112,8 @@ func verifyAdobeIOSecret(ctx context.Context, client *http.Client, key string, s
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Amadeus
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_Amadeus
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAmadeus_FromChunk(t *testing.T) {
@@ -49,7 +49,7 @@ func TestAmadeus_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Amadeus,
DetectorType: detector_typepb.DetectorType_Amadeus,
Verified: true,
},
},
@@ -65,7 +65,7 @@ func TestAmadeus_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Amadeus,
DetectorType: detector_typepb.DetectorType_Amadeus,
Verified: false,
},
},
+4 -4
View File
@@ -10,7 +10,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for key := range uniqueKeys {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_Ambee,
DetectorType: detector_typepb.DetectorType_Ambee,
Raw: []byte(key),
}
@@ -93,8 +93,8 @@ func verifyAmbeeKey(ctx context.Context, client *http.Client, key string) (bool,
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Ambee
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_Ambee
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAmbee_FromChunk(t *testing.T) {
@@ -48,7 +48,7 @@ func TestAmbee_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Ambee,
DetectorType: detector_typepb.DetectorType_Ambee,
Verified: true,
},
},
@@ -64,7 +64,7 @@ func TestAmbee_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Ambee,
DetectorType: detector_typepb.DetectorType_Ambee,
Verified: false,
},
},
@@ -10,7 +10,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -57,7 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_AmplitudeApiKey,
DetectorType: detector_typepb.DetectorType_AmplitudeApiKey,
Raw: []byte(key),
RawV2: []byte(key + secret),
}
@@ -106,8 +106,8 @@ func verifyAdobeIOSecret(ctx context.Context, client *http.Client, key string, s
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_AmplitudeApiKey
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_AmplitudeApiKey
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAmplitudeApiKey_FromChunk(t *testing.T) {
@@ -51,11 +51,11 @@ func TestAmplitudeApiKey_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AmplitudeApiKey,
DetectorType: detector_typepb.DetectorType_AmplitudeApiKey,
Verified: true,
},
{
DetectorType: detectorspb.DetectorType_AmplitudeApiKey,
DetectorType: detector_typepb.DetectorType_AmplitudeApiKey,
Verified: false,
},
},
@@ -72,11 +72,11 @@ func TestAmplitudeApiKey_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AmplitudeApiKey,
DetectorType: detector_typepb.DetectorType_AmplitudeApiKey,
Verified: false,
},
{
DetectorType: detectorspb.DetectorType_AmplitudeApiKey,
DetectorType: detector_typepb.DetectorType_AmplitudeApiKey,
Verified: false,
},
},
+4 -4
View File
@@ -11,7 +11,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -47,7 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
keyMatch := strings.TrimSpace(key[1])
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_Anthropic,
DetectorType: detector_typepb.DetectorType_Anthropic,
Raw: []byte(keyMatch),
ExtraData: make(map[string]string),
}
@@ -126,8 +126,8 @@ func verifyAnthropicKey(ctx context.Context, client *http.Client, endpoint, key
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Anthropic
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_Anthropic
}
func (s Scanner) Description() string {
@@ -15,7 +15,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAnthropic_FromChunk(t *testing.T) {
@@ -52,7 +52,7 @@ func TestAnthropic_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Anthropic,
DetectorType: detector_typepb.DetectorType_Anthropic,
Verified: true,
},
},
@@ -69,7 +69,7 @@ func TestAnthropic_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Anthropic,
DetectorType: detector_typepb.DetectorType_Anthropic,
Verified: false,
},
},
@@ -98,7 +98,7 @@ func TestAnthropic_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Anthropic,
DetectorType: detector_typepb.DetectorType_Anthropic,
Verified: false,
},
},
+4 -4
View File
@@ -10,7 +10,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -57,7 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_Anypoint,
DetectorType: detector_typepb.DetectorType_Anypoint,
Raw: []byte(key),
RawV2: []byte(key + org),
}
@@ -107,8 +107,8 @@ func verifyAnypointSecret(ctx context.Context, client *http.Client, key string,
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Anypoint
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_Anypoint
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAnypoint_FromChunk(t *testing.T) {
@@ -49,7 +49,7 @@ func TestAnypoint_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Anypoint,
DetectorType: detector_typepb.DetectorType_Anypoint,
Verified: true,
},
},
@@ -65,7 +65,7 @@ func TestAnypoint_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Anypoint,
DetectorType: detector_typepb.DetectorType_Anypoint,
Verified: false,
},
},
@@ -11,7 +11,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -67,7 +67,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_AnypointOAuth2,
DetectorType: detector_typepb.DetectorType_AnypointOAuth2,
Raw: []byte(secret),
RawV2: []byte(fmt.Sprintf("%s:%s", id, secret)),
}
@@ -127,8 +127,8 @@ func verifyMatch(ctx context.Context, client *http.Client, id, secret string) (b
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_AnypointOAuth2
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_AnypointOAuth2
}
func (s Scanner) Description() string {
@@ -14,7 +14,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAnypointOAuth2_FromChunk(t *testing.T) {
@@ -50,7 +50,7 @@ func TestAnypointOAuth2_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AnypointOAuth2,
DetectorType: detector_typepb.DetectorType_AnypointOAuth2,
Verified: true,
},
},
@@ -66,7 +66,7 @@ func TestAnypointOAuth2_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AnypointOAuth2,
DetectorType: detector_typepb.DetectorType_AnypointOAuth2,
Verified: false,
},
},
+4 -4
View File
@@ -10,7 +10,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for key := range uniqueKeys {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_Apacta,
DetectorType: detector_typepb.DetectorType_Apacta,
Raw: []byte(key),
}
@@ -91,8 +91,8 @@ func verifyApactaKey(ctx context.Context, client *http.Client, key string) (bool
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Apacta
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_Apacta
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestApacta_FromChunk(t *testing.T) {
@@ -48,7 +48,7 @@ func TestApacta_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Apacta,
DetectorType: detector_typepb.DetectorType_Apacta,
Verified: true,
},
},
@@ -64,7 +64,7 @@ func TestApacta_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Apacta,
DetectorType: detector_typepb.DetectorType_Apacta,
Verified: false,
},
},
+4 -4
View File
@@ -11,7 +11,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for key := range uniqueKeys {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_Api2Cart,
DetectorType: detector_typepb.DetectorType_Api2Cart,
Raw: []byte(key),
}
@@ -109,8 +109,8 @@ type Response struct {
ReturnCode int `json:"return_code"`
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Api2Cart
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_Api2Cart
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestApi2Cart_FromChunk(t *testing.T) {
@@ -48,7 +48,7 @@ func TestApi2Cart_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Api2Cart,
DetectorType: detector_typepb.DetectorType_Api2Cart,
Verified: true,
},
},
@@ -64,7 +64,7 @@ func TestApi2Cart_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Api2Cart,
DetectorType: detector_typepb.DetectorType_Api2Cart,
Verified: false,
},
},
+4 -4
View File
@@ -10,7 +10,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -52,7 +52,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for key := range uniqueKeys {
for id := range uniqueIds {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_ApiDeck,
DetectorType: detector_typepb.DetectorType_ApiDeck,
Raw: []byte(key),
RawV2: []byte(key + id),
}
@@ -103,8 +103,8 @@ func verifyAdobeIOSecret(ctx context.Context, client *http.Client, key string, i
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_ApiDeck
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_ApiDeck
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestApiDeck_FromChunk(t *testing.T) {
@@ -49,7 +49,7 @@ func TestApiDeck_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_ApiDeck,
DetectorType: detector_typepb.DetectorType_ApiDeck,
Verified: true,
},
},
@@ -65,7 +65,7 @@ func TestApiDeck_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_ApiDeck,
DetectorType: detector_typepb.DetectorType_ApiDeck,
Verified: false,
},
},
+4 -4
View File
@@ -10,7 +10,7 @@ import (
regexp "github.com/wasilibs/go-re2"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for key := range uniqueAPIKeys {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_Apiflash,
DetectorType: detector_typepb.DetectorType_Apiflash,
Raw: []byte(key),
}
@@ -62,8 +62,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
return results, nil
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Apiflash
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_Apiflash
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestApiflash_FromChunk(t *testing.T) {
@@ -49,7 +49,7 @@ func TestApiflash_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Apiflash,
DetectorType: detector_typepb.DetectorType_Apiflash,
Verified: true,
},
},
@@ -65,7 +65,7 @@ func TestApiflash_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Apiflash,
DetectorType: detector_typepb.DetectorType_Apiflash,
Verified: false,
},
},
+4 -4
View File
@@ -11,7 +11,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for key := range uniqueKeys {
for token := range uniqueTokens {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_ApiFonica,
DetectorType: detector_typepb.DetectorType_ApiFonica,
Raw: []byte(key),
}
@@ -102,8 +102,8 @@ func verifyApifonicaSecret(ctx context.Context, client *http.Client, key string,
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_ApiFonica
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_ApiFonica
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestApifonica_FromChunk(t *testing.T) {
@@ -49,7 +49,7 @@ func TestApifonica_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_ApiFonica,
DetectorType: detector_typepb.DetectorType_ApiFonica,
Verified: true,
},
},
@@ -65,7 +65,7 @@ func TestApifonica_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_ApiFonica,
DetectorType: detector_typepb.DetectorType_ApiFonica,
Verified: false,
},
},
+4 -4
View File
@@ -10,7 +10,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for key := range uniqueKeys {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_Apify,
DetectorType: detector_typepb.DetectorType_Apify,
Raw: []byte(key),
}
@@ -91,8 +91,8 @@ func verifyApifyKey(ctx context.Context, client *http.Client, key string) (bool,
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Apify
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_Apify
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestApify_FromChunk(t *testing.T) {
@@ -48,7 +48,7 @@ func TestApify_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Apify,
DetectorType: detector_typepb.DetectorType_Apify,
Verified: true,
},
},
@@ -64,7 +64,7 @@ func TestApify_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Apify,
DetectorType: detector_typepb.DetectorType_Apify,
Verified: false,
},
},
+4 -4
View File
@@ -10,7 +10,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for key := range uniqueKeys {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_Apilayer,
DetectorType: detector_typepb.DetectorType_Apilayer,
Raw: []byte(key),
}
@@ -93,8 +93,8 @@ func verifyAPILayerKey(ctx context.Context, client *http.Client, key string) (bo
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Apilayer
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_Apilayer
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestApilayer_FromChunk(t *testing.T) {
@@ -48,7 +48,7 @@ func TestApilayer_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Apilayer,
DetectorType: detector_typepb.DetectorType_Apilayer,
Verified: true,
},
},
@@ -64,7 +64,7 @@ func TestApilayer_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Apilayer,
DetectorType: detector_typepb.DetectorType_Apilayer,
Verified: false,
},
},
+4 -4
View File
@@ -11,7 +11,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -46,7 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for apiKey := range uniqueApiKeys {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_APIMatic,
DetectorType: detector_typepb.DetectorType_APIMatic,
Raw: []byte(apiKey),
}
@@ -99,8 +99,8 @@ func verifyAPImaticKey(ctx context.Context, client *http.Client, key string) (bo
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_APIMatic
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_APIMatic
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAPIMatic_FromChunk(t *testing.T) {
@@ -49,7 +49,7 @@ func TestAPIMatic_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_APIMatic,
DetectorType: detector_typepb.DetectorType_APIMatic,
Verified: true,
},
},
@@ -65,7 +65,7 @@ func TestAPIMatic_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_APIMatic,
DetectorType: detector_typepb.DetectorType_APIMatic,
Verified: false,
},
},
+4 -4
View File
@@ -10,7 +10,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for key := range uniqueKeys {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_ApiMetrics,
DetectorType: detector_typepb.DetectorType_ApiMetrics,
Raw: []byte(key),
}
@@ -92,8 +92,8 @@ func verifyAPIMetricsKey(ctx context.Context, client *http.Client, key string) (
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_ApiMetrics
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_ApiMetrics
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestApiMetrics_FromChunk(t *testing.T) {
@@ -48,7 +48,7 @@ func TestApiMetrics_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_ApiMetrics,
DetectorType: detector_typepb.DetectorType_ApiMetrics,
Verified: true,
},
},
@@ -64,7 +64,7 @@ func TestApiMetrics_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_ApiMetrics,
DetectorType: detector_typepb.DetectorType_ApiMetrics,
Verified: false,
},
},
+4 -4
View File
@@ -10,7 +10,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for key := range uniqueKeys {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_APITemplate,
DetectorType: detector_typepb.DetectorType_APITemplate,
Raw: []byte(key),
}
@@ -94,8 +94,8 @@ func verifyAPITemplateKey(ctx context.Context, client *http.Client, key string)
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_APITemplate
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_APITemplate
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAPITemplate_FromChunk(t *testing.T) {
@@ -48,7 +48,7 @@ func TestAPITemplate_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_APITemplate,
DetectorType: detector_typepb.DetectorType_APITemplate,
Verified: true,
},
},
@@ -64,7 +64,7 @@ func TestAPITemplate_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_APITemplate,
DetectorType: detector_typepb.DetectorType_APITemplate,
Verified: false,
},
},
+4 -4
View File
@@ -10,7 +10,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -45,7 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for key := range uniqueKeys {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_Apollo,
DetectorType: detector_typepb.DetectorType_Apollo,
Raw: []byte(key),
}
@@ -92,8 +92,8 @@ func verifyApolloKey(ctx context.Context, client *http.Client, key string) (bool
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Apollo
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_Apollo
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestApollo_FromChunk(t *testing.T) {
@@ -48,7 +48,7 @@ func TestApollo_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Apollo,
DetectorType: detector_typepb.DetectorType_Apollo,
Verified: true,
},
},
@@ -64,7 +64,7 @@ func TestApollo_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Apollo,
DetectorType: detector_typepb.DetectorType_Apollo,
Verified: false,
},
},
+4 -4
View File
@@ -11,7 +11,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -56,7 +56,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
resIdMatch := strings.TrimSpace(idMatch[1])
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_Appcues,
DetectorType: detector_typepb.DetectorType_Appcues,
Raw: []byte(resMatch),
RawV2: []byte(resMatch + resUserMatch),
}
@@ -99,8 +99,8 @@ func verifyMatch(ctx context.Context, client *http.Client, resUserMatch, resMatc
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Appcues
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_Appcues
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAppcues_FromChunk(t *testing.T) {
@@ -50,11 +50,11 @@ func TestAppcues_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Appcues,
DetectorType: detector_typepb.DetectorType_Appcues,
Verified: true,
},
{
DetectorType: detectorspb.DetectorType_Appcues,
DetectorType: detector_typepb.DetectorType_Appcues,
Verified: false,
},
},
@@ -70,11 +70,11 @@ func TestAppcues_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Appcues,
DetectorType: detector_typepb.DetectorType_Appcues,
Verified: false,
},
{
DetectorType: detectorspb.DetectorType_Appcues,
DetectorType: detector_typepb.DetectorType_Appcues,
Verified: false,
},
},
+4 -4
View File
@@ -11,7 +11,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct{}
@@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
resMatch := strings.TrimSpace(match[1])
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_Appfollow,
DetectorType: detector_typepb.DetectorType_Appfollow,
Raw: []byte(resMatch),
}
@@ -83,8 +83,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool,
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Appfollow
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_Appfollow
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAppfollow_FromChunk(t *testing.T) {
@@ -48,7 +48,7 @@ func TestAppfollow_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Appfollow,
DetectorType: detector_typepb.DetectorType_Appfollow,
Verified: true,
},
},
@@ -64,7 +64,7 @@ func TestAppfollow_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Appfollow,
DetectorType: detector_typepb.DetectorType_Appfollow,
Verified: false,
},
},
+4 -4
View File
@@ -11,7 +11,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct{}
@@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
resMatch := strings.TrimSpace(match[1])
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_Appointedd,
DetectorType: detector_typepb.DetectorType_Appointedd,
Raw: []byte(resMatch),
}
if verify {
@@ -86,8 +86,8 @@ func verifyMatch(ctx context.Context, client *http.Client, secret string) (bool,
}
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_Appointedd
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_Appointedd
}
func (s Scanner) Description() string {
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAppointedd_FromChunk(t *testing.T) {
@@ -48,7 +48,7 @@ func TestAppointedd_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Appointedd,
DetectorType: detector_typepb.DetectorType_Appointedd,
Verified: true,
},
},
@@ -64,7 +64,7 @@ func TestAppointedd_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_Appointedd,
DetectorType: detector_typepb.DetectorType_Appointedd,
Verified: false,
},
},
+4 -4
View File
@@ -10,7 +10,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
type Scanner struct {
@@ -42,7 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
resMatch := strings.TrimSpace(match[1])
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_AppOptics,
DetectorType: detector_typepb.DetectorType_AppOptics,
Raw: []byte(resMatch),
}
@@ -84,8 +84,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
return results, nil
}
func (s Scanner) Type() detectorspb.DetectorType {
return detectorspb.DetectorType_AppOptics
func (s Scanner) Type() detector_typepb.DetectorType {
return detector_typepb.DetectorType_AppOptics
}
func (s Scanner) Description() string {
@@ -15,7 +15,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
func TestAppoptics_FromChunk(t *testing.T) {
@@ -51,7 +51,7 @@ func TestAppoptics_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AppOptics,
DetectorType: detector_typepb.DetectorType_AppOptics,
Verified: true,
},
},
@@ -68,7 +68,7 @@ func TestAppoptics_FromChunk(t *testing.T) {
},
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_AppOptics,
DetectorType: detector_typepb.DetectorType_AppOptics,
Verified: false,
},
},

Some files were not shown because too many files have changed in this diff Show More