Skip to content

Find, verify, and analyze leaked credentials

Populate SecretParts on all detectors (#4919)

Miccahad2f9a4b98e9
diff --git a/pkg/detectors/abstract/abstract.go b/pkg/detectors/abstract/abstract.go
index e9d9075d9..cd2b63bdf 100644
--- a/pkg/detectors/abstract/abstract.go
+++ b/pkg/detectors/abstract/abstract.go
@@ -53,6 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Abstract,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/abuseipdb/abuseipdb.go b/pkg/detectors/abuseipdb/abuseipdb.go
index c0368445a..906a614af 100644
--- a/pkg/detectors/abuseipdb/abuseipdb.go
+++ b/pkg/detectors/abuseipdb/abuseipdb.go
@@ -56,6 +56,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AbuseIPDB,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/abyssale/abyssale.go b/pkg/detectors/abyssale/abyssale.go
index d292ceafb..6865f811a 100644
--- a/pkg/detectors/abyssale/abyssale.go
+++ b/pkg/detectors/abyssale/abyssale.go
@@ -54,6 +54,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Abyssale,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/accuweather/v1/accuweather.go b/pkg/detectors/accuweather/v1/accuweather.go
index 24780dc23..e2f61563d 100644
--- a/pkg/detectors/accuweather/v1/accuweather.go
+++ b/pkg/detectors/accuweather/v1/accuweather.go
@@ -56,6 +56,7 @@ func (s Scanner) ProcessMatches(ctx context.Context, matches [][]string, verify
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Accuweather,
Raw: []byte(key),
+ SecretParts: map[string]string{"key": key},
}
if verify {
diff --git a/pkg/detectors/adafruitio/adafruitio.go b/pkg/detectors/adafruitio/adafruitio.go
index 259176359..95145920b 100644
--- a/pkg/detectors/adafruitio/adafruitio.go
+++ b/pkg/detectors/adafruitio/adafruitio.go
@@ -54,6 +54,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AdafruitIO,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/adobeio/adobeio.go b/pkg/detectors/adobeio/adobeio.go
index 3ec19b338..2151b150f 100644
--- a/pkg/detectors/adobeio/adobeio.go
+++ b/pkg/detectors/adobeio/adobeio.go
@@ -55,6 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
DetectorType: detector_typepb.DetectorType_AdobeIO,
Raw: []byte(key),
RawV2: []byte(key + id),
+ SecretParts: map[string]string{
+ "key": key,
+ "id": id,
+ },
}
if verify {
diff --git a/pkg/detectors/adzuna/adzuna.go b/pkg/detectors/adzuna/adzuna.go
index d8d61faf0..0cdb23b34 100644
--- a/pkg/detectors/adzuna/adzuna.go
+++ b/pkg/detectors/adzuna/adzuna.go
@@ -59,7 +59,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Adzuna,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resIdMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "id": resIdMatch,
+ },
+ RawV2: []byte(resMatch + resIdMatch),
}
if verify {
diff --git a/pkg/detectors/aeroworkflow/aeroworkflow.go b/pkg/detectors/aeroworkflow/aeroworkflow.go
index 00395f6e7..10e1c6301 100644
--- a/pkg/detectors/aeroworkflow/aeroworkflow.go
+++ b/pkg/detectors/aeroworkflow/aeroworkflow.go
@@ -60,7 +60,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Aeroworkflow,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resIdMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "id": resIdMatch,
+ },
+ RawV2: []byte(resMatch + resIdMatch),
}
if verify {
diff --git a/pkg/detectors/agora/agora.go b/pkg/detectors/agora/agora.go
index bb0d0e096..a2284b4ce 100644
--- a/pkg/detectors/agora/agora.go
+++ b/pkg/detectors/agora/agora.go
@@ -67,7 +67,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Agora,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resSecret),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "secret": resSecret,
+ },
+ RawV2: []byte(resMatch + resSecret),
}
if verify {
diff --git a/pkg/detectors/aha/aha.go b/pkg/detectors/aha/aha.go
index fc69dab6c..b17bb82bb 100644
--- a/pkg/detectors/aha/aha.go
+++ b/pkg/detectors/aha/aha.go
@@ -73,7 +73,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Aha,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + url),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "url": url,
+ },
+ RawV2: []byte(resMatch + url),
}
if verify {
diff --git a/pkg/detectors/airship/airship.go b/pkg/detectors/airship/airship.go
index c464cfb14..990145efa 100644
--- a/pkg/detectors/airship/airship.go
+++ b/pkg/detectors/airship/airship.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Airship,
Raw: []byte(key),
+ SecretParts: map[string]string{"key": key},
}
if verify {
diff --git a/pkg/detectors/airvisual/airvisual.go b/pkg/detectors/airvisual/airvisual.go
index 8cc8a6b5f..036397411 100644
--- a/pkg/detectors/airvisual/airvisual.go
+++ b/pkg/detectors/airvisual/airvisual.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AirVisual,
Raw: []byte(key),
+ SecretParts: map[string]string{"key": key},
}
if verify {
diff --git a/pkg/detectors/aiven/aiven.go b/pkg/detectors/aiven/aiven.go
index 17b00b0ba..180e0c5b2 100644
--- a/pkg/detectors/aiven/aiven.go
+++ b/pkg/detectors/aiven/aiven.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Aiven,
Raw: []byte(key),
+ SecretParts: map[string]string{"key": key},
}
if verify {
diff --git a/pkg/detectors/alchemy/alchemy.go b/pkg/detectors/alchemy/alchemy.go
index 6d7970720..82d75cae1 100644
--- a/pkg/detectors/alchemy/alchemy.go
+++ b/pkg/detectors/alchemy/alchemy.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Alchemy,
Raw: []byte(match),
+ SecretParts: map[string]string{"key": match},
}
if verify {
diff --git a/pkg/detectors/alconost/alconost.go b/pkg/detectors/alconost/alconost.go
index f9de760f7..30ea5bc50 100644
--- a/pkg/detectors/alconost/alconost.go
+++ b/pkg/detectors/alconost/alconost.go
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Alconost,
Raw: []byte(key),
+ SecretParts: map[string]string{"key": key},
}
if verify {
diff --git a/pkg/detectors/alegra/alegra.go b/pkg/detectors/alegra/alegra.go
index 68f57693e..5a8812d5b 100644
--- a/pkg/detectors/alegra/alegra.go
+++ b/pkg/detectors/alegra/alegra.go
@@ -58,7 +58,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Alegra,
Raw: []byte(token),
- RawV2: []byte(token + ":" + id),
+ SecretParts: map[string]string{
+ "token": token,
+ "id": id,
+ },
+ RawV2: []byte(token + ":" + id),
}
if verify {
diff --git a/pkg/detectors/aletheiaapi/aletheiaapi.go b/pkg/detectors/aletheiaapi/aletheiaapi.go
index 5a6c49b9f..fb51fc9da 100644
--- a/pkg/detectors/aletheiaapi/aletheiaapi.go
+++ b/pkg/detectors/aletheiaapi/aletheiaapi.go
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AletheiaApi,
Raw: []byte(key),
+ SecretParts: map[string]string{"key": key},
}
if verify {
diff --git a/pkg/detectors/algoliaadminkey/algoliaadminkey.go b/pkg/detectors/algoliaadminkey/algoliaadminkey.go
index a36f98d3e..37f990706 100644
--- a/pkg/detectors/algoliaadminkey/algoliaadminkey.go
+++ b/pkg/detectors/algoliaadminkey/algoliaadminkey.go
@@ -77,7 +77,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
r := detectors.Result{
DetectorType: detector_typepb.DetectorType_AlgoliaAdminKey,
Raw: []byte(key),
- RawV2: []byte(id + ":" + key),
+ SecretParts: map[string]string{
+ "id": id,
+ "key": key,
+ },
+ RawV2: []byte(id + ":" + key),
}
if verify {
diff --git a/pkg/detectors/alibaba/alibaba.go b/pkg/detectors/alibaba/alibaba.go
index 0d8b91777..91417aae6 100644
--- a/pkg/detectors/alibaba/alibaba.go
+++ b/pkg/detectors/alibaba/alibaba.go
@@ -105,7 +105,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Alibaba,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resIdMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "id": resIdMatch,
+ },
+ RawV2: []byte(resMatch + resIdMatch),
}
if verify {
diff --git a/pkg/detectors/alienvault/alienvault.go b/pkg/detectors/alienvault/alienvault.go
index 0b5482821..766976370 100644
--- a/pkg/detectors/alienvault/alienvault.go
+++ b/pkg/detectors/alienvault/alienvault.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AlienVault,
Raw: []byte(key),
+ SecretParts: map[string]string{"key": key},
}
if verify {
diff --git a/pkg/detectors/allsports/allsports.go b/pkg/detectors/allsports/allsports.go
index a2cbb2281..9fbfd05af 100644
--- a/pkg/detectors/allsports/allsports.go
+++ b/pkg/detectors/allsports/allsports.go
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Allsports,
Raw: []byte(key),
+ SecretParts: map[string]string{"key": key},
}
if verify {
diff --git a/pkg/detectors/amadeus/amadeus.go b/pkg/detectors/amadeus/amadeus.go
index 8070cb4cd..939e8b263 100644
--- a/pkg/detectors/amadeus/amadeus.go
+++ b/pkg/detectors/amadeus/amadeus.go
@@ -55,7 +55,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Amadeus,
Raw: []byte(key),
- RawV2: []byte(key + secret),
+ SecretParts: map[string]string{
+ "key": key,
+ "secret": secret,
+ },
+ RawV2: []byte(key + secret),
}
if verify {
diff --git a/pkg/detectors/ambee/ambee.go b/pkg/detectors/ambee/ambee.go
index ffe09f8b9..79dbd8449 100644
--- a/pkg/detectors/ambee/ambee.go
+++ b/pkg/detectors/ambee/ambee.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Ambee,
Raw: []byte(key),
+ SecretParts: map[string]string{"key": key},
}
if verify {
diff --git a/pkg/detectors/amplitudeapikey/amplitudeapikey.go b/pkg/detectors/amplitudeapikey/amplitudeapikey.go
index d051c7df6..72ecb425a 100644
--- a/pkg/detectors/amplitudeapikey/amplitudeapikey.go
+++ b/pkg/detectors/amplitudeapikey/amplitudeapikey.go
@@ -59,7 +59,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AmplitudeApiKey,
Raw: []byte(key),
- RawV2: []byte(key + secret),
+ SecretParts: map[string]string{
+ "key": key,
+ "secret": secret,
+ },
+ RawV2: []byte(key + secret),
}
if verify {
diff --git a/pkg/detectors/anypoint/anypoint.go b/pkg/detectors/anypoint/anypoint.go
index d858d5719..81c92fc48 100644
--- a/pkg/detectors/anypoint/anypoint.go
+++ b/pkg/detectors/anypoint/anypoint.go
@@ -59,7 +59,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Anypoint,
Raw: []byte(key),
- RawV2: []byte(key + org),
+ SecretParts: map[string]string{
+ "key": key,
+ "organization": org,
+ },
+ RawV2: []byte(key + org),
}
if verify {
diff --git a/pkg/detectors/apacta/apacta.go b/pkg/detectors/apacta/apacta.go
index fb4b7c8ee..934f8e0d9 100644
--- a/pkg/detectors/apacta/apacta.go
+++ b/pkg/detectors/apacta/apacta.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Apacta,
Raw: []byte(key),
+ SecretParts: map[string]string{"key": key},
}
if verify {
diff --git a/pkg/detectors/api2cart/api2cart.go b/pkg/detectors/api2cart/api2cart.go
index 5aa82913e..b11f0cfd9 100644
--- a/pkg/detectors/api2cart/api2cart.go
+++ b/pkg/detectors/api2cart/api2cart.go
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Api2Cart,
Raw: []byte(key),
+ SecretParts: map[string]string{"key": key},
}
if verify {
diff --git a/pkg/detectors/apideck/apideck.go b/pkg/detectors/apideck/apideck.go
index 7129cd326..0cf6308a1 100644
--- a/pkg/detectors/apideck/apideck.go
+++ b/pkg/detectors/apideck/apideck.go
@@ -54,7 +54,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ApiDeck,
Raw: []byte(key),
- RawV2: []byte(key + id),
+ SecretParts: map[string]string{
+ "key": key,
+ "id": id,
+ },
+ RawV2: []byte(key + id),
}
if verify {
diff --git a/pkg/detectors/apiflash/apiflash.go b/pkg/detectors/apiflash/apiflash.go
index 4b275a553..8626d2f0f 100644
--- a/pkg/detectors/apiflash/apiflash.go
+++ b/pkg/detectors/apiflash/apiflash.go
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Apiflash,
Raw: []byte(key),
+ SecretParts: map[string]string{"key": key},
}
if verify {
diff --git a/pkg/detectors/apifonica/apifonica.go b/pkg/detectors/apifonica/apifonica.go
index 57932c46f..58eaefe5d 100644
--- a/pkg/detectors/apifonica/apifonica.go
+++ b/pkg/detectors/apifonica/apifonica.go
@@ -53,6 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ApiFonica,
Raw: []byte(key),
+ SecretParts: map[string]string{"key": key},
}
if verify {
diff --git a/pkg/detectors/apify/apify.go b/pkg/detectors/apify/apify.go
index 6742dcbd5..83b788be9 100644
--- a/pkg/detectors/apify/apify.go
+++ b/pkg/detectors/apify/apify.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Apify,
Raw: []byte(key),
+ SecretParts: map[string]string{"key": key},
}
if verify {
diff --git a/pkg/detectors/apilayer/apilayer.go b/pkg/detectors/apilayer/apilayer.go
index ad6902b66..29a980155 100644
--- a/pkg/detectors/apilayer/apilayer.go
+++ b/pkg/detectors/apilayer/apilayer.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Apilayer,
Raw: []byte(key),
+ SecretParts: map[string]string{"key": key},
}
if verify {
diff --git a/pkg/detectors/apimatic/apimatic.go b/pkg/detectors/apimatic/apimatic.go
index b727daf4d..1da78ff23 100644
--- a/pkg/detectors/apimatic/apimatic.go
+++ b/pkg/detectors/apimatic/apimatic.go
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_APIMatic,
Raw: []byte(apiKey),
+ SecretParts: map[string]string{"key": apiKey},
}
if verify {
diff --git a/pkg/detectors/apimetrics/apimetrics.go b/pkg/detectors/apimetrics/apimetrics.go
index ad27e089c..a83bf45b9 100644
--- a/pkg/detectors/apimetrics/apimetrics.go
+++ b/pkg/detectors/apimetrics/apimetrics.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ApiMetrics,
Raw: []byte(key),
+ SecretParts: map[string]string{"key": key},
}
if verify {
diff --git a/pkg/detectors/apitemplate/apitemplate.go b/pkg/detectors/apitemplate/apitemplate.go
index ef2159a2b..e0efb9da2 100644
--- a/pkg/detectors/apitemplate/apitemplate.go
+++ b/pkg/detectors/apitemplate/apitemplate.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_APITemplate,
Raw: []byte(key),
+ SecretParts: map[string]string{"key": key},
}
if verify {
diff --git a/pkg/detectors/apollo/apollo.go b/pkg/detectors/apollo/apollo.go
index 9a27fc4e9..92f7e40c3 100644
--- a/pkg/detectors/apollo/apollo.go
+++ b/pkg/detectors/apollo/apollo.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Apollo,
Raw: []byte(key),
+ SecretParts: map[string]string{"key": key},
}
if verify {
diff --git a/pkg/detectors/appcues/appcues.go b/pkg/detectors/appcues/appcues.go
index d3b8477ab..88b825633 100644
--- a/pkg/detectors/appcues/appcues.go
+++ b/pkg/detectors/appcues/appcues.go
@@ -58,7 +58,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Appcues,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resUserMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "username": resUserMatch,
+ },
+ RawV2: []byte(resMatch + resUserMatch),
}
if verify {
isVerified, err := verifyMatch(ctx, client, resUserMatch, resMatch, resIdMatch)
diff --git a/pkg/detectors/appfollow/appfollow.go b/pkg/detectors/appfollow/appfollow.go
index 6d2ff5df6..c36a8ae4f 100644
--- a/pkg/detectors/appfollow/appfollow.go
+++ b/pkg/detectors/appfollow/appfollow.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Appfollow,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/appointedd/appointedd.go b/pkg/detectors/appointedd/appointedd.go
index 0b4139423..560c35695 100644
--- a/pkg/detectors/appointedd/appointedd.go
+++ b/pkg/detectors/appointedd/appointedd.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Appointedd,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
isVerified, err := verifyMatch(ctx, client, resMatch)
diff --git a/pkg/detectors/appoptics/appoptics.go b/pkg/detectors/appoptics/appoptics.go
index bcda9d220..fdd1805e0 100644
--- a/pkg/detectors/appoptics/appoptics.go
+++ b/pkg/detectors/appoptics/appoptics.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AppOptics,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/appsynergy/appsynergy.go b/pkg/detectors/appsynergy/appsynergy.go
index 9c9513781..1a738e14d 100644
--- a/pkg/detectors/appsynergy/appsynergy.go
+++ b/pkg/detectors/appsynergy/appsynergy.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AppSynergy,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/apptivo/apptivo.go b/pkg/detectors/apptivo/apptivo.go
index ccb820894..36ed6b39d 100644
--- a/pkg/detectors/apptivo/apptivo.go
+++ b/pkg/detectors/apptivo/apptivo.go
@@ -50,7 +50,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Apptivo,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resIdMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "id": resIdMatch,
+ },
+ RawV2: []byte(resMatch + resIdMatch),
}
if verify {
diff --git a/pkg/detectors/artsy/artsy.go b/pkg/detectors/artsy/artsy.go
index c1c700bad..73d90e229 100644
--- a/pkg/detectors/artsy/artsy.go
+++ b/pkg/detectors/artsy/artsy.go
@@ -52,7 +52,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Artsy,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resIdMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "id": resIdMatch,
+ },
+ RawV2: []byte(resMatch + resIdMatch),
}
if verify {
diff --git a/pkg/detectors/assemblyai/assemblyai.go b/pkg/detectors/assemblyai/assemblyai.go
index 1eac498f3..ebf9d04a5 100644
--- a/pkg/detectors/assemblyai/assemblyai.go
+++ b/pkg/detectors/assemblyai/assemblyai.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AssemblyAI,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/atera/atera.go b/pkg/detectors/atera/atera.go
index c2eb6a11c..03b47355d 100644
--- a/pkg/detectors/atera/atera.go
+++ b/pkg/detectors/atera/atera.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Atera,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/audd/audd.go b/pkg/detectors/audd/audd.go
index 2b5e23713..6cf65ed74 100644
--- a/pkg/detectors/audd/audd.go
+++ b/pkg/detectors/audd/audd.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Audd,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/auth0managementapitoken/auth0managementapitoken.go b/pkg/detectors/auth0managementapitoken/auth0managementapitoken.go
index 873663295..506e8fcec 100644
--- a/pkg/detectors/auth0managementapitoken/auth0managementapitoken.go
+++ b/pkg/detectors/auth0managementapitoken/auth0managementapitoken.go
@@ -58,7 +58,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
DetectorType: detector_typepb.DetectorType_Auth0ManagementApiToken,
Redacted: domainRes,
Raw: []byte(managementAPITokenRes),
- RawV2: []byte(managementAPITokenRes + domainRes),
+ SecretParts: map[string]string{
+ "token": managementAPITokenRes,
+ "domain": domainRes,
+ },
+ RawV2: []byte(managementAPITokenRes + domainRes),
}
if verify {
diff --git a/pkg/detectors/auth0oauth/auth0oauth.go b/pkg/detectors/auth0oauth/auth0oauth.go
index 3bd6ee1fe..fa2c1f5c5 100644
--- a/pkg/detectors/auth0oauth/auth0oauth.go
+++ b/pkg/detectors/auth0oauth/auth0oauth.go
@@ -59,7 +59,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
DetectorType: detector_typepb.DetectorType_Auth0oauth,
Redacted: clientIdRes,
Raw: []byte(clientSecretRes),
- RawV2: []byte(clientIdRes + clientSecretRes),
+ SecretParts: map[string]string{
+ "client_id": clientIdRes,
+ "client_secret": clientSecretRes,
+ },
+ RawV2: []byte(clientIdRes + clientSecretRes),
}
if verify {
diff --git a/pkg/detectors/autodesk/autodesk.go b/pkg/detectors/autodesk/autodesk.go
index 424ed457f..368943ff7 100644
--- a/pkg/detectors/autodesk/autodesk.go
+++ b/pkg/detectors/autodesk/autodesk.go
@@ -49,7 +49,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Autodesk,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resSecret),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "secret": resSecret,
+ },
+ RawV2: []byte(resMatch + resSecret),
}
if verify {
diff --git a/pkg/detectors/autoklose/autoklose.go b/pkg/detectors/autoklose/autoklose.go
index cee93d345..f59131c83 100644
--- a/pkg/detectors/autoklose/autoklose.go
+++ b/pkg/detectors/autoklose/autoklose.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Autoklose,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/autopilot/autopilot.go b/pkg/detectors/autopilot/autopilot.go
index 0be638aeb..c893af85b 100644
--- a/pkg/detectors/autopilot/autopilot.go
+++ b/pkg/detectors/autopilot/autopilot.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AutoPilot,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/avazapersonalaccesstoken/avazapersonalaccesstoken.go b/pkg/detectors/avazapersonalaccesstoken/avazapersonalaccesstoken.go
index 6d5eca065..ce3e6cd08 100644
--- a/pkg/detectors/avazapersonalaccesstoken/avazapersonalaccesstoken.go
+++ b/pkg/detectors/avazapersonalaccesstoken/avazapersonalaccesstoken.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AvazaPersonalAccessToken,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/aviationstack/aviationstack.go b/pkg/detectors/aviationstack/aviationstack.go
index e3da06004..0617ae1df 100644
--- a/pkg/detectors/aviationstack/aviationstack.go
+++ b/pkg/detectors/aviationstack/aviationstack.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AviationStack,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/aws/session_keys/sessionkey.go b/pkg/detectors/aws/session_keys/sessionkey.go
index 63f949545..2fe5bb5c9 100644
--- a/pkg/detectors/aws/session_keys/sessionkey.go
+++ b/pkg/detectors/aws/session_keys/sessionkey.go
@@ -128,9 +128,14 @@ func (s scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AWSSessionKey,
Raw: []byte(idMatch),
- RawV2: []byte(fmt.Sprintf("%s:%s:%s", idMatch, secretMatch, sessionMatch)),
- Redacted: idMatch,
- ExtraData: make(map[string]string),
+ SecretParts: map[string]string{
+ "access_key_id": idMatch,
+ "secret_access_key": secretMatch,
+ "session_token": sessionMatch,
+ },
+ RawV2: []byte(fmt.Sprintf("%s:%s:%s", idMatch, secretMatch, sessionMatch)),
+ Redacted: idMatch,
+ ExtraData: make(map[string]string),
}
if verify {
diff --git a/pkg/detectors/axonaut/axonaut.go b/pkg/detectors/axonaut/axonaut.go
index 24dac7252..4100b7492 100644
--- a/pkg/detectors/axonaut/axonaut.go
+++ b/pkg/detectors/axonaut/axonaut.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Axonaut,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/aylien/aylien.go b/pkg/detectors/aylien/aylien.go
index d9294f745..2c6bac15b 100644
--- a/pkg/detectors/aylien/aylien.go
+++ b/pkg/detectors/aylien/aylien.go
@@ -51,7 +51,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Aylien,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resIdMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "id": resIdMatch,
+ },
+ RawV2: []byte(resMatch + resIdMatch),
}
if verify {
isVerified, err := verifyMatch(ctx, client, resIdMatch, resMatch)
diff --git a/pkg/detectors/ayrshare/ayrshare.go b/pkg/detectors/ayrshare/ayrshare.go
index a18d6e02b..d21ed8a82 100644
--- a/pkg/detectors/ayrshare/ayrshare.go
+++ b/pkg/detectors/ayrshare/ayrshare.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Ayrshare,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/azure_batch/azurebatch.go b/pkg/detectors/azure_batch/azurebatch.go
index a88bd4fef..56df04edb 100644
--- a/pkg/detectors/azure_batch/azurebatch.go
+++ b/pkg/detectors/azure_batch/azurebatch.go
@@ -56,8 +56,12 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AzureBatch,
Raw: []byte(endpoint),
- RawV2: []byte(endpoint + accountKey),
- Redacted: endpoint,
+ SecretParts: map[string]string{
+ "url": endpoint,
+ "account_key": accountKey,
+ },
+ RawV2: []byte(endpoint + accountKey),
+ Redacted: endpoint,
}
if verify {
diff --git a/pkg/detectors/azure_cosmosdb/azure_cosmosdb.go b/pkg/detectors/azure_cosmosdb/azure_cosmosdb.go
index 707aba541..e453c75ac 100644
--- a/pkg/detectors/azure_cosmosdb/azure_cosmosdb.go
+++ b/pkg/detectors/azure_cosmosdb/azure_cosmosdb.go
@@ -82,8 +82,12 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AzureCosmosDBKeyIdentifiable,
Raw: []byte(key),
- RawV2: []byte("key: " + key + " account_url: " + accountUrl), // key: <key> account_url: <account_url>
- ExtraData: map[string]string{},
+ SecretParts: map[string]string{
+ "key": key,
+ "account_url": accountUrl,
+ },
+ RawV2: []byte("key: " + key + " account_url: " + accountUrl), // key: <key> account_url: <account_url>
+ ExtraData: map[string]string{},
}
if verify {
diff --git a/pkg/detectors/azure_entra/refreshtoken/refreshtoken.go b/pkg/detectors/azure_entra/refreshtoken/refreshtoken.go
index 75da0b082..b214cfe7f 100644
--- a/pkg/detectors/azure_entra/refreshtoken/refreshtoken.go
+++ b/pkg/detectors/azure_entra/refreshtoken/refreshtoken.go
@@ -310,6 +310,7 @@ func createResult(refreshToken, clientId, tenantId string, verified bool, extraD
r := &detectors.Result{
DetectorType: detector_typepb.DetectorType_AzureRefreshToken,
Raw: []byte(refreshToken),
+ SecretParts: map[string]string{"key": refreshToken},
ExtraData: extraData,
Verified: verified,
}
diff --git a/pkg/detectors/azure_entra/serviceprincipal/v2/spv2.go b/pkg/detectors/azure_entra/serviceprincipal/v2/spv2.go
index 1e580c967..fa4041cf2 100644
--- a/pkg/detectors/azure_entra/serviceprincipal/v2/spv2.go
+++ b/pkg/detectors/azure_entra/serviceprincipal/v2/spv2.go
@@ -157,6 +157,7 @@ func createResult(tenantId string, clientId string, clientSecret string, verifie
r := &detectors.Result{
DetectorType: detector_typepb.DetectorType_Azure,
Raw: []byte(clientSecret),
+ SecretParts: map[string]string{"key": clientSecret},
ExtraData: extraData,
Verified: verified,
Redacted: clientSecret[:5] + "...",
diff --git a/pkg/detectors/azure_openai/azure_openai.go b/pkg/detectors/azure_openai/azure_openai.go
index 8d06d1519..5be045f2f 100644
--- a/pkg/detectors/azure_openai/azure_openai.go
+++ b/pkg/detectors/azure_openai/azure_openai.go
@@ -78,6 +78,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
DetectorType: s.Type(),
Redacted: token[:3] + "..." + token[25:],
Raw: []byte(token),
+ SecretParts: map[string]string{"key": token},
}
for url := range urls {
diff --git a/pkg/detectors/azure_storage/storage.go b/pkg/detectors/azure_storage/storage.go
index 9c1deb03f..a4f21acd2 100644
--- a/pkg/detectors/azure_storage/storage.go
+++ b/pkg/detectors/azure_storage/storage.go
@@ -99,6 +99,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
DetectorType: s.Type(),
Raw: []byte(key),
RawV2: []byte(fmt.Sprintf(`{"accountName":"%s","accountKey":"%s"}`, name, key)),
+ SecretParts: map[string]string{
+ "account_name": name,
+ "account_key": key,
+ },
ExtraData: map[string]string{
"Account_name": name,
},
diff --git a/pkg/detectors/azureapimanagement/repositorykey/repositorykey.go b/pkg/detectors/azureapimanagement/repositorykey/repositorykey.go
index accfa7595..403a519c8 100644
--- a/pkg/detectors/azureapimanagement/repositorykey/repositorykey.go
+++ b/pkg/detectors/azureapimanagement/repositorykey/repositorykey.go
@@ -66,7 +66,11 @@ EndpointLoop:
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AzureApiManagementRepositoryKey,
Raw: []byte(passwordMatch),
- RawV2: []byte(urlMatch + passwordMatch),
+ SecretParts: map[string]string{
+ "url": urlMatch,
+ "password": passwordMatch,
+ },
+ RawV2: []byte(urlMatch + passwordMatch),
}
if verify {
diff --git a/pkg/detectors/azureapimanagementsubscriptionkey/azureapimanagementsubscriptionkey.go b/pkg/detectors/azureapimanagementsubscriptionkey/azureapimanagementsubscriptionkey.go
index 15a0c9ce2..97841c92a 100644
--- a/pkg/detectors/azureapimanagementsubscriptionkey/azureapimanagementsubscriptionkey.go
+++ b/pkg/detectors/azureapimanagementsubscriptionkey/azureapimanagementsubscriptionkey.go
@@ -60,7 +60,11 @@ EndpointLoop:
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AzureAPIManagementSubscriptionKey,
Raw: []byte(baseUrl),
- RawV2: []byte(baseUrl + ":" + key),
+ SecretParts: map[string]string{
+ "url": baseUrl,
+ "key": key,
+ },
+ RawV2: []byte(baseUrl + ":" + key),
}
if verify {
diff --git a/pkg/detectors/azureappconfigconnectionstring/azureappconfigconnectionstring.go b/pkg/detectors/azureappconfigconnectionstring/azureappconfigconnectionstring.go
index e32254aa7..0beecd260 100644
--- a/pkg/detectors/azureappconfigconnectionstring/azureappconfigconnectionstring.go
+++ b/pkg/detectors/azureappconfigconnectionstring/azureappconfigconnectionstring.go
@@ -53,6 +53,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
DetectorType: detector_typepb.DetectorType_AzureAppConfigConnectionString,
Raw: []byte(id),
RawV2: []byte(connectionString),
+ SecretParts: map[string]string{
+ "endpoint": endpoint,
+ "id": id,
+ "secret": secret,
+ },
}
if verify {
diff --git a/pkg/detectors/azurecontainerregistry/azurecontainerregistry.go b/pkg/detectors/azurecontainerregistry/azurecontainerregistry.go
index f5a61de4b..e2556eeb8 100644
--- a/pkg/detectors/azurecontainerregistry/azurecontainerregistry.go
+++ b/pkg/detectors/azurecontainerregistry/azurecontainerregistry.go
@@ -79,8 +79,12 @@ EndpointLoop:
r := detectors.Result{
DetectorType: detector_typepb.DetectorType_AzureContainerRegistry,
Raw: []byte(password),
- RawV2: []byte(`{"username":"` + username + `","password":"` + password + `"}`),
- Redacted: username,
+ SecretParts: map[string]string{
+ "username": username,
+ "password": password,
+ },
+ RawV2: []byte(`{"username":"` + username + `","password":"` + password + `"}`),
+ Redacted: username,
}
if verify {
diff --git a/pkg/detectors/azuredevopspersonalaccesstoken/azuredevopspersonalaccesstoken.go b/pkg/detectors/azuredevopspersonalaccesstoken/azuredevopspersonalaccesstoken.go
index 276b3beb3..b020c72dc 100644
--- a/pkg/detectors/azuredevopspersonalaccesstoken/azuredevopspersonalaccesstoken.go
+++ b/pkg/detectors/azuredevopspersonalaccesstoken/azuredevopspersonalaccesstoken.go
@@ -49,7 +49,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AzureDevopsPersonalAccessToken,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resOrgMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "organization": resOrgMatch,
+ },
+ RawV2: []byte(resMatch + resOrgMatch),
}
if verify {
diff --git a/pkg/detectors/azuredirectmanagementkey/azuredirectmanagementkey.go b/pkg/detectors/azuredirectmanagementkey/azuredirectmanagementkey.go
index 551a17a16..b03481486 100644
--- a/pkg/detectors/azuredirectmanagementkey/azuredirectmanagementkey.go
+++ b/pkg/detectors/azuredirectmanagementkey/azuredirectmanagementkey.go
@@ -66,7 +66,11 @@ EndpointLoop:
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AzureDirectManagementKey,
Raw: []byte(baseUrl),
- RawV2: []byte(baseUrl + ":" + key),
+ SecretParts: map[string]string{
+ "url": baseUrl,
+ "key": key,
+ },
+ RawV2: []byte(baseUrl + ":" + key),
}
if verify {
diff --git a/pkg/detectors/azurefunctionkey/azurefunctionkey.go b/pkg/detectors/azurefunctionkey/azurefunctionkey.go
index f13e01787..9a93494b1 100644
--- a/pkg/detectors/azurefunctionkey/azurefunctionkey.go
+++ b/pkg/detectors/azurefunctionkey/azurefunctionkey.go
@@ -46,7 +46,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AzureFunctionKey,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resUrl),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "url": resUrl,
+ },
+ RawV2: []byte(resMatch + resUrl),
}
if verify {
diff --git a/pkg/detectors/azuresastoken/azuresastoken.go b/pkg/detectors/azuresastoken/azuresastoken.go
index 493e03fcd..a887a9ed3 100644
--- a/pkg/detectors/azuresastoken/azuresastoken.go
+++ b/pkg/detectors/azuresastoken/azuresastoken.go
@@ -79,7 +79,11 @@ UrlLoop:
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AzureSasToken,
Raw: []byte(url),
- RawV2: []byte(url + key),
+ SecretParts: map[string]string{
+ "url": url,
+ "key": key,
+ },
+ RawV2: []byte(url + key),
}
if verify {
diff --git a/pkg/detectors/azuresearchadminkey/azuresearchadminkey.go b/pkg/detectors/azuresearchadminkey/azuresearchadminkey.go
index 7c44cdda3..bf76892f9 100644
--- a/pkg/detectors/azuresearchadminkey/azuresearchadminkey.go
+++ b/pkg/detectors/azuresearchadminkey/azuresearchadminkey.go
@@ -50,6 +50,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
DetectorType: detector_typepb.DetectorType_AzureSearchAdminKey,
Raw: []byte(resMatch),
RawV2: []byte(resMatch + resServiceMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "service": resServiceMatch,
+ },
}
if verify {
diff --git a/pkg/detectors/azuresearchquerykey/azuresearchquerykey.go b/pkg/detectors/azuresearchquerykey/azuresearchquerykey.go
index 03edcd919..25a68e744 100644
--- a/pkg/detectors/azuresearchquerykey/azuresearchquerykey.go
+++ b/pkg/detectors/azuresearchquerykey/azuresearchquerykey.go
@@ -50,7 +50,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AzureSearchQueryKey,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resUrlMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "url": resUrlMatch,
+ },
+ RawV2: []byte(resMatch + resUrlMatch),
}
if verify {
client := s.client
diff --git a/pkg/detectors/bannerbear/v1/bannerbear.go b/pkg/detectors/bannerbear/v1/bannerbear.go
index 7855974a3..7a6893825 100644
--- a/pkg/detectors/bannerbear/v1/bannerbear.go
+++ b/pkg/detectors/bannerbear/v1/bannerbear.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Bannerbear,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
ExtraData: map[string]string{
"version": fmt.Sprintf("%d", s.Version()),
},
diff --git a/pkg/detectors/bannerbear/v2/bannerbear.go b/pkg/detectors/bannerbear/v2/bannerbear.go
index ea2ca4eba..0754b2a00 100644
--- a/pkg/detectors/bannerbear/v2/bannerbear.go
+++ b/pkg/detectors/bannerbear/v2/bannerbear.go
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Bannerbear,
Raw: []byte(match),
+ SecretParts: map[string]string{"key": match},
ExtraData: map[string]string{
"version": fmt.Sprintf("%d", s.Version()),
},
diff --git a/pkg/detectors/baremetrics/baremetrics.go b/pkg/detectors/baremetrics/baremetrics.go
index 119e8b0dd..279e9a109 100644
--- a/pkg/detectors/baremetrics/baremetrics.go
+++ b/pkg/detectors/baremetrics/baremetrics.go
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Baremetrics,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/beamer/beamer.go b/pkg/detectors/beamer/beamer.go
index 8ecb62417..b37bbf384 100644
--- a/pkg/detectors/beamer/beamer.go
+++ b/pkg/detectors/beamer/beamer.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Beamer,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/beebole/beebole.go b/pkg/detectors/beebole/beebole.go
index db6053c6c..206b87de5 100644
--- a/pkg/detectors/beebole/beebole.go
+++ b/pkg/detectors/beebole/beebole.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Beebole,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/besnappy/besnappy.go b/pkg/detectors/besnappy/besnappy.go
index 41965a43f..5a19b00ae 100644
--- a/pkg/detectors/besnappy/besnappy.go
+++ b/pkg/detectors/besnappy/besnappy.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Besnappy,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
isVerified, verificationErr := verifyBesnappy(ctx, client, resMatch)
diff --git a/pkg/detectors/besttime/besttime.go b/pkg/detectors/besttime/besttime.go
index e7f2555bf..7cd6eb48e 100644
--- a/pkg/detectors/besttime/besttime.go
+++ b/pkg/detectors/besttime/besttime.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Besttime,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/betterstack/betterstack.go b/pkg/detectors/betterstack/betterstack.go
index bdb9dd602..23d406eda 100644
--- a/pkg/detectors/betterstack/betterstack.go
+++ b/pkg/detectors/betterstack/betterstack.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_BetterStack,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/billomat/billomat.go b/pkg/detectors/billomat/billomat.go
index 2b441ac53..4089a52dc 100644
--- a/pkg/detectors/billomat/billomat.go
+++ b/pkg/detectors/billomat/billomat.go
@@ -65,7 +65,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Billomat,
Raw: []byte(apiKey),
- RawV2: []byte(apiKey + id),
+ SecretParts: map[string]string{
+ "key": apiKey,
+ "id": id,
+ },
+ RawV2: []byte(apiKey + id),
}
if verify {
diff --git a/pkg/detectors/bingsubscriptionkey/bingsubscriptionkey.go b/pkg/detectors/bingsubscriptionkey/bingsubscriptionkey.go
index 1d50f78b4..77d3244ec 100644
--- a/pkg/detectors/bingsubscriptionkey/bingsubscriptionkey.go
+++ b/pkg/detectors/bingsubscriptionkey/bingsubscriptionkey.go
@@ -21,7 +21,7 @@ var _ detectors.Detector = (*Scanner)(nil)
var (
defaultClient = common.SaneHttpClient()
- keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"bing"}) + `\b([a-fA-F0-9]{32})\b`)
+ keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"bing"}) + `\b([a-fA-F0-9]{32})\b`)
)
func (s Scanner) Keywords() []string {
@@ -40,6 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_BingSubscriptionKey,
Raw: []byte(match),
+ SecretParts: map[string]string{"key": match},
}
if verify {
diff --git a/pkg/detectors/bitbar/bitbar.go b/pkg/detectors/bitbar/bitbar.go
index 36ca3f31d..e2eb05c1c 100644
--- a/pkg/detectors/bitbar/bitbar.go
+++ b/pkg/detectors/bitbar/bitbar.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Bitbar,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/bitbucketapppassword/bitbucketapppassword.go b/pkg/detectors/bitbucketapppassword/bitbucketapppassword.go
index 00026155d..273dabcbd 100644
--- a/pkg/detectors/bitbucketapppassword/bitbucketapppassword.go
+++ b/pkg/detectors/bitbucketapppassword/bitbucketapppassword.go
@@ -82,6 +82,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) ([]dete
result := detectors.Result{
DetectorType: detector_typepb.DetectorType_BitbucketAppPassword,
Raw: fmt.Appendf(nil, "%s:%s", username, password),
+ SecretParts: map[string]string{
+ "username": username,
+ "password": password,
+ },
}
if verify {
client := s.client
diff --git a/pkg/detectors/bitbucketdatacenter/bitbucketdatacenter.go b/pkg/detectors/bitbucketdatacenter/bitbucketdatacenter.go
index 734620f46..30839b2ce 100644
--- a/pkg/detectors/bitbucketdatacenter/bitbucketdatacenter.go
+++ b/pkg/detectors/bitbucketdatacenter/bitbucketdatacenter.go
@@ -73,7 +73,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_BitbucketDataCenter,
Raw: []byte(secret),
- RawV2: []byte(fmt.Sprintf("%s:%s", secret, bitBucketURL)),
+ SecretParts: map[string]string{
+ "secret": secret,
+ "url": bitBucketURL,
+ },
+ RawV2: []byte(fmt.Sprintf("%s:%s", secret, bitBucketURL)),
ExtraData: map[string]string{
"URL": bitBucketURL,
},
diff --git a/pkg/detectors/bitcoinaverage/bitcoinaverage.go b/pkg/detectors/bitcoinaverage/bitcoinaverage.go
index 495820194..017f9b6e8 100644
--- a/pkg/detectors/bitcoinaverage/bitcoinaverage.go
+++ b/pkg/detectors/bitcoinaverage/bitcoinaverage.go
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_BitcoinAverage,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/bitfinex/bitfinex.go b/pkg/detectors/bitfinex/bitfinex.go
index b51d837ee..34dad0eac 100644
--- a/pkg/detectors/bitfinex/bitfinex.go
+++ b/pkg/detectors/bitfinex/bitfinex.go
@@ -81,6 +81,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Bitfinex,
Raw: []byte(apiKey),
+ SecretParts: map[string]string{"key": apiKey},
}
if verify {
diff --git a/pkg/detectors/bitlyaccesstoken/bitlyaccesstoken.go b/pkg/detectors/bitlyaccesstoken/bitlyaccesstoken.go
index a055f4e99..5a23c69ff 100644
--- a/pkg/detectors/bitlyaccesstoken/bitlyaccesstoken.go
+++ b/pkg/detectors/bitlyaccesstoken/bitlyaccesstoken.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_BitLyAccessToken,
Raw: []byte(token),
+ SecretParts: map[string]string{"key": token},
}
if verify {
diff --git a/pkg/detectors/bitmex/bitmex.go b/pkg/detectors/bitmex/bitmex.go
index 16f01c5f3..3c90f4688 100644
--- a/pkg/detectors/bitmex/bitmex.go
+++ b/pkg/detectors/bitmex/bitmex.go
@@ -57,7 +57,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Bitmex,
Raw: []byte(resSecretMatch),
- RawV2: []byte(resMatch + resSecretMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "secret": resSecretMatch,
+ },
+ RawV2: []byte(resMatch + resSecretMatch),
}
if verify {
diff --git a/pkg/detectors/blazemeter/blazemeter.go b/pkg/detectors/blazemeter/blazemeter.go
index 4df8802bd..6f76e9372 100644
--- a/pkg/detectors/blazemeter/blazemeter.go
+++ b/pkg/detectors/blazemeter/blazemeter.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Blazemeter,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/blitapp/blitapp.go b/pkg/detectors/blitapp/blitapp.go
index 3921b1e4d..e35b89406 100644
--- a/pkg/detectors/blitapp/blitapp.go
+++ b/pkg/detectors/blitapp/blitapp.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_BlitApp,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/blocknative/blocknative.go b/pkg/detectors/blocknative/blocknative.go
index 2c834fc37..729e85c34 100644
--- a/pkg/detectors/blocknative/blocknative.go
+++ b/pkg/detectors/blocknative/blocknative.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_BlockNative,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/blogger/blogger.go b/pkg/detectors/blogger/blogger.go
index 17a188b9e..35516d862 100644
--- a/pkg/detectors/blogger/blogger.go
+++ b/pkg/detectors/blogger/blogger.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Blogger,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/bombbomb/bombbomb.go b/pkg/detectors/bombbomb/bombbomb.go
index b3842d739..3f027d1a7 100644
--- a/pkg/detectors/bombbomb/bombbomb.go
+++ b/pkg/detectors/bombbomb/bombbomb.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_BombBomb,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/boostnote/boostnote.go b/pkg/detectors/boostnote/boostnote.go
index 0072e2a96..2aff8923a 100644
--- a/pkg/detectors/boostnote/boostnote.go
+++ b/pkg/detectors/boostnote/boostnote.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_BoostNote,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/borgbase/borgbase.go b/pkg/detectors/borgbase/borgbase.go
index 47a58b6ee..cd7d75197 100644
--- a/pkg/detectors/borgbase/borgbase.go
+++ b/pkg/detectors/borgbase/borgbase.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Borgbase,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/box/box.go b/pkg/detectors/box/box.go
index 3c98f1f9f..b45717cbc 100644
--- a/pkg/detectors/box/box.go
+++ b/pkg/detectors/box/box.go
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Box,
Raw: []byte(match),
+ SecretParts: map[string]string{"key": match},
}
if verify {
diff --git a/pkg/detectors/boxoauth/boxoauth.go b/pkg/detectors/boxoauth/boxoauth.go
index 4a415f663..75e7e51d3 100644
--- a/pkg/detectors/boxoauth/boxoauth.go
+++ b/pkg/detectors/boxoauth/boxoauth.go
@@ -63,7 +63,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_BoxOauth,
Raw: []byte(resIdMatch),
- RawV2: []byte(resIdMatch + resSecretMatch),
+ SecretParts: map[string]string{
+ "id": resIdMatch,
+ "secret": resSecretMatch,
+ },
+ RawV2: []byte(resIdMatch + resSecretMatch),
}
if verify {
diff --git a/pkg/detectors/braintreepayments/braintreepayments.go b/pkg/detectors/braintreepayments/braintreepayments.go
index cab2a3eff..74578caec 100644
--- a/pkg/detectors/braintreepayments/braintreepayments.go
+++ b/pkg/detectors/braintreepayments/braintreepayments.go
@@ -57,6 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_BraintreePayments,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/brandfetch/v1/brandfetch.go b/pkg/detectors/brandfetch/v1/brandfetch.go
index 6f560daa3..748fd7ba7 100644
--- a/pkg/detectors/brandfetch/v1/brandfetch.go
+++ b/pkg/detectors/brandfetch/v1/brandfetch.go
@@ -64,6 +64,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Brandfetch,
Raw: []byte(match),
+ SecretParts: map[string]string{"key": match},
ExtraData: map[string]string{"version": strconv.Itoa(s.Version())},
}
diff --git a/pkg/detectors/brandfetch/v2/brandfetch.go b/pkg/detectors/brandfetch/v2/brandfetch.go
index 817d95e85..2dacb7ddd 100644
--- a/pkg/detectors/brandfetch/v2/brandfetch.go
+++ b/pkg/detectors/brandfetch/v2/brandfetch.go
@@ -65,6 +65,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Brandfetch,
Raw: []byte(match),
+ SecretParts: map[string]string{"key": match},
ExtraData: map[string]string{"version": strconv.Itoa(s.Version())},
}
diff --git a/pkg/detectors/browserstack/browserstack.go b/pkg/detectors/browserstack/browserstack.go
index caf68ed94..0804cbb63 100644
--- a/pkg/detectors/browserstack/browserstack.go
+++ b/pkg/detectors/browserstack/browserstack.go
@@ -65,7 +65,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_BrowserStack,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resUserMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "username": resUserMatch,
+ },
+ RawV2: []byte(resMatch + resUserMatch),
}
if verify {
diff --git a/pkg/detectors/browshot/browshot.go b/pkg/detectors/browshot/browshot.go
index a75db1792..602ecd7af 100644
--- a/pkg/detectors/browshot/browshot.go
+++ b/pkg/detectors/browshot/browshot.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Browshot,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/bscscan/bscscan.go b/pkg/detectors/bscscan/bscscan.go
index bf48b7a80..ae125cc8e 100644
--- a/pkg/detectors/bscscan/bscscan.go
+++ b/pkg/detectors/bscscan/bscscan.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_BscScan,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/buddyns/buddyns.go b/pkg/detectors/buddyns/buddyns.go
index 5d21f0320..d22c9d8cf 100644
--- a/pkg/detectors/buddyns/buddyns.go
+++ b/pkg/detectors/buddyns/buddyns.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_BuddyNS,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/budibase/budibase.go b/pkg/detectors/budibase/budibase.go
index 0d95f1e16..de844c8dd 100644
--- a/pkg/detectors/budibase/budibase.go
+++ b/pkg/detectors/budibase/budibase.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Budibase,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/bugherd/bugherd.go b/pkg/detectors/bugherd/bugherd.go
index 0d4d77591..31973b86c 100644
--- a/pkg/detectors/bugherd/bugherd.go
+++ b/pkg/detectors/bugherd/bugherd.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Bugherd,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/bugsnag/bugsnag.go b/pkg/detectors/bugsnag/bugsnag.go
index a60e322e6..f6b11480f 100644
--- a/pkg/detectors/bugsnag/bugsnag.go
+++ b/pkg/detectors/bugsnag/bugsnag.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Bugsnag,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/bulbul/bulbul.go b/pkg/detectors/bulbul/bulbul.go
index 7f1c591c4..3990d260e 100644
--- a/pkg/detectors/bulbul/bulbul.go
+++ b/pkg/detectors/bulbul/bulbul.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Bulbul,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/bulksms/bulksms.go b/pkg/detectors/bulksms/bulksms.go
index 0167ce8a3..1e8c5ba2d 100644
--- a/pkg/detectors/bulksms/bulksms.go
+++ b/pkg/detectors/bulksms/bulksms.go
@@ -53,7 +53,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Bulksms,
Raw: []byte(key),
- RawV2: []byte(key + id),
+ SecretParts: map[string]string{
+ "key": key,
+ "id": id,
+ },
+ RawV2: []byte(key + id),
}
if verify {
diff --git a/pkg/detectors/buttercms/buttercms.go b/pkg/detectors/buttercms/buttercms.go
index 2c9d00bb7..67a59a9f7 100644
--- a/pkg/detectors/buttercms/buttercms.go
+++ b/pkg/detectors/buttercms/buttercms.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ButterCMS,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/caflou/caflou.go b/pkg/detectors/caflou/caflou.go
index 5c012343b..ec1a7c0a5 100644
--- a/pkg/detectors/caflou/caflou.go
+++ b/pkg/detectors/caflou/caflou.go
@@ -55,6 +55,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Caflou,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/calendarific/calendarific.go b/pkg/detectors/calendarific/calendarific.go
index 96d30769d..6aaa64cf2 100644
--- a/pkg/detectors/calendarific/calendarific.go
+++ b/pkg/detectors/calendarific/calendarific.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Calendarific,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/calendlyapikey/calendlyapikey.go b/pkg/detectors/calendlyapikey/calendlyapikey.go
index fa88be3d3..8323f930f 100644
--- a/pkg/detectors/calendlyapikey/calendlyapikey.go
+++ b/pkg/detectors/calendlyapikey/calendlyapikey.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_CalendlyApiKey,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/calorieninja/calorieninja.go b/pkg/detectors/calorieninja/calorieninja.go
index e4c8b8cf4..fd93a5689 100644
--- a/pkg/detectors/calorieninja/calorieninja.go
+++ b/pkg/detectors/calorieninja/calorieninja.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_CalorieNinja,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/campayn/campayn.go b/pkg/detectors/campayn/campayn.go
index 9c3313397..9ea5e75b6 100644
--- a/pkg/detectors/campayn/campayn.go
+++ b/pkg/detectors/campayn/campayn.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Campayn,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/cannyio/cannyio.go b/pkg/detectors/cannyio/cannyio.go
index 216324157..2bbcc4908 100644
--- a/pkg/detectors/cannyio/cannyio.go
+++ b/pkg/detectors/cannyio/cannyio.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_CannyIo,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/capsulecrm/capsulecrm.go b/pkg/detectors/capsulecrm/capsulecrm.go
index 568e34f85..645d35820 100644
--- a/pkg/detectors/capsulecrm/capsulecrm.go
+++ b/pkg/detectors/capsulecrm/capsulecrm.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_CapsuleCRM,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/captaindata/v1/captaindata.go b/pkg/detectors/captaindata/v1/captaindata.go
index 1f7c00bde..55b0316a4 100644
--- a/pkg/detectors/captaindata/v1/captaindata.go
+++ b/pkg/detectors/captaindata/v1/captaindata.go
@@ -52,7 +52,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_CaptainData,
Raw: []byte(resMatch),
- RawV2: []byte(resProjIdMatch + resMatch),
+ SecretParts: map[string]string{
+ "project_id": resProjIdMatch,
+ "key": resMatch,
+ },
+ RawV2: []byte(resProjIdMatch + resMatch),
}
if verify {
diff --git a/pkg/detectors/captaindata/v2/captaindata.go b/pkg/detectors/captaindata/v2/captaindata.go
index e9941e47b..9d0dc044e 100644
--- a/pkg/detectors/captaindata/v2/captaindata.go
+++ b/pkg/detectors/captaindata/v2/captaindata.go
@@ -55,7 +55,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_CaptainData,
Raw: []byte(apiKey),
- RawV2: []byte(projId + apiKey),
+ SecretParts: map[string]string{
+ "project_id": projId,
+ "key": apiKey,
+ },
+ RawV2: []byte(projId + apiKey),
}
if verify {
diff --git a/pkg/detectors/carboninterface/carboninterface.go b/pkg/detectors/carboninterface/carboninterface.go
index cd7d99f48..848b54591 100644
--- a/pkg/detectors/carboninterface/carboninterface.go
+++ b/pkg/detectors/carboninterface/carboninterface.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_CarbonInterface,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/cashboard/cashboard.go b/pkg/detectors/cashboard/cashboard.go
index 5ce9a8105..2fda6ef13 100644
--- a/pkg/detectors/cashboard/cashboard.go
+++ b/pkg/detectors/cashboard/cashboard.go
@@ -51,7 +51,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Cashboard,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resUser),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "username": resUser,
+ },
+ RawV2: []byte(resMatch + resUser),
}
if verify {
diff --git a/pkg/detectors/caspio/caspio.go b/pkg/detectors/caspio/caspio.go
index 4b6652147..3ae65f4d2 100644
--- a/pkg/detectors/caspio/caspio.go
+++ b/pkg/detectors/caspio/caspio.go
@@ -56,7 +56,12 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Caspio,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resIdMatch + resDomainMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "id": resIdMatch,
+ "domain": resDomainMatch,
+ },
+ RawV2: []byte(resMatch + resIdMatch + resDomainMatch),
}
if verify {
diff --git a/pkg/detectors/censys/censys.go b/pkg/detectors/censys/censys.go
index c86ad2496..3db0f273c 100644
--- a/pkg/detectors/censys/censys.go
+++ b/pkg/detectors/censys/censys.go
@@ -48,7 +48,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Censys,
Raw: []byte(tokenPatMatch),
- RawV2: []byte(tokenPatMatch + userPatMatch),
+ SecretParts: map[string]string{
+ "token": tokenPatMatch,
+ "username": userPatMatch,
+ },
+ RawV2: []byte(tokenPatMatch + userPatMatch),
}
if verify {
diff --git a/pkg/detectors/centralstationcrm/centralstationcrm.go b/pkg/detectors/centralstationcrm/centralstationcrm.go
index 9c6ea7789..46127f3b7 100644
--- a/pkg/detectors/centralstationcrm/centralstationcrm.go
+++ b/pkg/detectors/centralstationcrm/centralstationcrm.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_CentralStationCRM,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/cexio/cexio.go b/pkg/detectors/cexio/cexio.go
index fb9036573..1cb92a610 100644
--- a/pkg/detectors/cexio/cexio.go
+++ b/pkg/detectors/cexio/cexio.go
@@ -62,7 +62,12 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_CexIO,
Raw: []byte(resKeyMatch),
- RawV2: []byte(resUserIdMatch + resSecretMatch),
+ SecretParts: map[string]string{
+ "user_id": resUserIdMatch,
+ "secret": resSecretMatch,
+ "key": resKeyMatch,
+ },
+ RawV2: []byte(resUserIdMatch + resSecretMatch),
}
if verify {
diff --git a/pkg/detectors/chartmogul/chartmogul.go b/pkg/detectors/chartmogul/chartmogul.go
index ef563c37f..d8f612a58 100644
--- a/pkg/detectors/chartmogul/chartmogul.go
+++ b/pkg/detectors/chartmogul/chartmogul.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Chartmogul,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/chatbot/chatbot.go b/pkg/detectors/chatbot/chatbot.go
index 3e867dc22..cb6b5f7a8 100644
--- a/pkg/detectors/chatbot/chatbot.go
+++ b/pkg/detectors/chatbot/chatbot.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Chatbot,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/chatfule/chatfule.go b/pkg/detectors/chatfule/chatfule.go
index f989f3def..6319dda29 100644
--- a/pkg/detectors/chatfule/chatfule.go
+++ b/pkg/detectors/chatfule/chatfule.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Chatfule,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/checio/checio.go b/pkg/detectors/checio/checio.go
index d5e86df66..981e5abf2 100644
--- a/pkg/detectors/checio/checio.go
+++ b/pkg/detectors/checio/checio.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ChecIO,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/checklyhq/checklyhq.go b/pkg/detectors/checklyhq/checklyhq.go
index 8d3d335b7..a9d6c3bc8 100644
--- a/pkg/detectors/checklyhq/checklyhq.go
+++ b/pkg/detectors/checklyhq/checklyhq.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ChecklyHQ,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/checkout/checkout.go b/pkg/detectors/checkout/checkout.go
index 76de20715..879005ca8 100644
--- a/pkg/detectors/checkout/checkout.go
+++ b/pkg/detectors/checkout/checkout.go
@@ -50,7 +50,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Checkout,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resIdMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "id": resIdMatch,
+ },
+ RawV2: []byte(resMatch + resIdMatch),
}
if verify {
diff --git a/pkg/detectors/checkvist/checkvist.go b/pkg/detectors/checkvist/checkvist.go
index 3c5b07f7f..94f9260d0 100644
--- a/pkg/detectors/checkvist/checkvist.go
+++ b/pkg/detectors/checkvist/checkvist.go
@@ -52,7 +52,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Checkvist,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + emailMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "email": emailMatch,
+ },
+ RawV2: []byte(resMatch + emailMatch),
}
if verify {
diff --git a/pkg/detectors/cicero/cicero.go b/pkg/detectors/cicero/cicero.go
index c537846ae..88271e94d 100644
--- a/pkg/detectors/cicero/cicero.go
+++ b/pkg/detectors/cicero/cicero.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Cicero,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/circleci/v1/circleci.go b/pkg/detectors/circleci/v1/circleci.go
index 8a3b828fa..cc5c75018 100644
--- a/pkg/detectors/circleci/v1/circleci.go
+++ b/pkg/detectors/circleci/v1/circleci.go
@@ -66,6 +66,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
result := detectors.Result{
DetectorType: detector_typepb.DetectorType_Circle,
Raw: []byte(token),
+ SecretParts: map[string]string{"key": token},
ExtraData: map[string]string{
"Version": strconv.Itoa(s.Version()),
},
diff --git a/pkg/detectors/circleci/v2/circleci.go b/pkg/detectors/circleci/v2/circleci.go
index 3d541dbe9..9ec217255 100644
--- a/pkg/detectors/circleci/v2/circleci.go
+++ b/pkg/detectors/circleci/v2/circleci.go
@@ -65,6 +65,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
result := detectors.Result{
DetectorType: detector_typepb.DetectorType_Circle,
Raw: []byte(token),
+ SecretParts: map[string]string{"key": token},
ExtraData: map[string]string{
"Version": strconv.Itoa(s.Version()),
},
diff --git a/pkg/detectors/clarifai/clarifai.go b/pkg/detectors/clarifai/clarifai.go
index 79337ee49..a8feaf6c1 100644
--- a/pkg/detectors/clarifai/clarifai.go
+++ b/pkg/detectors/clarifai/clarifai.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Clarifai,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/clearbit/clearbit.go b/pkg/detectors/clearbit/clearbit.go
index b73212a47..590cf028c 100644
--- a/pkg/detectors/clearbit/clearbit.go
+++ b/pkg/detectors/clearbit/clearbit.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Clearbit,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/clickhelp/clickhelp.go b/pkg/detectors/clickhelp/clickhelp.go
index 0e366310d..5cb996d45 100644
--- a/pkg/detectors/clickhelp/clickhelp.go
+++ b/pkg/detectors/clickhelp/clickhelp.go
@@ -67,7 +67,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ClickHelp,
Raw: []byte(portalLink),
- RawV2: []byte(portalLink + email),
+ SecretParts: map[string]string{
+ "url": portalLink,
+ "email": email,
+ },
+ RawV2: []byte(portalLink + email),
}
if verify {
diff --git a/pkg/detectors/clicksendsms/clicksendsms.go b/pkg/detectors/clicksendsms/clicksendsms.go
index a4a57ed16..51e002c05 100644
--- a/pkg/detectors/clicksendsms/clicksendsms.go
+++ b/pkg/detectors/clicksendsms/clicksendsms.go
@@ -50,7 +50,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ClickSendsms,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resIdMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "id": resIdMatch,
+ },
+ RawV2: []byte(resMatch + resIdMatch),
}
if verify {
diff --git a/pkg/detectors/clickuppersonaltoken/clickuppersonaltoken.go b/pkg/detectors/clickuppersonaltoken/clickuppersonaltoken.go
index b5d67756d..5efc0493c 100644
--- a/pkg/detectors/clickuppersonaltoken/clickuppersonaltoken.go
+++ b/pkg/detectors/clickuppersonaltoken/clickuppersonaltoken.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ClickupPersonalToken,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/cliengo/cliengo.go b/pkg/detectors/cliengo/cliengo.go
index cc4af6d01..e9dbebab9 100644
--- a/pkg/detectors/cliengo/cliengo.go
+++ b/pkg/detectors/cliengo/cliengo.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Cliengo,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/clientary/clientary.go b/pkg/detectors/clientary/clientary.go
index d4af81fb0..ab8559d6d 100644
--- a/pkg/detectors/clientary/clientary.go
+++ b/pkg/detectors/clientary/clientary.go
@@ -74,8 +74,12 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Clientary,
Raw: []byte(apiKey),
- RawV2: []byte(apiKey + ":" + id),
- ExtraData: make(map[string]string),
+ SecretParts: map[string]string{
+ "key": apiKey,
+ "id": id,
+ },
+ RawV2: []byte(apiKey + ":" + id),
+ ExtraData: make(map[string]string),
}
if verify {
diff --git a/pkg/detectors/clinchpad/clinchpad.go b/pkg/detectors/clinchpad/clinchpad.go
index f430bef9e..60ed04968 100644
--- a/pkg/detectors/clinchpad/clinchpad.go
+++ b/pkg/detectors/clinchpad/clinchpad.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Clinchpad,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/clockify/clockify.go b/pkg/detectors/clockify/clockify.go
index 525be164f..103fe4e6e 100644
--- a/pkg/detectors/clockify/clockify.go
+++ b/pkg/detectors/clockify/clockify.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Clockify,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/clockworksms/clockworksms.go b/pkg/detectors/clockworksms/clockworksms.go
index 27ea487ea..4a167e5e7 100644
--- a/pkg/detectors/clockworksms/clockworksms.go
+++ b/pkg/detectors/clockworksms/clockworksms.go
@@ -49,7 +49,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ClockworkSMS,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + tokenRes),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "token": tokenRes,
+ },
+ RawV2: []byte(resMatch + tokenRes),
}
if verify {
diff --git a/pkg/detectors/closecrm/close.go b/pkg/detectors/closecrm/close.go
index fef55fb69..41df5ec70 100644
--- a/pkg/detectors/closecrm/close.go
+++ b/pkg/detectors/closecrm/close.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Close,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/cloudconvert/cloudconvert.go b/pkg/detectors/cloudconvert/cloudconvert.go
index 1e3e4e55b..4d62b4fe2 100644
--- a/pkg/detectors/cloudconvert/cloudconvert.go
+++ b/pkg/detectors/cloudconvert/cloudconvert.go
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_CloudConvert,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/cloudelements/cloudelements.go b/pkg/detectors/cloudelements/cloudelements.go
index 02c421a85..dfa788c86 100644
--- a/pkg/detectors/cloudelements/cloudelements.go
+++ b/pkg/detectors/cloudelements/cloudelements.go
@@ -51,7 +51,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_CloudElements,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resOrgMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "organization": resOrgMatch,
+ },
+ RawV2: []byte(resMatch + resOrgMatch),
}
if verify {
diff --git a/pkg/detectors/cloudflareapitoken/cloudflareapitoken.go b/pkg/detectors/cloudflareapitoken/cloudflareapitoken.go
index fd712bddb..7645d81d7 100644
--- a/pkg/detectors/cloudflareapitoken/cloudflareapitoken.go
+++ b/pkg/detectors/cloudflareapitoken/cloudflareapitoken.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_CloudflareApiToken,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/cloudflarecakey/cloudflarecakey.go b/pkg/detectors/cloudflarecakey/cloudflarecakey.go
index 31ed93b13..4b9bc5fef 100644
--- a/pkg/detectors/cloudflarecakey/cloudflarecakey.go
+++ b/pkg/detectors/cloudflarecakey/cloudflarecakey.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_CloudflareCaKey,
Raw: []byte(caKey),
+ SecretParts: map[string]string{"key": caKey},
}
if verify {
diff --git a/pkg/detectors/cloudflareglobalapikey/cloudflareglobalapikey.go b/pkg/detectors/cloudflareglobalapikey/cloudflareglobalapikey.go
index 66d14f4d9..ac2d268cd 100644
--- a/pkg/detectors/cloudflareglobalapikey/cloudflareglobalapikey.go
+++ b/pkg/detectors/cloudflareglobalapikey/cloudflareglobalapikey.go
@@ -52,7 +52,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
DetectorType: detector_typepb.DetectorType_CloudflareGlobalApiKey,
Redacted: emailMatch,
Raw: []byte(apiKeyRes),
- RawV2: []byte(apiKeyRes + emailMatch),
+ SecretParts: map[string]string{
+ "key": apiKeyRes,
+ "email": emailMatch,
+ },
+ RawV2: []byte(apiKeyRes + emailMatch),
}
if verify {
diff --git a/pkg/detectors/cloudimage/cloudimage.go b/pkg/detectors/cloudimage/cloudimage.go
index b87b1b981..a992e4276 100644
--- a/pkg/detectors/cloudimage/cloudimage.go
+++ b/pkg/detectors/cloudimage/cloudimage.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_CloudImage,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/cloudmersive/cloudmersive.go b/pkg/detectors/cloudmersive/cloudmersive.go
index 54a8cadc9..2589a73b1 100644
--- a/pkg/detectors/cloudmersive/cloudmersive.go
+++ b/pkg/detectors/cloudmersive/cloudmersive.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Cloudmersive,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/cloudplan/cloudplan.go b/pkg/detectors/cloudplan/cloudplan.go
index 71875f7df..cba92389b 100644
--- a/pkg/detectors/cloudplan/cloudplan.go
+++ b/pkg/detectors/cloudplan/cloudplan.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Cloudplan,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/cloudsmith/cloudsmith.go b/pkg/detectors/cloudsmith/cloudsmith.go
index 30d70e845..a0278c16d 100644
--- a/pkg/detectors/cloudsmith/cloudsmith.go
+++ b/pkg/detectors/cloudsmith/cloudsmith.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Cloudsmith,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/cloverly/cloverly.go b/pkg/detectors/cloverly/cloverly.go
index 471706807..d9f227564 100644
--- a/pkg/detectors/cloverly/cloverly.go
+++ b/pkg/detectors/cloverly/cloverly.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Cloverly,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/cloze/cloze.go b/pkg/detectors/cloze/cloze.go
index a47009640..eb22cd275 100644
--- a/pkg/detectors/cloze/cloze.go
+++ b/pkg/detectors/cloze/cloze.go
@@ -52,6 +52,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Cloze,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/clustdoc/clustdoc.go b/pkg/detectors/clustdoc/clustdoc.go
index a42de2a5a..fbe50ce13 100644
--- a/pkg/detectors/clustdoc/clustdoc.go
+++ b/pkg/detectors/clustdoc/clustdoc.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ClustDoc,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/coda/coda.go b/pkg/detectors/coda/coda.go
index e8281394d..e89e51ab5 100644
--- a/pkg/detectors/coda/coda.go
+++ b/pkg/detectors/coda/coda.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Coda,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/codacy/codacy.go b/pkg/detectors/codacy/codacy.go
index ac56b14d2..3b6f5abf3 100644
--- a/pkg/detectors/codacy/codacy.go
+++ b/pkg/detectors/codacy/codacy.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Codacy,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/codeclimate/codeclimate.go b/pkg/detectors/codeclimate/codeclimate.go
index 289528550..fac992d69 100644
--- a/pkg/detectors/codeclimate/codeclimate.go
+++ b/pkg/detectors/codeclimate/codeclimate.go
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Codeclimate,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/codemagic/codemagic.go b/pkg/detectors/codemagic/codemagic.go
index 0f5ebb450..63f3afed9 100644
--- a/pkg/detectors/codemagic/codemagic.go
+++ b/pkg/detectors/codemagic/codemagic.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Codemagic,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/codequiry/codequiry.go b/pkg/detectors/codequiry/codequiry.go
index bfd5a44b5..d8d191ef2 100644
--- a/pkg/detectors/codequiry/codequiry.go
+++ b/pkg/detectors/codequiry/codequiry.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Codequiry,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/coinapi/coinapi.go b/pkg/detectors/coinapi/coinapi.go
index 2b63a16a8..1732055a3 100644
--- a/pkg/detectors/coinapi/coinapi.go
+++ b/pkg/detectors/coinapi/coinapi.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_CoinApi,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/coinlayer/coinlayer.go b/pkg/detectors/coinlayer/coinlayer.go
index 5d53ba96a..71df5549c 100644
--- a/pkg/detectors/coinlayer/coinlayer.go
+++ b/pkg/detectors/coinlayer/coinlayer.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Coinlayer,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/coinlib/coinlib.go b/pkg/detectors/coinlib/coinlib.go
index 7a0d014eb..8dfda739e 100644
--- a/pkg/detectors/coinlib/coinlib.go
+++ b/pkg/detectors/coinlib/coinlib.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Coinlib,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/collect2/collect2.go b/pkg/detectors/collect2/collect2.go
index 57b3d6dc7..851142d7a 100644
--- a/pkg/detectors/collect2/collect2.go
+++ b/pkg/detectors/collect2/collect2.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Collect2,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/column/column.go b/pkg/detectors/column/column.go
index 0172aa877..cf8173a42 100644
--- a/pkg/detectors/column/column.go
+++ b/pkg/detectors/column/column.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Column,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/commercejs/commercejs.go b/pkg/detectors/commercejs/commercejs.go
index 4dd196992..4c5209d91 100644
--- a/pkg/detectors/commercejs/commercejs.go
+++ b/pkg/detectors/commercejs/commercejs.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_CommerceJS,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/commodities/commodities.go b/pkg/detectors/commodities/commodities.go
index 37f440ab2..6dc0e6884 100644
--- a/pkg/detectors/commodities/commodities.go
+++ b/pkg/detectors/commodities/commodities.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Commodities,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/companyhub/companyhub.go b/pkg/detectors/companyhub/companyhub.go
index e0e2bdde0..e6fca68f2 100644
--- a/pkg/detectors/companyhub/companyhub.go
+++ b/pkg/detectors/companyhub/companyhub.go
@@ -50,7 +50,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_CompanyHub,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resIdMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "id": resIdMatch,
+ },
+ RawV2: []byte(resMatch + resIdMatch),
}
if verify {
diff --git a/pkg/detectors/confluencedatacenter/confluencedatacenter.go b/pkg/detectors/confluencedatacenter/confluencedatacenter.go
index ffbf1b772..3eb6aae6b 100644
--- a/pkg/detectors/confluencedatacenter/confluencedatacenter.go
+++ b/pkg/detectors/confluencedatacenter/confluencedatacenter.go
@@ -130,7 +130,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
r := detectors.Result{
DetectorType: detector_typepb.DetectorType_ConfluenceDataCenter,
Raw: []byte(token),
- RawV2: []byte(fmt.Sprintf("%s:%s", token, baseURL)),
+ SecretParts: map[string]string{
+ "token": token,
+ "url": baseURL,
+ },
+ RawV2: []byte(fmt.Sprintf("%s:%s", token, baseURL)),
ExtraData: map[string]string{
"base_url": baseURL,
},
@@ -157,6 +161,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, detectors.Result{
DetectorType: detector_typepb.DetectorType_ConfluenceDataCenter,
Raw: []byte(token),
+ SecretParts: map[string]string{"token": token},
RawV2: []byte(token),
ExtraData: map[string]string{
"verification_note": "no reachable Confluence Data Center URL found in context; token reported unverified",
diff --git a/pkg/detectors/confluent/confluent.go b/pkg/detectors/confluent/confluent.go
index acedec9cb..530e3c4f3 100644
--- a/pkg/detectors/confluent/confluent.go
+++ b/pkg/detectors/confluent/confluent.go
@@ -51,7 +51,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Confluent,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resSecret),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "secret": resSecret,
+ },
+ RawV2: []byte(resMatch + resSecret),
}
if verify {
diff --git a/pkg/detectors/contentfulpersonalaccesstoken/contentfulpersonalaccesstoken.go b/pkg/detectors/contentfulpersonalaccesstoken/contentfulpersonalaccesstoken.go
index ec7f5660a..30525dafb 100644
--- a/pkg/detectors/contentfulpersonalaccesstoken/contentfulpersonalaccesstoken.go
+++ b/pkg/detectors/contentfulpersonalaccesstoken/contentfulpersonalaccesstoken.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ContentfulPersonalAccessToken,
Raw: []byte(keyRes),
+ SecretParts: map[string]string{"key": keyRes},
}
if verify {
diff --git a/pkg/detectors/conversiontools/conversiontools.go b/pkg/detectors/conversiontools/conversiontools.go
index a83f00c19..b0f9656c6 100644
--- a/pkg/detectors/conversiontools/conversiontools.go
+++ b/pkg/detectors/conversiontools/conversiontools.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ConversionTools,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/convertapi/convertapi.go b/pkg/detectors/convertapi/convertapi.go
index ad9c70477..b70e2c90e 100644
--- a/pkg/detectors/convertapi/convertapi.go
+++ b/pkg/detectors/convertapi/convertapi.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ConvertApi,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/convertkit/convertkit.go b/pkg/detectors/convertkit/convertkit.go
index 447c148ad..cc23ebfab 100644
--- a/pkg/detectors/convertkit/convertkit.go
+++ b/pkg/detectors/convertkit/convertkit.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Convertkit,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/convier/convier.go b/pkg/detectors/convier/convier.go
index 2236e579f..ac890a525 100644
--- a/pkg/detectors/convier/convier.go
+++ b/pkg/detectors/convier/convier.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Convier,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/copper/copper.go b/pkg/detectors/copper/copper.go
index b4ac66cca..e27693566 100644
--- a/pkg/detectors/copper/copper.go
+++ b/pkg/detectors/copper/copper.go
@@ -56,7 +56,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Copper,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resIdMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "id": resIdMatch,
+ },
+ RawV2: []byte(resMatch + resIdMatch),
}
if verify {
diff --git a/pkg/detectors/couchbase/couchbase.go b/pkg/detectors/couchbase/couchbase.go
index a232ced3a..930494c68 100644
--- a/pkg/detectors/couchbase/couchbase.go
+++ b/pkg/detectors/couchbase/couchbase.go
@@ -70,6 +70,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Couchbase,
Raw: fmt.Appendf([]byte(""), "%s:%s@%s", username, password, connString),
+ SecretParts: map[string]string{
+ "host": connString,
+ "username": username,
+ "password": password,
+ },
}
if verify {
diff --git a/pkg/detectors/countrylayer/countrylayer.go b/pkg/detectors/countrylayer/countrylayer.go
index 262bae6da..245841d59 100644
--- a/pkg/detectors/countrylayer/countrylayer.go
+++ b/pkg/detectors/countrylayer/countrylayer.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_CountryLayer,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/courier/courier.go b/pkg/detectors/courier/courier.go
index 6ff8d2daa..8ca8f52f7 100644
--- a/pkg/detectors/courier/courier.go
+++ b/pkg/detectors/courier/courier.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Courier,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/coveralls/coveralls.go b/pkg/detectors/coveralls/coveralls.go
index 244910acc..2e6d4f1ef 100644
--- a/pkg/detectors/coveralls/coveralls.go
+++ b/pkg/detectors/coveralls/coveralls.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Coveralls,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/craftmypdf/craftmypdf.go b/pkg/detectors/craftmypdf/craftmypdf.go
index 9d17ee9ff..b4933bc89 100644
--- a/pkg/detectors/craftmypdf/craftmypdf.go
+++ b/pkg/detectors/craftmypdf/craftmypdf.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_CraftMyPDF,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/crowdin/crowdin.go b/pkg/detectors/crowdin/crowdin.go
index abf5516cf..670f17705 100644
--- a/pkg/detectors/crowdin/crowdin.go
+++ b/pkg/detectors/crowdin/crowdin.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Crowdin,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/cryptocompare/cryptocompare.go b/pkg/detectors/cryptocompare/cryptocompare.go
index cfde06058..f8a5133dc 100644
--- a/pkg/detectors/cryptocompare/cryptocompare.go
+++ b/pkg/detectors/cryptocompare/cryptocompare.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_CryptoCompare,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/currencycloud/currencycloud.go b/pkg/detectors/currencycloud/currencycloud.go
index a71fbe22c..77e89fd42 100644
--- a/pkg/detectors/currencycloud/currencycloud.go
+++ b/pkg/detectors/currencycloud/currencycloud.go
@@ -53,6 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_CurrencyCloud,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
environments := []string{"devapi", "api"}
if verify {
diff --git a/pkg/detectors/currencyfreaks/currencyfreaks.go b/pkg/detectors/currencyfreaks/currencyfreaks.go
index aad85c162..f7f782d6e 100644
--- a/pkg/detectors/currencyfreaks/currencyfreaks.go
+++ b/pkg/detectors/currencyfreaks/currencyfreaks.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Currencyfreaks,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/currencylayer/currencylayer.go b/pkg/detectors/currencylayer/currencylayer.go
index 086a6976e..d4e230783 100644
--- a/pkg/detectors/currencylayer/currencylayer.go
+++ b/pkg/detectors/currencylayer/currencylayer.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Currencylayer,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/currencyscoop/currencyscoop.go b/pkg/detectors/currencyscoop/currencyscoop.go
index 259e267a8..2808a4c2d 100644
--- a/pkg/detectors/currencyscoop/currencyscoop.go
+++ b/pkg/detectors/currencyscoop/currencyscoop.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_CurrencyScoop,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/currentsapi/currentsapi.go b/pkg/detectors/currentsapi/currentsapi.go
index f80561df1..761f21297 100644
--- a/pkg/detectors/currentsapi/currentsapi.go
+++ b/pkg/detectors/currentsapi/currentsapi.go
@@ -53,6 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_CurrentsAPI,
Raw: []byte(token),
+ SecretParts: map[string]string{"key": token},
}
if verify {
diff --git a/pkg/detectors/customerguru/customerguru.go b/pkg/detectors/customerguru/customerguru.go
index 798df0a58..c235ea817 100644
--- a/pkg/detectors/customerguru/customerguru.go
+++ b/pkg/detectors/customerguru/customerguru.go
@@ -49,7 +49,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_CustomerGuru,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resIdMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "id": resIdMatch,
+ },
+ RawV2: []byte(resMatch + resIdMatch),
}
if verify {
diff --git a/pkg/detectors/customerio/customerio.go b/pkg/detectors/customerio/customerio.go
index 1d9c07639..cc600eb0e 100644
--- a/pkg/detectors/customerio/customerio.go
+++ b/pkg/detectors/customerio/customerio.go
@@ -49,7 +49,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_CustomerIO,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resIdMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "id": resIdMatch,
+ },
+ RawV2: []byte(resMatch + resIdMatch),
}
if verify {
diff --git a/pkg/detectors/d7network/d7network.go b/pkg/detectors/d7network/d7network.go
index 194465839..14b17d79b 100644
--- a/pkg/detectors/d7network/d7network.go
+++ b/pkg/detectors/d7network/d7network.go
@@ -39,6 +39,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_D7Network,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/dailyco/dailyco.go b/pkg/detectors/dailyco/dailyco.go
index 6d3b8bd65..1eae0ff5f 100644
--- a/pkg/detectors/dailyco/dailyco.go
+++ b/pkg/detectors/dailyco/dailyco.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_DailyCO,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/dandelion/dandelion.go b/pkg/detectors/dandelion/dandelion.go
index 4c17b21bb..6f1d83dc9 100644
--- a/pkg/detectors/dandelion/dandelion.go
+++ b/pkg/detectors/dandelion/dandelion.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Dandelion,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/dareboost/dareboost.go b/pkg/detectors/dareboost/dareboost.go
index 4881da0e7..2dcc5128f 100644
--- a/pkg/detectors/dareboost/dareboost.go
+++ b/pkg/detectors/dareboost/dareboost.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Dareboost,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/databox/databox.go b/pkg/detectors/databox/databox.go
index bd43d3ea4..441c1b706 100644
--- a/pkg/detectors/databox/databox.go
+++ b/pkg/detectors/databox/databox.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Databox,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
data := fmt.Sprintf("%s:", resMatch)
diff --git a/pkg/detectors/datagov/datagov.go b/pkg/detectors/datagov/datagov.go
index 8b477cab6..a5cb91f89 100644
--- a/pkg/detectors/datagov/datagov.go
+++ b/pkg/detectors/datagov/datagov.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_DataGov,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/debounce/debounce.go b/pkg/detectors/debounce/debounce.go
index e5c657131..a2a535020 100644
--- a/pkg/detectors/debounce/debounce.go
+++ b/pkg/detectors/debounce/debounce.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Debounce,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/deepai/deepai.go b/pkg/detectors/deepai/deepai.go
index 56bbf05eb..686bd07bf 100644
--- a/pkg/detectors/deepai/deepai.go
+++ b/pkg/detectors/deepai/deepai.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_DeepAI,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/deepgram/deepgram.go b/pkg/detectors/deepgram/deepgram.go
index 9569f2d0d..18e41438e 100644
--- a/pkg/detectors/deepgram/deepgram.go
+++ b/pkg/detectors/deepgram/deepgram.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Deepgram,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/deepseek/deepseek.go b/pkg/detectors/deepseek/deepseek.go
index ca7582a6d..74dfc80ef 100644
--- a/pkg/detectors/deepseek/deepseek.go
+++ b/pkg/detectors/deepseek/deepseek.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_DeepSeek,
Raw: []byte(token),
+ SecretParts: map[string]string{"key": token},
}
if verify {
diff --git a/pkg/detectors/delighted/delighted.go b/pkg/detectors/delighted/delighted.go
index 57331e756..fe8f42998 100644
--- a/pkg/detectors/delighted/delighted.go
+++ b/pkg/detectors/delighted/delighted.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Delighted,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/demio/demio.go b/pkg/detectors/demio/demio.go
index 9da21350f..a94921fc8 100644
--- a/pkg/detectors/demio/demio.go
+++ b/pkg/detectors/demio/demio.go
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Demio,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/deno/denodeploy.go b/pkg/detectors/deno/denodeploy.go
index e5349b205..838fd3942 100644
--- a/pkg/detectors/deno/denodeploy.go
+++ b/pkg/detectors/deno/denodeploy.go
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: s.Type(),
Raw: []byte(token),
+ SecretParts: map[string]string{"key": token},
}
if verify {
diff --git a/pkg/detectors/deputy/deputy.go b/pkg/detectors/deputy/deputy.go
index f1f26d225..10e1fa4f9 100644
--- a/pkg/detectors/deputy/deputy.go
+++ b/pkg/detectors/deputy/deputy.go
@@ -49,6 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Deputy,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/detectify/detectify.go b/pkg/detectors/detectify/detectify.go
index fe06ae10b..82484c723 100644
--- a/pkg/detectors/detectify/detectify.go
+++ b/pkg/detectors/detectify/detectify.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Detectify,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/detectlanguage/detectlanguage.go b/pkg/detectors/detectlanguage/detectlanguage.go
index aa9c89e59..55fefb6de 100644
--- a/pkg/detectors/detectlanguage/detectlanguage.go
+++ b/pkg/detectors/detectlanguage/detectlanguage.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_DetectLanguage,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/dfuse/dfuse.go b/pkg/detectors/dfuse/dfuse.go
index 84ad1d3e1..c57bcc3f9 100644
--- a/pkg/detectors/dfuse/dfuse.go
+++ b/pkg/detectors/dfuse/dfuse.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Dfuse,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/diffbot/diffbot.go b/pkg/detectors/diffbot/diffbot.go
index 37f4fb285..0b5385a08 100644
--- a/pkg/detectors/diffbot/diffbot.go
+++ b/pkg/detectors/diffbot/diffbot.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Diffbot,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/diggernaut/diggernaut.go b/pkg/detectors/diggernaut/diggernaut.go
index d7bc58617..13754ce1c 100644
--- a/pkg/detectors/diggernaut/diggernaut.go
+++ b/pkg/detectors/diggernaut/diggernaut.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Diggernaut,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/discordbottoken/discordbottoken.go b/pkg/detectors/discordbottoken/discordbottoken.go
index 15fcae2e7..e1b0d3360 100644
--- a/pkg/detectors/discordbottoken/discordbottoken.go
+++ b/pkg/detectors/discordbottoken/discordbottoken.go
@@ -48,7 +48,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
DetectorType: detector_typepb.DetectorType_DiscordBotToken,
Redacted: resId,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resId),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "id": resId,
+ },
+ RawV2: []byte(resMatch + resId),
}
if verify {
diff --git a/pkg/detectors/discordwebhook/discordwebhook.go b/pkg/detectors/discordwebhook/discordwebhook.go
index 75fce0de6..6fb040c04 100644
--- a/pkg/detectors/discordwebhook/discordwebhook.go
+++ b/pkg/detectors/discordwebhook/discordwebhook.go
@@ -38,6 +38,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_DiscordWebhook,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/disqus/disqus.go b/pkg/detectors/disqus/disqus.go
index 664c465f0..119bfd1c3 100644
--- a/pkg/detectors/disqus/disqus.go
+++ b/pkg/detectors/disqus/disqus.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Disqus,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/ditto/ditto.go b/pkg/detectors/ditto/ditto.go
index 2dc56446f..1655eaee6 100644
--- a/pkg/detectors/ditto/ditto.go
+++ b/pkg/detectors/ditto/ditto.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Ditto,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/dnscheck/dnscheck.go b/pkg/detectors/dnscheck/dnscheck.go
index cc0aeff51..8c87fbf67 100644
--- a/pkg/detectors/dnscheck/dnscheck.go
+++ b/pkg/detectors/dnscheck/dnscheck.go
@@ -49,7 +49,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Dnscheck,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resIdMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "id": resIdMatch,
+ },
+ RawV2: []byte(resMatch + resIdMatch),
}
if verify {
diff --git a/pkg/detectors/docker/docker_auth_config.go b/pkg/detectors/docker/docker_auth_config.go
index d9b2afa4c..6a6fae1a3 100644
--- a/pkg/detectors/docker/docker_auth_config.go
+++ b/pkg/detectors/docker/docker_auth_config.go
@@ -116,8 +116,12 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
r := detectors.Result{
DetectorType: detector_typepb.DetectorType_Docker,
Raw: []byte(b64encoded),
- RawV2: []byte(`{"registry":"` + registry + `","auth":"` + b64encoded + `"}`),
- ExtraData: map[string]string{"Username": username},
+ SecretParts: map[string]string{
+ "registry": registry,
+ "auth": b64encoded,
+ },
+ RawV2: []byte(`{"registry":"` + registry + `","auth":"` + b64encoded + `"}`),
+ ExtraData: map[string]string{"Username": username},
}
if verify {
diff --git a/pkg/detectors/docparser/docparser.go b/pkg/detectors/docparser/docparser.go
index 34a859729..f8b1bc825 100644
--- a/pkg/detectors/docparser/docparser.go
+++ b/pkg/detectors/docparser/docparser.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Docparser,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/documo/documo.go b/pkg/detectors/documo/documo.go
index ca5d7aee5..461836511 100644
--- a/pkg/detectors/documo/documo.go
+++ b/pkg/detectors/documo/documo.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Documo,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/docusign/docusign.go b/pkg/detectors/docusign/docusign.go
index 68506108a..aacd1e061 100644
--- a/pkg/detectors/docusign/docusign.go
+++ b/pkg/detectors/docusign/docusign.go
@@ -56,8 +56,12 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Docusign,
Raw: []byte(resIDMatch),
- Redacted: resIDMatch,
- RawV2: []byte(resIDMatch + resSecretMatch),
+ SecretParts: map[string]string{
+ "id": resIDMatch,
+ "secret": resSecretMatch,
+ },
+ Redacted: resIDMatch,
+ RawV2: []byte(resIDMatch + resSecretMatch),
}
// Verify client id and secret pair by using an *undocumented* client_credentials grant type on the oauth2 endpoint.
diff --git a/pkg/detectors/doppler/doppler.go b/pkg/detectors/doppler/doppler.go
index 1b897114f..d711d846a 100644
--- a/pkg/detectors/doppler/doppler.go
+++ b/pkg/detectors/doppler/doppler.go
@@ -60,6 +60,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Doppler,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
ExtraData: map[string]string{},
}
diff --git a/pkg/detectors/dotdigital/dotdigital.go b/pkg/detectors/dotdigital/dotdigital.go
index fd91ca6a5..b6b5bcd03 100644
--- a/pkg/detectors/dotdigital/dotdigital.go
+++ b/pkg/detectors/dotdigital/dotdigital.go
@@ -61,7 +61,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Dotdigital,
Raw: []byte(email),
- RawV2: []byte(email + password),
+ SecretParts: map[string]string{
+ "email": email,
+ "password": password,
+ },
+ RawV2: []byte(email + password),
}
if verify {
diff --git a/pkg/detectors/dovico/dovico.go b/pkg/detectors/dovico/dovico.go
index 998fb465d..2c30b140b 100644
--- a/pkg/detectors/dovico/dovico.go
+++ b/pkg/detectors/dovico/dovico.go
@@ -65,7 +65,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Dovico,
Raw: []byte(key),
- RawV2: []byte(fmt.Sprintf("%s:%s", key, userKey)),
+ SecretParts: map[string]string{
+ "key": key,
+ "user_key": userKey,
+ },
+ RawV2: []byte(fmt.Sprintf("%s:%s", key, userKey)),
}
if verify {
diff --git a/pkg/detectors/dronahq/dronahq.go b/pkg/detectors/dronahq/dronahq.go
index ad41cada7..83d24f63d 100644
--- a/pkg/detectors/dronahq/dronahq.go
+++ b/pkg/detectors/dronahq/dronahq.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_DronaHQ,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/droneci/droneci.go b/pkg/detectors/droneci/droneci.go
index 88fb226be..e16609ad4 100644
--- a/pkg/detectors/droneci/droneci.go
+++ b/pkg/detectors/droneci/droneci.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_DroneCI,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/duply/duply.go b/pkg/detectors/duply/duply.go
index 404592c91..03a1574cd 100644
--- a/pkg/detectors/duply/duply.go
+++ b/pkg/detectors/duply/duply.go
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Duply,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/dwolla/dwolla.go b/pkg/detectors/dwolla/dwolla.go
index e7865b61e..9f32498d6 100644
--- a/pkg/detectors/dwolla/dwolla.go
+++ b/pkg/detectors/dwolla/dwolla.go
@@ -67,7 +67,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Dwolla,
Raw: []byte(id),
- RawV2: []byte(id + secret),
+ SecretParts: map[string]string{
+ "id": id,
+ "secret": secret,
+ },
+ RawV2: []byte(id + secret),
}
if verify {
diff --git a/pkg/detectors/dynalist/dynalist.go b/pkg/detectors/dynalist/dynalist.go
index 928aa3497..21d69765c 100644
--- a/pkg/detectors/dynalist/dynalist.go
+++ b/pkg/detectors/dynalist/dynalist.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Dynalist,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/dyspatch/dyspatch.go b/pkg/detectors/dyspatch/dyspatch.go
index f51496031..f4772b3d4 100644
--- a/pkg/detectors/dyspatch/dyspatch.go
+++ b/pkg/detectors/dyspatch/dyspatch.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Dyspatch,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/eagleeyenetworks/eagleeyenetworks.go b/pkg/detectors/eagleeyenetworks/eagleeyenetworks.go
index 321e2438b..af48b0415 100644
--- a/pkg/detectors/eagleeyenetworks/eagleeyenetworks.go
+++ b/pkg/detectors/eagleeyenetworks/eagleeyenetworks.go
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_EagleEyeNetworks,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/easyinsight/easyinsight.go b/pkg/detectors/easyinsight/easyinsight.go
index 8e48229c8..60cc0a224 100644
--- a/pkg/detectors/easyinsight/easyinsight.go
+++ b/pkg/detectors/easyinsight/easyinsight.go
@@ -60,7 +60,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_EasyInsight,
Raw: []byte(keyMatch),
- RawV2: []byte(keyMatch + idMatch),
+ SecretParts: map[string]string{
+ "key": keyMatch,
+ "id": idMatch,
+ },
+ RawV2: []byte(keyMatch + idMatch),
}
if verify {
diff --git a/pkg/detectors/ecostruxureit/ecostruxureit.go b/pkg/detectors/ecostruxureit/ecostruxureit.go
index b1ed412f8..24e143ce0 100644
--- a/pkg/detectors/ecostruxureit/ecostruxureit.go
+++ b/pkg/detectors/ecostruxureit/ecostruxureit.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_EcoStruxureIT,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/edamam/edamam.go b/pkg/detectors/edamam/edamam.go
index 89db3475a..afb6edceb 100644
--- a/pkg/detectors/edamam/edamam.go
+++ b/pkg/detectors/edamam/edamam.go
@@ -48,7 +48,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Edamam,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resId),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "id": resId,
+ },
+ RawV2: []byte(resMatch + resId),
}
if verify {
diff --git a/pkg/detectors/edenai/edenai.go b/pkg/detectors/edenai/edenai.go
index b7afce19b..d43d83ac0 100644
--- a/pkg/detectors/edenai/edenai.go
+++ b/pkg/detectors/edenai/edenai.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_EdenAI,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/eightxeight/eightxeight.go b/pkg/detectors/eightxeight/eightxeight.go
index cea44762f..6543a86e2 100644
--- a/pkg/detectors/eightxeight/eightxeight.go
+++ b/pkg/detectors/eightxeight/eightxeight.go
@@ -52,7 +52,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_EightxEight,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resIdMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "id": resIdMatch,
+ },
+ RawV2: []byte(resMatch + resIdMatch),
}
if verify {
diff --git a/pkg/detectors/elasticemail/elasticemail.go b/pkg/detectors/elasticemail/elasticemail.go
index f1bc69f6a..d49470b4f 100644
--- a/pkg/detectors/elasticemail/elasticemail.go
+++ b/pkg/detectors/elasticemail/elasticemail.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ElasticEmail,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/enablex/enablex.go b/pkg/detectors/enablex/enablex.go
index 6f28281aa..2fbf690c9 100644
--- a/pkg/detectors/enablex/enablex.go
+++ b/pkg/detectors/enablex/enablex.go
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Enablex,
Raw: []byte(tokenPatMatch),
+ SecretParts: map[string]string{"key": tokenPatMatch},
}
if verify {
diff --git a/pkg/detectors/endorlabs/endorlabs.go b/pkg/detectors/endorlabs/endorlabs.go
index ff9c0da1b..b2d4bfa29 100644
--- a/pkg/detectors/endorlabs/endorlabs.go
+++ b/pkg/detectors/endorlabs/endorlabs.go
@@ -56,7 +56,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_EndorLabs,
Raw: []byte(key),
- RawV2: []byte(key + secret),
+ SecretParts: map[string]string{
+ "key": key,
+ "secret": secret,
+ },
+ RawV2: []byte(key + secret),
}
if verify {
diff --git a/pkg/detectors/enigma/enigma.go b/pkg/detectors/enigma/enigma.go
index dc251d099..18df615e0 100644
--- a/pkg/detectors/enigma/enigma.go
+++ b/pkg/detectors/enigma/enigma.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Enigma,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/envoyapikey/envoyapikey.go b/pkg/detectors/envoyapikey/envoyapikey.go
index 1e0263e75..5ef0d8203 100644
--- a/pkg/detectors/envoyapikey/envoyapikey.go
+++ b/pkg/detectors/envoyapikey/envoyapikey.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_EnvoyApiKey,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/eraser/eraser.go b/pkg/detectors/eraser/eraser.go
index db7b16ecd..bd982f126 100644
--- a/pkg/detectors/eraser/eraser.go
+++ b/pkg/detectors/eraser/eraser.go
@@ -46,6 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Eraser,
Raw: []byte(match),
+ SecretParts: map[string]string{"key": match},
ExtraData: map[string]string{
"rotation_guide": "https://howtorotate.com/docs/tutorials/eraser/",
},
diff --git a/pkg/detectors/etherscan/etherscan.go b/pkg/detectors/etherscan/etherscan.go
index 91f613895..e46d2d99f 100644
--- a/pkg/detectors/etherscan/etherscan.go
+++ b/pkg/detectors/etherscan/etherscan.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Etherscan,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/ethplorer/ethplorer.go b/pkg/detectors/ethplorer/ethplorer.go
index e522dd18e..b113206a2 100644
--- a/pkg/detectors/ethplorer/ethplorer.go
+++ b/pkg/detectors/ethplorer/ethplorer.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Ethplorer,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/eventbrite/eventbrite.go b/pkg/detectors/eventbrite/eventbrite.go
index ffd5d4aaa..a392102ac 100644
--- a/pkg/detectors/eventbrite/eventbrite.go
+++ b/pkg/detectors/eventbrite/eventbrite.go
@@ -55,6 +55,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Eventbrite,
Raw: []byte(token),
+ SecretParts: map[string]string{"key": token},
ExtraData: map[string]string{},
}
diff --git a/pkg/detectors/everhour/everhour.go b/pkg/detectors/everhour/everhour.go
index 4ef57a8a4..c04ddb966 100644
--- a/pkg/detectors/everhour/everhour.go
+++ b/pkg/detectors/everhour/everhour.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Everhour,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/exchangerateapi/exchangerateapi.go b/pkg/detectors/exchangerateapi/exchangerateapi.go
index acbcf1502..49cbff530 100644
--- a/pkg/detectors/exchangerateapi/exchangerateapi.go
+++ b/pkg/detectors/exchangerateapi/exchangerateapi.go
@@ -52,6 +52,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ExchangeRateAPI,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/exchangeratesapi/exchangeratesapi.go b/pkg/detectors/exchangeratesapi/exchangeratesapi.go
index cc1570ecc..20c600312 100644
--- a/pkg/detectors/exchangeratesapi/exchangeratesapi.go
+++ b/pkg/detectors/exchangeratesapi/exchangeratesapi.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ExchangeRatesAPI,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/exportsdk/exportsdk.go b/pkg/detectors/exportsdk/exportsdk.go
index 494c6e69b..aaf81e8e5 100644
--- a/pkg/detectors/exportsdk/exportsdk.go
+++ b/pkg/detectors/exportsdk/exportsdk.go
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ExportSDK,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/extractorapi/extractorapi.go b/pkg/detectors/extractorapi/extractorapi.go
index a49b05472..6bd17a1e2 100644
--- a/pkg/detectors/extractorapi/extractorapi.go
+++ b/pkg/detectors/extractorapi/extractorapi.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ExtractorAPI,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/facebookoauth/facebookoauth.go b/pkg/detectors/facebookoauth/facebookoauth.go
index c59901d90..1793b59be 100644
--- a/pkg/detectors/facebookoauth/facebookoauth.go
+++ b/pkg/detectors/facebookoauth/facebookoauth.go
@@ -51,7 +51,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
DetectorType: detector_typepb.DetectorType_FacebookOAuth,
Redacted: apiIdRes,
Raw: []byte(apiSecretRes),
- RawV2: []byte(apiIdRes + apiSecretRes),
+ SecretParts: map[string]string{
+ "id": apiIdRes,
+ "secret": apiSecretRes,
+ },
+ RawV2: []byte(apiIdRes + apiSecretRes),
}
if verify {
diff --git a/pkg/detectors/faceplusplus/faceplusplus.go b/pkg/detectors/faceplusplus/faceplusplus.go
index 49112ade0..4a771336a 100644
--- a/pkg/detectors/faceplusplus/faceplusplus.go
+++ b/pkg/detectors/faceplusplus/faceplusplus.go
@@ -49,7 +49,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_FacePlusPlus,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resSecret),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "secret": resSecret,
+ },
+ RawV2: []byte(resMatch + resSecret),
}
if verify {
diff --git a/pkg/detectors/fastforex/fastforex.go b/pkg/detectors/fastforex/fastforex.go
index c677c0202..88ebaf8ae 100644
--- a/pkg/detectors/fastforex/fastforex.go
+++ b/pkg/detectors/fastforex/fastforex.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_FastForex,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/feedier/feedier.go b/pkg/detectors/feedier/feedier.go
index 7541249c8..3c066449f 100644
--- a/pkg/detectors/feedier/feedier.go
+++ b/pkg/detectors/feedier/feedier.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Feedier,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/fetchrss/fetchrss.go b/pkg/detectors/fetchrss/fetchrss.go
index c6a832e22..9f2dc0993 100644
--- a/pkg/detectors/fetchrss/fetchrss.go
+++ b/pkg/detectors/fetchrss/fetchrss.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Fetchrss,
Raw: []byte(token),
+ SecretParts: map[string]string{"key": token},
}
if verify {
diff --git a/pkg/detectors/fibery/fibery.go b/pkg/detectors/fibery/fibery.go
index 9dbb3d9ab..d333360ac 100644
--- a/pkg/detectors/fibery/fibery.go
+++ b/pkg/detectors/fibery/fibery.go
@@ -66,6 +66,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Fibery,
Raw: []byte(secret),
+ SecretParts: map[string]string{"key": secret},
}
if verify {
diff --git a/pkg/detectors/fileio/fileio.go b/pkg/detectors/fileio/fileio.go
index 81e0ff744..8b6ec9c86 100644
--- a/pkg/detectors/fileio/fileio.go
+++ b/pkg/detectors/fileio/fileio.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_FileIO,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/finage/finage.go b/pkg/detectors/finage/finage.go
index b29f86787..067a4bd42 100644
--- a/pkg/detectors/finage/finage.go
+++ b/pkg/detectors/finage/finage.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Finage,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/financialmodelingprep/financialmodelingprep.go b/pkg/detectors/financialmodelingprep/financialmodelingprep.go
index 79f82aed1..e0309dcd9 100644
--- a/pkg/detectors/financialmodelingprep/financialmodelingprep.go
+++ b/pkg/detectors/financialmodelingprep/financialmodelingprep.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_FinancialModelingPrep,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/findl/findl.go b/pkg/detectors/findl/findl.go
index fd4096098..657b5e09f 100644
--- a/pkg/detectors/findl/findl.go
+++ b/pkg/detectors/findl/findl.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Findl,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/finnhub/finnhub.go b/pkg/detectors/finnhub/finnhub.go
index 26ea806fe..a8014d7db 100644
--- a/pkg/detectors/finnhub/finnhub.go
+++ b/pkg/detectors/finnhub/finnhub.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Finnhub,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/fixerio/fixerio.go b/pkg/detectors/fixerio/fixerio.go
index 1bb58ab22..d499c6d0a 100644
--- a/pkg/detectors/fixerio/fixerio.go
+++ b/pkg/detectors/fixerio/fixerio.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_FixerIO,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/flatio/flatio.go b/pkg/detectors/flatio/flatio.go
index 1f2dec6d9..7af1ce365 100644
--- a/pkg/detectors/flatio/flatio.go
+++ b/pkg/detectors/flatio/flatio.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_FlatIO,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/fleetbase/fleetbase.go b/pkg/detectors/fleetbase/fleetbase.go
index ce3b005ba..a00efc3d1 100644
--- a/pkg/detectors/fleetbase/fleetbase.go
+++ b/pkg/detectors/fleetbase/fleetbase.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Fleetbase,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/flexport/flexport.go b/pkg/detectors/flexport/flexport.go
index 153889331..b9bff7a50 100644
--- a/pkg/detectors/flexport/flexport.go
+++ b/pkg/detectors/flexport/flexport.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Flexport,
Raw: []byte(match),
+ SecretParts: map[string]string{"key": match},
ExtraData: map[string]string{
"rotation_guide": "https://howtorotate.com/docs/tutorials/flexport/",
},
diff --git a/pkg/detectors/flickr/flickr.go b/pkg/detectors/flickr/flickr.go
index 1efe2a8af..f01c00892 100644
--- a/pkg/detectors/flickr/flickr.go
+++ b/pkg/detectors/flickr/flickr.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Flickr,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/flightapi/flightapi.go b/pkg/detectors/flightapi/flightapi.go
index 2656268a6..2d480caf7 100644
--- a/pkg/detectors/flightapi/flightapi.go
+++ b/pkg/detectors/flightapi/flightapi.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_FlightApi,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/flightlabs/flightlabs.go b/pkg/detectors/flightlabs/flightlabs.go
index 0103f4411..be73a4173 100644
--- a/pkg/detectors/flightlabs/flightlabs.go
+++ b/pkg/detectors/flightlabs/flightlabs.go
@@ -55,6 +55,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_FlightLabs,
Raw: []byte(key),
+ SecretParts: map[string]string{"key": key},
}
if verify {
diff --git a/pkg/detectors/flightstats/flightstats.go b/pkg/detectors/flightstats/flightstats.go
index a2e1fcf3d..b2aace0b2 100644
--- a/pkg/detectors/flightstats/flightstats.go
+++ b/pkg/detectors/flightstats/flightstats.go
@@ -51,6 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Flightstats,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/float/float.go b/pkg/detectors/float/float.go
index 6444f2b9b..186825f6c 100644
--- a/pkg/detectors/float/float.go
+++ b/pkg/detectors/float/float.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Float,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/flowflu/flowflu.go b/pkg/detectors/flowflu/flowflu.go
index 5c1d8ffef..95acf15e3 100644
--- a/pkg/detectors/flowflu/flowflu.go
+++ b/pkg/detectors/flowflu/flowflu.go
@@ -52,6 +52,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_FlowFlu,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/flutterwave/flutterwave.go b/pkg/detectors/flutterwave/flutterwave.go
index b027f3ea6..5f5bf3d34 100644
--- a/pkg/detectors/flutterwave/flutterwave.go
+++ b/pkg/detectors/flutterwave/flutterwave.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Flutterwave,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/flyio/flyio.go b/pkg/detectors/flyio/flyio.go
index cc8397b3c..1f411b07c 100644
--- a/pkg/detectors/flyio/flyio.go
+++ b/pkg/detectors/flyio/flyio.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_FlyIO,
Raw: []byte(match),
+ SecretParts: map[string]string{"key": match},
}
if verify {
diff --git a/pkg/detectors/fmfw/fmfw.go b/pkg/detectors/fmfw/fmfw.go
index 517f6fbbe..92266ba39 100644
--- a/pkg/detectors/fmfw/fmfw.go
+++ b/pkg/detectors/fmfw/fmfw.go
@@ -51,6 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Fmfw,
Raw: []byte(tokenPatMatch),
+ SecretParts: map[string]string{"key": tokenPatMatch},
}
if verify {
diff --git a/pkg/detectors/formbucket/formbucket.go b/pkg/detectors/formbucket/formbucket.go
index 9f786548d..3f7cd8942 100644
--- a/pkg/detectors/formbucket/formbucket.go
+++ b/pkg/detectors/formbucket/formbucket.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_FormBucket,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/formcraft/formcraft.go b/pkg/detectors/formcraft/formcraft.go
index 8120ba567..3590fa0ac 100644
--- a/pkg/detectors/formcraft/formcraft.go
+++ b/pkg/detectors/formcraft/formcraft.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Formcraft,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/formio/formio.go b/pkg/detectors/formio/formio.go
index 02fea0738..53f3088a3 100644
--- a/pkg/detectors/formio/formio.go
+++ b/pkg/detectors/formio/formio.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_FormIO,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/formsite/formsite.go b/pkg/detectors/formsite/formsite.go
index 874578d8e..2373d4839 100644
--- a/pkg/detectors/formsite/formsite.go
+++ b/pkg/detectors/formsite/formsite.go
@@ -52,6 +52,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Formsite,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/foursquare/foursquare.go b/pkg/detectors/foursquare/foursquare.go
index dec97151b..c42a862cd 100644
--- a/pkg/detectors/foursquare/foursquare.go
+++ b/pkg/detectors/foursquare/foursquare.go
@@ -48,7 +48,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_FourSquare,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resSecret),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "secret": resSecret,
+ },
+ RawV2: []byte(resMatch + resSecret),
}
if verify {
diff --git a/pkg/detectors/frameio/frameio.go b/pkg/detectors/frameio/frameio.go
index 15f1b106e..a6f869019 100644
--- a/pkg/detectors/frameio/frameio.go
+++ b/pkg/detectors/frameio/frameio.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_FrameIO,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/freshbooks/freshbooks.go b/pkg/detectors/freshbooks/freshbooks.go
index 6d1d8f5fe..d3c2385f2 100644
--- a/pkg/detectors/freshbooks/freshbooks.go
+++ b/pkg/detectors/freshbooks/freshbooks.go
@@ -49,6 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Freshbooks,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/freshdesk/freshdesk.go b/pkg/detectors/freshdesk/freshdesk.go
index 4f8a68efb..0631aeda4 100644
--- a/pkg/detectors/freshdesk/freshdesk.go
+++ b/pkg/detectors/freshdesk/freshdesk.go
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Freshdesk,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/front/front.go b/pkg/detectors/front/front.go
index 29ad86fd7..e6a50b0f9 100644
--- a/pkg/detectors/front/front.go
+++ b/pkg/detectors/front/front.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Front,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/ftp/ftp.go b/pkg/detectors/ftp/ftp.go
index a78bf39a0..16ad41dcc 100644
--- a/pkg/detectors/ftp/ftp.go
+++ b/pkg/detectors/ftp/ftp.go
@@ -75,6 +75,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_FTP,
Raw: []byte(rawURL.String()),
+ SecretParts: map[string]string{"key": rawURL.String()},
Redacted: redact,
}
diff --git a/pkg/detectors/fulcrum/fulcrum.go b/pkg/detectors/fulcrum/fulcrum.go
index 23b13fe74..57113c605 100644
--- a/pkg/detectors/fulcrum/fulcrum.go
+++ b/pkg/detectors/fulcrum/fulcrum.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Fulcrum,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/fullstory/v1/fullstory.go b/pkg/detectors/fullstory/v1/fullstory.go
index 3d2ca9602..15cdce5ea 100644
--- a/pkg/detectors/fullstory/v1/fullstory.go
+++ b/pkg/detectors/fullstory/v1/fullstory.go
@@ -46,6 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Fullstory,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
ExtraData: map[string]string{
"version": fmt.Sprintf("%d", s.Version()),
},
diff --git a/pkg/detectors/fullstory/v2/fullstory_v2.go b/pkg/detectors/fullstory/v2/fullstory_v2.go
index e9add6cf5..1918ad6a3 100644
--- a/pkg/detectors/fullstory/v2/fullstory_v2.go
+++ b/pkg/detectors/fullstory/v2/fullstory_v2.go
@@ -46,6 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Fullstory,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
ExtraData: map[string]string{
"version": fmt.Sprintf("%d", s.Version()),
},
diff --git a/pkg/detectors/fxmarket/fxmarket.go b/pkg/detectors/fxmarket/fxmarket.go
index 9f2b528db..cbadf5bc4 100644
--- a/pkg/detectors/fxmarket/fxmarket.go
+++ b/pkg/detectors/fxmarket/fxmarket.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_FXMarket,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/gcpapplicationdefaultcredentials/gcpapplicationdefaultcredentials.go b/pkg/detectors/gcpapplicationdefaultcredentials/gcpapplicationdefaultcredentials.go
index dcb466de1..6ab4c93c5 100644
--- a/pkg/detectors/gcpapplicationdefaultcredentials/gcpapplicationdefaultcredentials.go
+++ b/pkg/detectors/gcpapplicationdefaultcredentials/gcpapplicationdefaultcredentials.go
@@ -78,7 +78,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_GCPApplicationDefaultCredentials,
Raw: []byte(detectedClientID),
- RawV2: []byte(detectedClientID + creds.RefreshToken),
+ SecretParts: map[string]string{
+ "client_id": detectedClientID,
+ "refresh_token": creds.RefreshToken,
+ },
+ RawV2: []byte(detectedClientID + creds.RefreshToken),
}
if len(creds.RefreshToken) > 3 {
diff --git a/pkg/detectors/geckoboard/geckoboard.go b/pkg/detectors/geckoboard/geckoboard.go
index dbb35635d..4bd76c802 100644
--- a/pkg/detectors/geckoboard/geckoboard.go
+++ b/pkg/detectors/geckoboard/geckoboard.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Geckoboard,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/gemini/gemini.go b/pkg/detectors/gemini/gemini.go
index 372e2c566..283723d5b 100644
--- a/pkg/detectors/gemini/gemini.go
+++ b/pkg/detectors/gemini/gemini.go
@@ -62,7 +62,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Gemini,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resSecretMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "secret": resSecretMatch,
+ },
+ RawV2: []byte(resMatch + resSecretMatch),
}
if verify {
diff --git a/pkg/detectors/generic/generic.go b/pkg/detectors/generic/generic.go
index 265f21542..730b43a9d 100644
--- a/pkg/detectors/generic/generic.go
+++ b/pkg/detectors/generic/generic.go
@@ -93,6 +93,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s := detectors.Result{
DetectorType: detector_typepb.DetectorType_Generic,
Raw: []byte(token),
+ SecretParts: map[string]string{"key": token},
}
results = append(results, s)
diff --git a/pkg/detectors/gengo/gengo.go b/pkg/detectors/gengo/gengo.go
index f3073e84e..d1aa53b5c 100644
--- a/pkg/detectors/gengo/gengo.go
+++ b/pkg/detectors/gengo/gengo.go
@@ -58,7 +58,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Gengo,
Raw: []byte(resSecretMatch),
- RawV2: []byte(resMatch + resSecretMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "secret": resSecretMatch,
+ },
+ RawV2: []byte(resMatch + resSecretMatch),
}
if verify {
diff --git a/pkg/detectors/geoapify/geoapify.go b/pkg/detectors/geoapify/geoapify.go
index 52cffb23c..09d6739e0 100644
--- a/pkg/detectors/geoapify/geoapify.go
+++ b/pkg/detectors/geoapify/geoapify.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Geoapify,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/geocode/geocode.go b/pkg/detectors/geocode/geocode.go
index 1c3b988dc..c2160584f 100644
--- a/pkg/detectors/geocode/geocode.go
+++ b/pkg/detectors/geocode/geocode.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Geocode,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/geocodify/geocodify.go b/pkg/detectors/geocodify/geocodify.go
index 68d399be7..9a592a76f 100644
--- a/pkg/detectors/geocodify/geocodify.go
+++ b/pkg/detectors/geocodify/geocodify.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Geocodify,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/geocodio/geocodio.go b/pkg/detectors/geocodio/geocodio.go
index d1360096e..c9ced6834 100644
--- a/pkg/detectors/geocodio/geocodio.go
+++ b/pkg/detectors/geocodio/geocodio.go
@@ -49,7 +49,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Geocodio,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resSearchMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "search_engine": resSearchMatch,
+ },
+ RawV2: []byte(resMatch + resSearchMatch),
}
if verify {
diff --git a/pkg/detectors/geoipifi/geoipifi.go b/pkg/detectors/geoipifi/geoipifi.go
index 2617715fe..7547362ae 100644
--- a/pkg/detectors/geoipifi/geoipifi.go
+++ b/pkg/detectors/geoipifi/geoipifi.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_GeoIpifi,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/getemail/getemail.go b/pkg/detectors/getemail/getemail.go
index 3ee224365..deab794a3 100644
--- a/pkg/detectors/getemail/getemail.go
+++ b/pkg/detectors/getemail/getemail.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_GetEmail,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/getemails/getemails.go b/pkg/detectors/getemails/getemails.go
index 8077f5fb4..a509ff0f2 100644
--- a/pkg/detectors/getemails/getemails.go
+++ b/pkg/detectors/getemails/getemails.go
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_GetEmails,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/getgeoapi/getgeoapi.go b/pkg/detectors/getgeoapi/getgeoapi.go
index 528f864c0..bff3e7c36 100644
--- a/pkg/detectors/getgeoapi/getgeoapi.go
+++ b/pkg/detectors/getgeoapi/getgeoapi.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_GetGeoAPI,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/getgist/getgist.go b/pkg/detectors/getgist/getgist.go
index b4567c373..87fbb1343 100644
--- a/pkg/detectors/getgist/getgist.go
+++ b/pkg/detectors/getgist/getgist.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Getgist,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/getresponse/getresponse.go b/pkg/detectors/getresponse/getresponse.go
index 49c0a1a1e..7b02af941 100644
--- a/pkg/detectors/getresponse/getresponse.go
+++ b/pkg/detectors/getresponse/getresponse.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Getresponse,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/getsandbox/getsandbox.go b/pkg/detectors/getsandbox/getsandbox.go
index a63d2086e..248be740f 100644
--- a/pkg/detectors/getsandbox/getsandbox.go
+++ b/pkg/detectors/getsandbox/getsandbox.go
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_GetSandbox,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/github_oauth2/github_oauth2.go b/pkg/detectors/github_oauth2/github_oauth2.go
index 192ac757a..a62376b2d 100644
--- a/pkg/detectors/github_oauth2/github_oauth2.go
+++ b/pkg/detectors/github_oauth2/github_oauth2.go
@@ -49,7 +49,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_GitHubOauth2,
Raw: []byte(idMatch[1]),
- RawV2: []byte(idMatch[1] + secretMatch[1]),
+ SecretParts: map[string]string{
+ "id": idMatch[1],
+ "secret": secretMatch[1],
+ },
+ RawV2: []byte(idMatch[1] + secretMatch[1]),
}
s1.ExtraData = map[string]string{
"rotation_guide": "https://howtorotate.com/docs/tutorials/github/",
diff --git a/pkg/detectors/githubapp/githubapp.go b/pkg/detectors/githubapp/githubapp.go
index 36d36476a..25f82b0b1 100644
--- a/pkg/detectors/githubapp/githubapp.go
+++ b/pkg/detectors/githubapp/githubapp.go
@@ -51,6 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_GitHubApp,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
s1.ExtraData = map[string]string{
"rotation_guide": "https://howtorotate.com/docs/tutorials/github/",
diff --git a/pkg/detectors/gitter/gitter.go b/pkg/detectors/gitter/gitter.go
index fde48c3e5..cd8253186 100644
--- a/pkg/detectors/gitter/gitter.go
+++ b/pkg/detectors/gitter/gitter.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Gitter,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/glassnode/glassnode.go b/pkg/detectors/glassnode/glassnode.go
index 1a7d24200..4b08a50d4 100644
--- a/pkg/detectors/glassnode/glassnode.go
+++ b/pkg/detectors/glassnode/glassnode.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Glassnode,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/gocanvas/gocanvas.go b/pkg/detectors/gocanvas/gocanvas.go
index 5c4baa223..0fbfeb62c 100644
--- a/pkg/detectors/gocanvas/gocanvas.go
+++ b/pkg/detectors/gocanvas/gocanvas.go
@@ -55,6 +55,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_GoCanvas,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/gocardless/gocardless.go b/pkg/detectors/gocardless/gocardless.go
index 7d4833ede..8bc90a8eb 100644
--- a/pkg/detectors/gocardless/gocardless.go
+++ b/pkg/detectors/gocardless/gocardless.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_GoCardless,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/godaddy/v1/godaddy.go b/pkg/detectors/godaddy/v1/godaddy.go
index b25c36d67..e8bf9fbf8 100644
--- a/pkg/detectors/godaddy/v1/godaddy.go
+++ b/pkg/detectors/godaddy/v1/godaddy.go
@@ -79,6 +79,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
result := detectors.Result{
DetectorType: detector_typepb.DetectorType_GoDaddy,
Raw: []byte(key),
+ SecretParts: map[string]string{"key": key},
ExtraData: make(map[string]string),
}
diff --git a/pkg/detectors/godaddy/v2/godaddy.go b/pkg/detectors/godaddy/v2/godaddy.go
index 7800600dc..bd4cf62cb 100644
--- a/pkg/detectors/godaddy/v2/godaddy.go
+++ b/pkg/detectors/godaddy/v2/godaddy.go
@@ -78,6 +78,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
result := detectors.Result{
DetectorType: detector_typepb.DetectorType_GoDaddy,
Raw: []byte(key),
+ SecretParts: map[string]string{"key": key},
ExtraData: make(map[string]string),
}
diff --git a/pkg/detectors/goodday/goodday.go b/pkg/detectors/goodday/goodday.go
index 68224e800..11aff376b 100644
--- a/pkg/detectors/goodday/goodday.go
+++ b/pkg/detectors/goodday/goodday.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_GoodDay,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/googlegemini/googlegemini.go b/pkg/detectors/googlegemini/googlegemini.go
index 483d522f5..ac5bae35e 100644
--- a/pkg/detectors/googlegemini/googlegemini.go
+++ b/pkg/detectors/googlegemini/googlegemini.go
@@ -57,6 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: s.Type(),
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
Redacted: resMatch[:8] + "...",
}
diff --git a/pkg/detectors/googleoauth2/googleoauth2_access_token.go b/pkg/detectors/googleoauth2/googleoauth2_access_token.go
index 1975836d5..2939e7540 100644
--- a/pkg/detectors/googleoauth2/googleoauth2_access_token.go
+++ b/pkg/detectors/googleoauth2/googleoauth2_access_token.go
@@ -53,6 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: s.Type(),
Raw: []byte(token),
+ SecretParts: map[string]string{"key": token},
}
if verify {
diff --git a/pkg/detectors/grafana/grafana.go b/pkg/detectors/grafana/grafana.go
index c1d06652c..3a43bd801 100644
--- a/pkg/detectors/grafana/grafana.go
+++ b/pkg/detectors/grafana/grafana.go
@@ -54,6 +54,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Grafana,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/grafanaserviceaccount/grafanaserviceaccount.go b/pkg/detectors/grafanaserviceaccount/grafanaserviceaccount.go
index 0dc4b04c6..a98e7b8fc 100644
--- a/pkg/detectors/grafanaserviceaccount/grafanaserviceaccount.go
+++ b/pkg/detectors/grafanaserviceaccount/grafanaserviceaccount.go
@@ -49,7 +49,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_GrafanaServiceAccount,
Raw: []byte(key),
- RawV2: []byte(fmt.Sprintf("%s:%s", domainRes, key)),
+ SecretParts: map[string]string{
+ "domain": domainRes,
+ "key": key,
+ },
+ RawV2: []byte(fmt.Sprintf("%s:%s", domainRes, key)),
}
if verify {
diff --git a/pkg/detectors/graphcms/graphcms.go b/pkg/detectors/graphcms/graphcms.go
index 9220db102..73c843cf5 100644
--- a/pkg/detectors/graphcms/graphcms.go
+++ b/pkg/detectors/graphcms/graphcms.go
@@ -51,6 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_GraphCMS,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/graphhopper/graphhopper.go b/pkg/detectors/graphhopper/graphhopper.go
index 3ceb954cd..00a7022ae 100644
--- a/pkg/detectors/graphhopper/graphhopper.go
+++ b/pkg/detectors/graphhopper/graphhopper.go
@@ -40,6 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Graphhopper,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://graphhopper.com/api/1/geocode?q=Philippines&key=%s&type=json", resMatch), nil)
diff --git a/pkg/detectors/groovehq/groovehq.go b/pkg/detectors/groovehq/groovehq.go
index e931ac306..bcb8ebb5a 100644
--- a/pkg/detectors/groovehq/groovehq.go
+++ b/pkg/detectors/groovehq/groovehq.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Groovehq,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/gtmetrix/gtmetrix.go b/pkg/detectors/gtmetrix/gtmetrix.go
index 9eeb2370c..6d989a72e 100644
--- a/pkg/detectors/gtmetrix/gtmetrix.go
+++ b/pkg/detectors/gtmetrix/gtmetrix.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_GTMetrix,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/guardianapi/guardianapi.go b/pkg/detectors/guardianapi/guardianapi.go
index 8df261332..07ee12bd2 100644
--- a/pkg/detectors/guardianapi/guardianapi.go
+++ b/pkg/detectors/guardianapi/guardianapi.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Guardianapi,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/gumroad/gumroad.go b/pkg/detectors/gumroad/gumroad.go
index 7a7f3d7cc..86cc11361 100644
--- a/pkg/detectors/gumroad/gumroad.go
+++ b/pkg/detectors/gumroad/gumroad.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Gumroad,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
payload := strings.NewReader("access_token=" + resMatch)
if verify {
diff --git a/pkg/detectors/guru/guru.go b/pkg/detectors/guru/guru.go
index cf6451f6d..b0e564f91 100644
--- a/pkg/detectors/guru/guru.go
+++ b/pkg/detectors/guru/guru.go
@@ -53,6 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Guru,
Raw: []byte(unameMatch),
+ SecretParts: map[string]string{"key": unameMatch},
}
if verify {
diff --git a/pkg/detectors/gyazo/gyazo.go b/pkg/detectors/gyazo/gyazo.go
index ffba415b9..02cb9825d 100644
--- a/pkg/detectors/gyazo/gyazo.go
+++ b/pkg/detectors/gyazo/gyazo.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Gyazo,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/happyscribe/happyscribe.go b/pkg/detectors/happyscribe/happyscribe.go
index ed92139dd..a86cefe9f 100644
--- a/pkg/detectors/happyscribe/happyscribe.go
+++ b/pkg/detectors/happyscribe/happyscribe.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Happyscribe,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/harvest/harvest.go b/pkg/detectors/harvest/harvest.go
index a5d7dbd4b..7f4aabc1e 100644
--- a/pkg/detectors/harvest/harvest.go
+++ b/pkg/detectors/harvest/harvest.go
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Harvest,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/hashicorpvaultauth/hashicorpvaultauth.go b/pkg/detectors/hashicorpvaultauth/hashicorpvaultauth.go
index 4f2a3b124..26057a7bb 100644
--- a/pkg/detectors/hashicorpvaultauth/hashicorpvaultauth.go
+++ b/pkg/detectors/hashicorpvaultauth/hashicorpvaultauth.go
@@ -84,7 +84,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_HashiCorpVaultAuth,
Raw: []byte(secretId),
- RawV2: []byte(fmt.Sprintf("%s:%s", roleId, secretId)),
+ SecretParts: map[string]string{
+ "role_id": roleId,
+ "secret_id": secretId,
+ },
+ RawV2: []byte(fmt.Sprintf("%s:%s", roleId, secretId)),
ExtraData: map[string]string{
"URL": vaultUrl,
},
diff --git a/pkg/detectors/hasura/hasura.go b/pkg/detectors/hasura/hasura.go
index 6bdf21547..0756442e3 100644
--- a/pkg/detectors/hasura/hasura.go
+++ b/pkg/detectors/hasura/hasura.go
@@ -65,7 +65,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Hasura,
Raw: []byte(key),
- RawV2: fmt.Appendf([]byte(""), "%s:%s", domain, key),
+ SecretParts: map[string]string{
+ "domain": domain,
+ "key": key,
+ },
+ RawV2: fmt.Appendf([]byte(""), "%s:%s", domain, key),
}
if verify {
diff --git a/pkg/detectors/hellosign/hellosign.go b/pkg/detectors/hellosign/hellosign.go
index abde24144..668ba59ad 100644
--- a/pkg/detectors/hellosign/hellosign.go
+++ b/pkg/detectors/hellosign/hellosign.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_HelloSign,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/helpcrunch/helpcrunch.go b/pkg/detectors/helpcrunch/helpcrunch.go
index c0ed2e48c..4c2a0ae9f 100644
--- a/pkg/detectors/helpcrunch/helpcrunch.go
+++ b/pkg/detectors/helpcrunch/helpcrunch.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_HelpCrunch,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/helpscout/helpscout.go b/pkg/detectors/helpscout/helpscout.go
index 551b86234..b258c69fa 100644
--- a/pkg/detectors/helpscout/helpscout.go
+++ b/pkg/detectors/helpscout/helpscout.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Helpscout,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/hereapi/hereapi.go b/pkg/detectors/hereapi/hereapi.go
index 64459a990..5e2decbbb 100644
--- a/pkg/detectors/hereapi/hereapi.go
+++ b/pkg/detectors/hereapi/hereapi.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_HereAPI,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/heroku/v1/heroku.go b/pkg/detectors/heroku/v1/heroku.go
index 4693354fc..4111168ee 100644
--- a/pkg/detectors/heroku/v1/heroku.go
+++ b/pkg/detectors/heroku/v1/heroku.go
@@ -49,6 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Heroku,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/heroku/v2/heroku.go b/pkg/detectors/heroku/v2/heroku.go
index 097392e62..c6f1fd2c7 100644
--- a/pkg/detectors/heroku/v2/heroku.go
+++ b/pkg/detectors/heroku/v2/heroku.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Heroku,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/hive/hive.go b/pkg/detectors/hive/hive.go
index 3f72f2305..fd959d5d7 100644
--- a/pkg/detectors/hive/hive.go
+++ b/pkg/detectors/hive/hive.go
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Hive,
Raw: []byte(idMatch),
+ SecretParts: map[string]string{"key": idMatch},
}
if verify {
diff --git a/pkg/detectors/hiveage/hiveage.go b/pkg/detectors/hiveage/hiveage.go
index 3f80eb976..00db0ad9b 100644
--- a/pkg/detectors/hiveage/hiveage.go
+++ b/pkg/detectors/hiveage/hiveage.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Hiveage,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/holidayapi/holidayapi.go b/pkg/detectors/holidayapi/holidayapi.go
index c5add356b..e27734e5b 100644
--- a/pkg/detectors/holidayapi/holidayapi.go
+++ b/pkg/detectors/holidayapi/holidayapi.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_HolidayAPI,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/holistic/holistic.go b/pkg/detectors/holistic/holistic.go
index 8ee7e2c54..713e01362 100644
--- a/pkg/detectors/holistic/holistic.go
+++ b/pkg/detectors/holistic/holistic.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Holistic,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/honeycomb/honeycomb.go b/pkg/detectors/honeycomb/honeycomb.go
index 49070e479..d9b8fe7c9 100644
--- a/pkg/detectors/honeycomb/honeycomb.go
+++ b/pkg/detectors/honeycomb/honeycomb.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Honeycomb,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/host/host.go b/pkg/detectors/host/host.go
index e3a2e4c90..b95ef6713 100644
--- a/pkg/detectors/host/host.go
+++ b/pkg/detectors/host/host.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Host,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/html2pdf/html2pdf.go b/pkg/detectors/html2pdf/html2pdf.go
index de6c9961b..43a33952e 100644
--- a/pkg/detectors/html2pdf/html2pdf.go
+++ b/pkg/detectors/html2pdf/html2pdf.go
@@ -46,6 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Html2Pdf,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/hubspot_apikey/v1/apikey.go b/pkg/detectors/hubspot_apikey/v1/apikey.go
index 9e84e3506..aceaab27c 100644
--- a/pkg/detectors/hubspot_apikey/v1/apikey.go
+++ b/pkg/detectors/hubspot_apikey/v1/apikey.go
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_HubSpotApiKey,
Raw: []byte(token),
+ SecretParts: map[string]string{"key": token},
}
if verify {
diff --git a/pkg/detectors/hubspot_apikey/v2/apikey.go b/pkg/detectors/hubspot_apikey/v2/apikey.go
index abee414db..7be2fe1a7 100644
--- a/pkg/detectors/hubspot_apikey/v2/apikey.go
+++ b/pkg/detectors/hubspot_apikey/v2/apikey.go
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_HubSpotApiKey,
Raw: []byte(token),
+ SecretParts: map[string]string{"key": token},
Redacted: token[8:] + "...",
}
diff --git a/pkg/detectors/humanity/humanity.go b/pkg/detectors/humanity/humanity.go
index 0353c8fee..f6247843a 100644
--- a/pkg/detectors/humanity/humanity.go
+++ b/pkg/detectors/humanity/humanity.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Humanity,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/hunter/hunter.go b/pkg/detectors/hunter/hunter.go
index f65156633..246d94fdc 100644
--- a/pkg/detectors/hunter/hunter.go
+++ b/pkg/detectors/hunter/hunter.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Hunter,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/hybiscus/hybiscus.go b/pkg/detectors/hybiscus/hybiscus.go
index aadc2f612..d39e970eb 100644
--- a/pkg/detectors/hybiscus/hybiscus.go
+++ b/pkg/detectors/hybiscus/hybiscus.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Hybiscus,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/hypertrack/hypertrack.go b/pkg/detectors/hypertrack/hypertrack.go
index d62844baf..ab18081fa 100644
--- a/pkg/detectors/hypertrack/hypertrack.go
+++ b/pkg/detectors/hypertrack/hypertrack.go
@@ -49,6 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Hypertrack,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/ibmclouduserkey/ibmclouduserkey.go b/pkg/detectors/ibmclouduserkey/ibmclouduserkey.go
index cc5dcf42b..6367b6061 100644
--- a/pkg/detectors/ibmclouduserkey/ibmclouduserkey.go
+++ b/pkg/detectors/ibmclouduserkey/ibmclouduserkey.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_IbmCloudUserKey,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/iconfinder/iconfinder.go b/pkg/detectors/iconfinder/iconfinder.go
index d4b07d834..d9fd8627b 100644
--- a/pkg/detectors/iconfinder/iconfinder.go
+++ b/pkg/detectors/iconfinder/iconfinder.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_IconFinder,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/iexapis/iexapis.go b/pkg/detectors/iexapis/iexapis.go
index dd117712b..0733fecab 100644
--- a/pkg/detectors/iexapis/iexapis.go
+++ b/pkg/detectors/iexapis/iexapis.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Iexapis,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/iexcloud/iexcloud.go b/pkg/detectors/iexcloud/iexcloud.go
index 129bdfab0..780f3c6fb 100644
--- a/pkg/detectors/iexcloud/iexcloud.go
+++ b/pkg/detectors/iexcloud/iexcloud.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Iexcloud,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/imagekit/imagekit.go b/pkg/detectors/imagekit/imagekit.go
index a22a01121..78899e66b 100644
--- a/pkg/detectors/imagekit/imagekit.go
+++ b/pkg/detectors/imagekit/imagekit.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Imagekit,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
req, err := http.NewRequestWithContext(ctx, "GET", "https://api.imagekit.io/v1/files", nil)
diff --git a/pkg/detectors/imagga/imagga.go b/pkg/detectors/imagga/imagga.go
index fea834041..b04d11f4b 100644
--- a/pkg/detectors/imagga/imagga.go
+++ b/pkg/detectors/imagga/imagga.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Imagga,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/impala/impala.go b/pkg/detectors/impala/impala.go
index 1e6d00612..037d13374 100644
--- a/pkg/detectors/impala/impala.go
+++ b/pkg/detectors/impala/impala.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Impala,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/infura/infura.go b/pkg/detectors/infura/infura.go
index e09f5fd90..e988aa8e8 100644
--- a/pkg/detectors/infura/infura.go
+++ b/pkg/detectors/infura/infura.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Infura,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/insightly/insightly.go b/pkg/detectors/insightly/insightly.go
index 5bfe3cd2e..806198213 100644
--- a/pkg/detectors/insightly/insightly.go
+++ b/pkg/detectors/insightly/insightly.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Insightly,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/instabot/instabot.go b/pkg/detectors/instabot/instabot.go
index dfcb7013c..64362555a 100644
--- a/pkg/detectors/instabot/instabot.go
+++ b/pkg/detectors/instabot/instabot.go
@@ -40,6 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Instabot,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/instamojo/instamojo.go b/pkg/detectors/instamojo/instamojo.go
index fe1d4ba22..e36ac2c43 100644
--- a/pkg/detectors/instamojo/instamojo.go
+++ b/pkg/detectors/instamojo/instamojo.go
@@ -53,6 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Instamojo,
Raw: []byte(resClientId),
+ SecretParts: map[string]string{"key": resClientId},
}
if verify {
diff --git a/pkg/detectors/intercom/intercom.go b/pkg/detectors/intercom/intercom.go
index 355415296..cdfbd56c2 100644
--- a/pkg/detectors/intercom/intercom.go
+++ b/pkg/detectors/intercom/intercom.go
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Intercom,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/interseller/interseller.go b/pkg/detectors/interseller/interseller.go
index bff6109cf..6eee0a98b 100644
--- a/pkg/detectors/interseller/interseller.go
+++ b/pkg/detectors/interseller/interseller.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Interseller,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
req, err := http.NewRequestWithContext(ctx, "GET", "https://interseller.io/api/campaigns/list", nil)
diff --git a/pkg/detectors/intra42/intra42.go b/pkg/detectors/intra42/intra42.go
index 4f14d38ce..cc741b10b 100644
--- a/pkg/detectors/intra42/intra42.go
+++ b/pkg/detectors/intra42/intra42.go
@@ -61,6 +61,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Intra42,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/intrinio/intrinio.go b/pkg/detectors/intrinio/intrinio.go
index fe4b2a334..0cf5c3298 100644
--- a/pkg/detectors/intrinio/intrinio.go
+++ b/pkg/detectors/intrinio/intrinio.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Intrinio,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/invoiceocean/invoiceocean.go b/pkg/detectors/invoiceocean/invoiceocean.go
index 659d43fe2..a0cde7882 100644
--- a/pkg/detectors/invoiceocean/invoiceocean.go
+++ b/pkg/detectors/invoiceocean/invoiceocean.go
@@ -12,7 +12,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -49,6 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_InvoiceOcean,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/ip2location/ip2location.go b/pkg/detectors/ip2location/ip2location.go
index cf1507664..8b5adcdf9 100644
--- a/pkg/detectors/ip2location/ip2location.go
+++ b/pkg/detectors/ip2location/ip2location.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Ip2location,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/ipapi/ipapi.go b/pkg/detectors/ipapi/ipapi.go
index 007a336aa..2ba194933 100644
--- a/pkg/detectors/ipapi/ipapi.go
+++ b/pkg/detectors/ipapi/ipapi.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Ipapi,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/ipgeolocation/ipgeolocation.go b/pkg/detectors/ipgeolocation/ipgeolocation.go
index 17fdffb50..13fe2ee72 100644
--- a/pkg/detectors/ipgeolocation/ipgeolocation.go
+++ b/pkg/detectors/ipgeolocation/ipgeolocation.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_IPGeolocation,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/ipinfo/ipinfo.go b/pkg/detectors/ipinfo/ipinfo.go
index 1079ba82a..bb5c50b3b 100644
--- a/pkg/detectors/ipinfo/ipinfo.go
+++ b/pkg/detectors/ipinfo/ipinfo.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_IPInfo,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/ipinfodb/ipinfodb.go b/pkg/detectors/ipinfodb/ipinfodb.go
index 488e1909b..496dde166 100644
--- a/pkg/detectors/ipinfodb/ipinfodb.go
+++ b/pkg/detectors/ipinfodb/ipinfodb.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_IPinfoDB,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/ipquality/ipquality.go b/pkg/detectors/ipquality/ipquality.go
index 6dcc3d987..9ea292ad5 100644
--- a/pkg/detectors/ipquality/ipquality.go
+++ b/pkg/detectors/ipquality/ipquality.go
@@ -57,6 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_IPQuality,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/ipstack/ipstack.go b/pkg/detectors/ipstack/ipstack.go
index 395220a87..3d80a33dc 100644
--- a/pkg/detectors/ipstack/ipstack.go
+++ b/pkg/detectors/ipstack/ipstack.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_IpStack,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/jiradatacenterpat/jiradatacenterpat.go b/pkg/detectors/jiradatacenterpat/jiradatacenterpat.go
index d95f176b3..3ed359652 100644
--- a/pkg/detectors/jiradatacenterpat/jiradatacenterpat.go
+++ b/pkg/detectors/jiradatacenterpat/jiradatacenterpat.go
@@ -80,6 +80,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
results = append(results, detectors.Result{
DetectorType: detector_typepb.DetectorType_JiraDataCenterPAT,
Raw: []byte(token),
+ SecretParts: map[string]string{"token": token},
Redacted: token[:3] + "..." + token[len(token)-3:],
ExtraData: map[string]string{"message": "No Jira Data Center URL was found or configured. To verify this token, set the Jira instance base URL as a custom endpoint."},
})
@@ -90,8 +91,12 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_JiraDataCenterPAT,
Raw: []byte(token),
- RawV2: []byte(token + ":" + endpoint),
- Redacted: token[:3] + "..." + token[len(token)-3:],
+ SecretParts: map[string]string{
+ "token": token,
+ "url": endpoint,
+ },
+ RawV2: []byte(token + ":" + endpoint),
+ Redacted: token[:3] + "..." + token[len(token)-3:],
}
if verify {
diff --git a/pkg/detectors/jotform/jotform.go b/pkg/detectors/jotform/jotform.go
index bc52cce1a..199549413 100644
--- a/pkg/detectors/jotform/jotform.go
+++ b/pkg/detectors/jotform/jotform.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Jotform,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/jumpcloud/jumpcloud.go b/pkg/detectors/jumpcloud/jumpcloud.go
index 338fd730a..2f43fb336 100644
--- a/pkg/detectors/jumpcloud/jumpcloud.go
+++ b/pkg/detectors/jumpcloud/jumpcloud.go
@@ -40,6 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Jumpcloud,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/jupiterone/jupiterone.go b/pkg/detectors/jupiterone/jupiterone.go
index a7346d88f..13d647a3b 100644
--- a/pkg/detectors/jupiterone/jupiterone.go
+++ b/pkg/detectors/jupiterone/jupiterone.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_JupiterOne,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/juro/juro.go b/pkg/detectors/juro/juro.go
index 2516d67a1..ad23a0d57 100644
--- a/pkg/detectors/juro/juro.go
+++ b/pkg/detectors/juro/juro.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Juro,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/jwt/jwt.go b/pkg/detectors/jwt/jwt.go
index 8c2b975ca..827443391 100644
--- a/pkg/detectors/jwt/jwt.go
+++ b/pkg/detectors/jwt/jwt.go
@@ -134,6 +134,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_JWT,
Raw: []byte(match),
+ SecretParts: map[string]string{"key": match},
ExtraData: extraData,
}
diff --git a/pkg/detectors/kanban/kanban.go b/pkg/detectors/kanban/kanban.go
index cf6bd9e46..6c7a9f3a9 100644
--- a/pkg/detectors/kanban/kanban.go
+++ b/pkg/detectors/kanban/kanban.go
@@ -12,7 +12,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Kanban,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/kanbantool/kanbantool.go b/pkg/detectors/kanbantool/kanbantool.go
index c1cb31672..d187081aa 100644
--- a/pkg/detectors/kanbantool/kanbantool.go
+++ b/pkg/detectors/kanbantool/kanbantool.go
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Kanbantool,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
url := fmt.Sprintf("https://%s.kanbantool.com/api/v3/users/current.json", resIdMatch)
diff --git a/pkg/detectors/karmacrm/karmacrm.go b/pkg/detectors/karmacrm/karmacrm.go
index b09d792fc..ebeeefb11 100644
--- a/pkg/detectors/karmacrm/karmacrm.go
+++ b/pkg/detectors/karmacrm/karmacrm.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_KarmaCRM,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/keenio/keenio.go b/pkg/detectors/keenio/keenio.go
index 0a276a347..2b72e1b63 100644
--- a/pkg/detectors/keenio/keenio.go
+++ b/pkg/detectors/keenio/keenio.go
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_KeenIO,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/kickbox/kickbox.go b/pkg/detectors/kickbox/kickbox.go
index e8e5eb8e1..cb38ee471 100644
--- a/pkg/detectors/kickbox/kickbox.go
+++ b/pkg/detectors/kickbox/kickbox.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Kickbox,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/klaviyo/klaviyo.go b/pkg/detectors/klaviyo/klaviyo.go
index 10f154c3a..e31d0d2ed 100644
--- a/pkg/detectors/klaviyo/klaviyo.go
+++ b/pkg/detectors/klaviyo/klaviyo.go
@@ -57,6 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Klaviyo,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/klipfolio/klipfolio.go b/pkg/detectors/klipfolio/klipfolio.go
index 324d039b6..2a66e3696 100644
--- a/pkg/detectors/klipfolio/klipfolio.go
+++ b/pkg/detectors/klipfolio/klipfolio.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Klipfolio,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/knapsackpro/knapsackpro.go b/pkg/detectors/knapsackpro/knapsackpro.go
index 9123fe57b..b0254ce98 100644
--- a/pkg/detectors/knapsackpro/knapsackpro.go
+++ b/pkg/detectors/knapsackpro/knapsackpro.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_KnapsackPro,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/kontent/kontent.go b/pkg/detectors/kontent/kontent.go
index 051cb85a1..f4fb47035 100644
--- a/pkg/detectors/kontent/kontent.go
+++ b/pkg/detectors/kontent/kontent.go
@@ -62,7 +62,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Kontent,
Raw: []byte(envID),
- RawV2: []byte(envID + apiKey),
+ SecretParts: map[string]string{
+ "env_id": envID,
+ "key": apiKey,
+ },
+ RawV2: []byte(envID + apiKey),
}
if verify {
diff --git a/pkg/detectors/kraken/kraken.go b/pkg/detectors/kraken/kraken.go
index 20488cd0d..ac78ccc89 100644
--- a/pkg/detectors/kraken/kraken.go
+++ b/pkg/detectors/kraken/kraken.go
@@ -58,7 +58,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Kraken,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resPrivKeyMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "private_key": resPrivKeyMatch,
+ },
+ RawV2: []byte(resMatch + resPrivKeyMatch),
}
if verify {
diff --git a/pkg/detectors/kucoin/kucoin.go b/pkg/detectors/kucoin/kucoin.go
index cd80b3b1c..743788d94 100644
--- a/pkg/detectors/kucoin/kucoin.go
+++ b/pkg/detectors/kucoin/kucoin.go
@@ -16,7 +16,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -58,7 +58,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_KuCoin,
Raw: []byte(resKeyMatch),
- RawV2: []byte(resKeyMatch + resPassphraseMatch),
+ SecretParts: map[string]string{
+ "key": resKeyMatch,
+ "passphrase": resPassphraseMatch,
+ },
+ RawV2: []byte(resKeyMatch + resPassphraseMatch),
}
if verify {
diff --git a/pkg/detectors/kylas/kylas.go b/pkg/detectors/kylas/kylas.go
index fb5b58722..a94fd7376 100644
--- a/pkg/detectors/kylas/kylas.go
+++ b/pkg/detectors/kylas/kylas.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Kylas,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/langfuse/langfuse.go b/pkg/detectors/langfuse/langfuse.go
index e9effe0a0..bac227613 100755
--- a/pkg/detectors/langfuse/langfuse.go
+++ b/pkg/detectors/langfuse/langfuse.go
@@ -22,8 +22,8 @@ var _ detectors.Detector = (*Scanner)(nil)
var (
defaultClient = common.SaneHttpClient()
- publicKey = regexp.MustCompile(detectors.PrefixRegex([]string{"langfuse"}) + `\b(pk-lf-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\b`)
- secretKey = regexp.MustCompile(detectors.PrefixRegex([]string{"langfuse"}) + `\b(sk-lf-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\b`)
+ publicKey = regexp.MustCompile(detectors.PrefixRegex([]string{"langfuse"}) + `\b(pk-lf-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\b`)
+ secretKey = regexp.MustCompile(detectors.PrefixRegex([]string{"langfuse"}) + `\b(sk-lf-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\b`)
)
func (s Scanner) Keywords() []string {
@@ -49,6 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Langfuse,
Raw: []byte(skMatch),
+ SecretParts: map[string]string{"key": skMatch},
}
if verify {
diff --git a/pkg/detectors/langsmith/langsmith.go b/pkg/detectors/langsmith/langsmith.go
index c5e4cf064..21ccdbe55 100644
--- a/pkg/detectors/langsmith/langsmith.go
+++ b/pkg/detectors/langsmith/langsmith.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_LangSmith,
Raw: []byte(apiKey),
+ SecretParts: map[string]string{"key": apiKey},
}
if verify {
diff --git a/pkg/detectors/languagelayer/languagelayer.go b/pkg/detectors/languagelayer/languagelayer.go
index 046671531..135edd961 100644
--- a/pkg/detectors/languagelayer/languagelayer.go
+++ b/pkg/detectors/languagelayer/languagelayer.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_LanguageLayer,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/larksuite/larksuite.go b/pkg/detectors/larksuite/larksuite.go
index da14de546..de5cf9a58 100644
--- a/pkg/detectors/larksuite/larksuite.go
+++ b/pkg/detectors/larksuite/larksuite.go
@@ -104,6 +104,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_LarkSuite,
Raw: []byte(token),
+ SecretParts: map[string]string{"key": token},
}
s1.ExtraData = map[string]string{
"token_type": string(key),
diff --git a/pkg/detectors/larksuiteapikey/larksuiteapikey.go b/pkg/detectors/larksuiteapikey/larksuiteapikey.go
index 12c154f75..3a8d9e6a6 100644
--- a/pkg/detectors/larksuiteapikey/larksuiteapikey.go
+++ b/pkg/detectors/larksuiteapikey/larksuiteapikey.go
@@ -59,7 +59,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_LarkSuiteApiKey,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resSecretMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "secret": resSecretMatch,
+ },
+ RawV2: []byte(resMatch + resSecretMatch),
}
if verify {
diff --git a/pkg/detectors/ldap/ldap.go b/pkg/detectors/ldap/ldap.go
index 1f6c10915..fdf029d60 100644
--- a/pkg/detectors/ldap/ldap.go
+++ b/pkg/detectors/ldap/ldap.go
@@ -70,6 +70,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_LDAP,
Raw: []byte(strings.Join([]string{ldapURL.String(), username[1], password[1]}, "\t")),
+ SecretParts: map[string]string{
+ "url": ldapURL.String(),
+ "username": username[1],
+ "password": password[1],
+ },
}
if verify {
@@ -100,6 +105,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_LDAP,
Raw: []byte(strings.Join([]string{ldapURL.String(), username, password}, "\t")),
+ SecretParts: map[string]string{
+ "url": ldapURL.String(),
+ "username": username,
+ "password": password,
+ },
}
if verify {
diff --git a/pkg/detectors/leadfeeder/leadfeeder.go b/pkg/detectors/leadfeeder/leadfeeder.go
index 645d5f46a..f619c711f 100644
--- a/pkg/detectors/leadfeeder/leadfeeder.go
+++ b/pkg/detectors/leadfeeder/leadfeeder.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Leadfeeder,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/lemlist/lemlist.go b/pkg/detectors/lemlist/lemlist.go
index c45963881..c8d779ebb 100644
--- a/pkg/detectors/lemlist/lemlist.go
+++ b/pkg/detectors/lemlist/lemlist.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Lemlist,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/lemonsqueezy/lemonsqueezy.go b/pkg/detectors/lemonsqueezy/lemonsqueezy.go
index e1d1a01bb..d70476446 100644
--- a/pkg/detectors/lemonsqueezy/lemonsqueezy.go
+++ b/pkg/detectors/lemonsqueezy/lemonsqueezy.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_LemonSqueezy,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/lendflow/lendflow.go b/pkg/detectors/lendflow/lendflow.go
index a341119cc..1723957fd 100644
--- a/pkg/detectors/lendflow/lendflow.go
+++ b/pkg/detectors/lendflow/lendflow.go
@@ -46,6 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Lendflow,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/lessannoyingcrm/lessannoyingcrm.go b/pkg/detectors/lessannoyingcrm/lessannoyingcrm.go
index 4192c9e29..9232d985f 100644
--- a/pkg/detectors/lessannoyingcrm/lessannoyingcrm.go
+++ b/pkg/detectors/lessannoyingcrm/lessannoyingcrm.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_LessAnnoyingCRM,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/lexigram/lexigram.go b/pkg/detectors/lexigram/lexigram.go
index a41dd7917..c72b6734b 100644
--- a/pkg/detectors/lexigram/lexigram.go
+++ b/pkg/detectors/lexigram/lexigram.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Lexigram,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/linearapi/linearapi.go b/pkg/detectors/linearapi/linearapi.go
index 75c3a8c6c..f6ae661f7 100644
--- a/pkg/detectors/linearapi/linearapi.go
+++ b/pkg/detectors/linearapi/linearapi.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_LinearAPI,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/linemessaging/linemessaging.go b/pkg/detectors/linemessaging/linemessaging.go
index 3b10ec701..9d5d0ea9f 100644
--- a/pkg/detectors/linemessaging/linemessaging.go
+++ b/pkg/detectors/linemessaging/linemessaging.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_LineMessaging,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/linenotify/linenotify.go b/pkg/detectors/linenotify/linenotify.go
index 9e77a85dc..9688eb918 100644
--- a/pkg/detectors/linenotify/linenotify.go
+++ b/pkg/detectors/linenotify/linenotify.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_LineNotify,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/linkpreview/linkpreview.go b/pkg/detectors/linkpreview/linkpreview.go
index ab4cc9d57..f2118c5ec 100644
--- a/pkg/detectors/linkpreview/linkpreview.go
+++ b/pkg/detectors/linkpreview/linkpreview.go
@@ -40,6 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_LinkPreview,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/liveagent/liveagent.go b/pkg/detectors/liveagent/liveagent.go
index 9e8ea5b92..09628f2ec 100644
--- a/pkg/detectors/liveagent/liveagent.go
+++ b/pkg/detectors/liveagent/liveagent.go
@@ -12,7 +12,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -53,6 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_LiveAgent,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
ExtraData: map[string]string{
"domain": domainRes,
},
diff --git a/pkg/detectors/livestorm/livestorm.go b/pkg/detectors/livestorm/livestorm.go
index 37fd025ff..e16bf9645 100644
--- a/pkg/detectors/livestorm/livestorm.go
+++ b/pkg/detectors/livestorm/livestorm.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Livestorm,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/loadmill/loadmill.go b/pkg/detectors/loadmill/loadmill.go
index 5a64bd903..c8a8b6ff4 100644
--- a/pkg/detectors/loadmill/loadmill.go
+++ b/pkg/detectors/loadmill/loadmill.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Loadmill,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/lob/lob.go b/pkg/detectors/lob/lob.go
index f813ceac4..c86abb288 100644
--- a/pkg/detectors/lob/lob.go
+++ b/pkg/detectors/lob/lob.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Lob,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/locationiq/locationiq.go b/pkg/detectors/locationiq/locationiq.go
index e8a0b0c42..17e2ddbb7 100644
--- a/pkg/detectors/locationiq/locationiq.go
+++ b/pkg/detectors/locationiq/locationiq.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_LocationIQ,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/loggly/loggly.go b/pkg/detectors/loggly/loggly.go
index 3ab25d8d4..463c7fa76 100644
--- a/pkg/detectors/loggly/loggly.go
+++ b/pkg/detectors/loggly/loggly.go
@@ -50,7 +50,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Loggly,
Raw: []byte(key),
- RawV2: []byte(fmt.Sprintf("%s:%s", domainRes, key)),
+ SecretParts: map[string]string{
+ "domain": domainRes,
+ "key": key,
+ },
+ RawV2: []byte(fmt.Sprintf("%s:%s", domainRes, key)),
}
if verify {
diff --git a/pkg/detectors/loginradius/loginradius.go b/pkg/detectors/loginradius/loginradius.go
index 534aad4f8..b357b0211 100644
--- a/pkg/detectors/loginradius/loginradius.go
+++ b/pkg/detectors/loginradius/loginradius.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Loginradius,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/logzio/logzio.go b/pkg/detectors/logzio/logzio.go
index 758f51b11..265dd6918 100644
--- a/pkg/detectors/logzio/logzio.go
+++ b/pkg/detectors/logzio/logzio.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_LogzIO,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/lokalisetoken/lokalisetoken.go b/pkg/detectors/lokalisetoken/lokalisetoken.go
index 69f005383..057823980 100644
--- a/pkg/detectors/lokalisetoken/lokalisetoken.go
+++ b/pkg/detectors/lokalisetoken/lokalisetoken.go
@@ -53,6 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_LokaliseToken,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
ExtraData: make(map[string]string),
}
diff --git a/pkg/detectors/loyverse/loyverse.go b/pkg/detectors/loyverse/loyverse.go
index 1a0855c86..1434256dc 100644
--- a/pkg/detectors/loyverse/loyverse.go
+++ b/pkg/detectors/loyverse/loyverse.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Loyverse,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/lunchmoney/lunchmoney.go b/pkg/detectors/lunchmoney/lunchmoney.go
index bcdde2d42..7baf13876 100644
--- a/pkg/detectors/lunchmoney/lunchmoney.go
+++ b/pkg/detectors/lunchmoney/lunchmoney.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_LunchMoney,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/luno/luno.go b/pkg/detectors/luno/luno.go
index d1de1bb3f..262c5db19 100644
--- a/pkg/detectors/luno/luno.go
+++ b/pkg/detectors/luno/luno.go
@@ -11,7 +11,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -49,6 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Luno,
Raw: []byte(tokenPatMatch),
+ SecretParts: map[string]string{"key": tokenPatMatch},
}
if verify {
diff --git a/pkg/detectors/m3o/m3o.go b/pkg/detectors/m3o/m3o.go
index cc07aece8..a510e32d9 100644
--- a/pkg/detectors/m3o/m3o.go
+++ b/pkg/detectors/m3o/m3o.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_M3o,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/madkudu/madkudu.go b/pkg/detectors/madkudu/madkudu.go
index 69b723d12..8dc391d30 100644
--- a/pkg/detectors/madkudu/madkudu.go
+++ b/pkg/detectors/madkudu/madkudu.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_MadKudu,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/magicbell/magicbell.go b/pkg/detectors/magicbell/magicbell.go
index f53103651..6252058aa 100644
--- a/pkg/detectors/magicbell/magicbell.go
+++ b/pkg/detectors/magicbell/magicbell.go
@@ -51,6 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_MagicBell,
Raw: []byte(apiKeyRes),
+ SecretParts: map[string]string{"key": apiKeyRes},
}
if verify {
diff --git a/pkg/detectors/magnetic/magnetic.go b/pkg/detectors/magnetic/magnetic.go
index ab794034a..f25e63c23 100644
--- a/pkg/detectors/magnetic/magnetic.go
+++ b/pkg/detectors/magnetic/magnetic.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Magnetic,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/mailboxlayer/mailboxlayer.go b/pkg/detectors/mailboxlayer/mailboxlayer.go
index a61b61af4..a7b48ea91 100644
--- a/pkg/detectors/mailboxlayer/mailboxlayer.go
+++ b/pkg/detectors/mailboxlayer/mailboxlayer.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Mailboxlayer,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/mailerlite/mailerlite.go b/pkg/detectors/mailerlite/mailerlite.go
index 3ac4b2375..c6facbbcd 100644
--- a/pkg/detectors/mailerlite/mailerlite.go
+++ b/pkg/detectors/mailerlite/mailerlite.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Mailerlite,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/mailgun/mailgun.go b/pkg/detectors/mailgun/mailgun.go
index 9a3ba6ed2..0f6cc497e 100644
--- a/pkg/detectors/mailgun/mailgun.go
+++ b/pkg/detectors/mailgun/mailgun.go
@@ -61,7 +61,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: s.Type(),
Raw: []byte(match),
- SecretParts: map[string]string{"key": match},
+ SecretParts: map[string]string{"key": match},
}
if verify {
diff --git a/pkg/detectors/mailjetbasicauth/mailjetbasicauth.go b/pkg/detectors/mailjetbasicauth/mailjetbasicauth.go
index d298f02c1..09a66a2e9 100644
--- a/pkg/detectors/mailjetbasicauth/mailjetbasicauth.go
+++ b/pkg/detectors/mailjetbasicauth/mailjetbasicauth.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_MailJetBasicAuth,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/mailjetsms/mailjetsms.go b/pkg/detectors/mailjetsms/mailjetsms.go
index 003fd9429..871a5a68c 100644
--- a/pkg/detectors/mailjetsms/mailjetsms.go
+++ b/pkg/detectors/mailjetsms/mailjetsms.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_MailJetSMS,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/mailmodo/mailmodo.go b/pkg/detectors/mailmodo/mailmodo.go
index 99878eb24..f3781d602 100644
--- a/pkg/detectors/mailmodo/mailmodo.go
+++ b/pkg/detectors/mailmodo/mailmodo.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Mailmodo,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/mailsac/mailsac.go b/pkg/detectors/mailsac/mailsac.go
index 0f99f5296..ad6ff4010 100644
--- a/pkg/detectors/mailsac/mailsac.go
+++ b/pkg/detectors/mailsac/mailsac.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Mailsac,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/mandrill/mandrill.go b/pkg/detectors/mandrill/mandrill.go
index 1b57f85fd..9b4a16f2e 100644
--- a/pkg/detectors/mandrill/mandrill.go
+++ b/pkg/detectors/mandrill/mandrill.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Mandrill,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/manifest/manifest.go b/pkg/detectors/manifest/manifest.go
index fe94b4233..f33a6a669 100644
--- a/pkg/detectors/manifest/manifest.go
+++ b/pkg/detectors/manifest/manifest.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Manifest,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/mapbox/mapbox.go b/pkg/detectors/mapbox/mapbox.go
index 12b4158c4..d2feda74b 100644
--- a/pkg/detectors/mapbox/mapbox.go
+++ b/pkg/detectors/mapbox/mapbox.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_MapBox,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/mapquest/mapquest.go b/pkg/detectors/mapquest/mapquest.go
index 5b0ab51b7..30efb0f55 100644
--- a/pkg/detectors/mapquest/mapquest.go
+++ b/pkg/detectors/mapquest/mapquest.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Mapquest,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/marketstack/marketstack.go b/pkg/detectors/marketstack/marketstack.go
index c85ae0c17..1f5c3fc23 100644
--- a/pkg/detectors/marketstack/marketstack.go
+++ b/pkg/detectors/marketstack/marketstack.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Marketstack,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken.go b/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken.go
index 4503f83e3..28b097bf4 100644
--- a/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken.go
+++ b/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken.go
@@ -50,7 +50,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_MattermostPersonalToken,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + serverRes),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "url": serverRes,
+ },
+ RawV2: []byte(resMatch + serverRes),
}
if verify {
diff --git a/pkg/detectors/mavenlink/mavenlink.go b/pkg/detectors/mavenlink/mavenlink.go
index 0d74fb39d..961ed4c07 100644
--- a/pkg/detectors/mavenlink/mavenlink.go
+++ b/pkg/detectors/mavenlink/mavenlink.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Mavenlink,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/maxmindlicense/v1/maxmindlicense.go b/pkg/detectors/maxmindlicense/v1/maxmindlicense.go
index 0ffe27583..da21ec899 100644
--- a/pkg/detectors/maxmindlicense/v1/maxmindlicense.go
+++ b/pkg/detectors/maxmindlicense/v1/maxmindlicense.go
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -52,6 +52,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
DetectorType: detector_typepb.DetectorType_MaxMindLicense,
Redacted: idRes,
Raw: []byte(keyRes),
+ SecretParts: map[string]string{"key": keyRes},
ExtraData: map[string]string{
"rotation_guide": "https://howtorotate.com/docs/tutorials/maxmind/",
"version": fmt.Sprintf("%d", s.Version()),
diff --git a/pkg/detectors/maxmindlicense/v2/maxmindlicense_v2.go b/pkg/detectors/maxmindlicense/v2/maxmindlicense_v2.go
index 3e9153606..d141f333b 100644
--- a/pkg/detectors/maxmindlicense/v2/maxmindlicense_v2.go
+++ b/pkg/detectors/maxmindlicense/v2/maxmindlicense_v2.go
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
r := detectors.Result{
DetectorType: detector_typepb.DetectorType_MaxMindLicense,
Raw: []byte(key),
+ SecretParts: map[string]string{"key": key},
ExtraData: map[string]string{
"rotation_guide": "https://howtorotate.com/docs/tutorials/maxmind/",
"version": fmt.Sprintf("%d", s.Version()),
diff --git a/pkg/detectors/meaningcloud/meaningcloud.go b/pkg/detectors/meaningcloud/meaningcloud.go
index 50fb9f77f..8428e6877 100644
--- a/pkg/detectors/meaningcloud/meaningcloud.go
+++ b/pkg/detectors/meaningcloud/meaningcloud.go
@@ -49,6 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_MeaningCloud,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/mediastack/mediastack.go b/pkg/detectors/mediastack/mediastack.go
index 86b754302..ac44fe833 100644
--- a/pkg/detectors/mediastack/mediastack.go
+++ b/pkg/detectors/mediastack/mediastack.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_MediaStack,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/meistertask/meistertask.go b/pkg/detectors/meistertask/meistertask.go
index 061546668..e6b5e346e 100644
--- a/pkg/detectors/meistertask/meistertask.go
+++ b/pkg/detectors/meistertask/meistertask.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Meistertask,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/meraki/meraki.go b/pkg/detectors/meraki/meraki.go
index c77698460..74c220e5b 100644
--- a/pkg/detectors/meraki/meraki.go
+++ b/pkg/detectors/meraki/meraki.go
@@ -68,6 +68,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Meraki,
Raw: []byte(match),
+ SecretParts: map[string]string{"key": match},
ExtraData: make(map[string]string),
}
diff --git a/pkg/detectors/mesibo/mesibo.go b/pkg/detectors/mesibo/mesibo.go
index 72b88ffd3..2dcc70344 100644
--- a/pkg/detectors/mesibo/mesibo.go
+++ b/pkg/detectors/mesibo/mesibo.go
@@ -59,6 +59,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Mesibo,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/messagebird/messagebird.go b/pkg/detectors/messagebird/messagebird.go
index a2e3affe5..59c164f21 100644
--- a/pkg/detectors/messagebird/messagebird.go
+++ b/pkg/detectors/messagebird/messagebird.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_MessageBird,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/metaapi/metaapi.go b/pkg/detectors/metaapi/metaapi.go
index d04735bc1..93b8939f7 100644
--- a/pkg/detectors/metaapi/metaapi.go
+++ b/pkg/detectors/metaapi/metaapi.go
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_MetaAPI,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/metabase/metabase.go b/pkg/detectors/metabase/metabase.go
index 8a9136fff..406bebc7a 100644
--- a/pkg/detectors/metabase/metabase.go
+++ b/pkg/detectors/metabase/metabase.go
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -57,7 +57,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Metabase,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resURLMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "url": resURLMatch,
+ },
+ RawV2: []byte(resMatch + resURLMatch),
}
if verify {
diff --git a/pkg/detectors/metrilo/metrilo.go b/pkg/detectors/metrilo/metrilo.go
index 380df0148..daa2202c9 100644
--- a/pkg/detectors/metrilo/metrilo.go
+++ b/pkg/detectors/metrilo/metrilo.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Metrilo,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/microsoftteamswebhook/microsoftteamswebhook.go b/pkg/detectors/microsoftteamswebhook/microsoftteamswebhook.go
index 49aa5a826..4a5c993c3 100644
--- a/pkg/detectors/microsoftteamswebhook/microsoftteamswebhook.go
+++ b/pkg/detectors/microsoftteamswebhook/microsoftteamswebhook.go
@@ -46,6 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_MicrosoftTeamsWebhook,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
s1.ExtraData = map[string]string{
"rotation_guide": "https://howtorotate.com/docs/tutorials/microsoftteams/",
diff --git a/pkg/detectors/mindmeister/mindmeister.go b/pkg/detectors/mindmeister/mindmeister.go
index 2169e5e2d..5f9f045dd 100644
--- a/pkg/detectors/mindmeister/mindmeister.go
+++ b/pkg/detectors/mindmeister/mindmeister.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Mindmeister,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/miro/miro.go b/pkg/detectors/miro/miro.go
index 6f1098bb2..535ea0784 100644
--- a/pkg/detectors/miro/miro.go
+++ b/pkg/detectors/miro/miro.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Miro,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/mite/mite.go b/pkg/detectors/mite/mite.go
index 4fb520554..e21554ca8 100644
--- a/pkg/detectors/mite/mite.go
+++ b/pkg/detectors/mite/mite.go
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Mite,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/mixmax/mixmax.go b/pkg/detectors/mixmax/mixmax.go
index 089d5fdb1..de8e26e61 100644
--- a/pkg/detectors/mixmax/mixmax.go
+++ b/pkg/detectors/mixmax/mixmax.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Mixmax,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/mixpanel/mixpanel.go b/pkg/detectors/mixpanel/mixpanel.go
index cff04f4e1..9a2e63d1e 100644
--- a/pkg/detectors/mixpanel/mixpanel.go
+++ b/pkg/detectors/mixpanel/mixpanel.go
@@ -49,6 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Mixpanel,
Raw: []byte(tokenPatMatch),
+ SecretParts: map[string]string{"key": tokenPatMatch},
}
if verify {
diff --git a/pkg/detectors/mockaroo/mockaroo.go b/pkg/detectors/mockaroo/mockaroo.go
index 5c43c716a..c005331aa 100644
--- a/pkg/detectors/mockaroo/mockaroo.go
+++ b/pkg/detectors/mockaroo/mockaroo.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Mockaroo,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/moderation/moderation.go b/pkg/detectors/moderation/moderation.go
index 9a4dc986d..ade9f0b15 100644
--- a/pkg/detectors/moderation/moderation.go
+++ b/pkg/detectors/moderation/moderation.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Moderation,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/monkeylearn/monkeylearn.go b/pkg/detectors/monkeylearn/monkeylearn.go
index 624baf1a2..938be4f77 100644
--- a/pkg/detectors/monkeylearn/monkeylearn.go
+++ b/pkg/detectors/monkeylearn/monkeylearn.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_MonkeyLearn,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/moonclerk/moonclerk.go b/pkg/detectors/moonclerk/moonclerk.go
index 1c2d039d0..3bf6115dc 100644
--- a/pkg/detectors/moonclerk/moonclerk.go
+++ b/pkg/detectors/moonclerk/moonclerk.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Moonclerk,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/moosend/moosend.go b/pkg/detectors/moosend/moosend.go
index 6c1183ff9..75e5b8446 100644
--- a/pkg/detectors/moosend/moosend.go
+++ b/pkg/detectors/moosend/moosend.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Moosend,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/moralis/moralis.go b/pkg/detectors/moralis/moralis.go
index edd4698b3..ae505af22 100644
--- a/pkg/detectors/moralis/moralis.go
+++ b/pkg/detectors/moralis/moralis.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Moralis,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/mrticktock/mrticktock.go b/pkg/detectors/mrticktock/mrticktock.go
index 89e320d65..4452a5713 100644
--- a/pkg/detectors/mrticktock/mrticktock.go
+++ b/pkg/detectors/mrticktock/mrticktock.go
@@ -53,6 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Mrticktock,
Raw: []byte(emailMatch),
+ SecretParts: map[string]string{"key": emailMatch},
}
if verify {
diff --git a/pkg/detectors/myfreshworks/myfreshworks.go b/pkg/detectors/myfreshworks/myfreshworks.go
index f80b2b6f9..9790fb78c 100644
--- a/pkg/detectors/myfreshworks/myfreshworks.go
+++ b/pkg/detectors/myfreshworks/myfreshworks.go
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Myfreshworks,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/myintervals/myintervals.go b/pkg/detectors/myintervals/myintervals.go
index 3a8f2401b..d802115b4 100644
--- a/pkg/detectors/myintervals/myintervals.go
+++ b/pkg/detectors/myintervals/myintervals.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_MyIntervals,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/nasdaqdatalink/nasdaqdatalink.go b/pkg/detectors/nasdaqdatalink/nasdaqdatalink.go
index f89145f83..283b8a1f5 100644
--- a/pkg/detectors/nasdaqdatalink/nasdaqdatalink.go
+++ b/pkg/detectors/nasdaqdatalink/nasdaqdatalink.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_NasdaqDataLink,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/nethunt/nethunt.go b/pkg/detectors/nethunt/nethunt.go
index e5c341ed6..649e613dd 100644
--- a/pkg/detectors/nethunt/nethunt.go
+++ b/pkg/detectors/nethunt/nethunt.go
@@ -11,7 +11,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -49,6 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Nethunt,
Raw: []byte(tokenPatMatch),
+ SecretParts: map[string]string{"key": tokenPatMatch},
}
if verify {
diff --git a/pkg/detectors/netsuite/netsuite.go b/pkg/detectors/netsuite/netsuite.go
index 1eb43aab2..10f448895 100644
--- a/pkg/detectors/netsuite/netsuite.go
+++ b/pkg/detectors/netsuite/netsuite.go
@@ -88,7 +88,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Netsuite,
Raw: []byte(consumerKey),
- RawV2: []byte(consumerKey + consumerSecret),
+ SecretParts: map[string]string{
+ "consumer_key": consumerKey,
+ "consumer_secret": consumerSecret,
+ },
+ RawV2: []byte(consumerKey + consumerSecret),
}
if verify {
diff --git a/pkg/detectors/neutrinoapi/neutrinoapi.go b/pkg/detectors/neutrinoapi/neutrinoapi.go
index 1e06775a9..5bcbd0c1c 100644
--- a/pkg/detectors/neutrinoapi/neutrinoapi.go
+++ b/pkg/detectors/neutrinoapi/neutrinoapi.go
@@ -15,7 +15,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -53,6 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_NeutrinoApi,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/newrelicpersonalapikey/newrelicpersonalapikey.go b/pkg/detectors/newrelicpersonalapikey/newrelicpersonalapikey.go
index f9ad3a69e..56dc90e45 100644
--- a/pkg/detectors/newrelicpersonalapikey/newrelicpersonalapikey.go
+++ b/pkg/detectors/newrelicpersonalapikey/newrelicpersonalapikey.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_NewRelicPersonalApiKey,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/newsapi/newsapi.go b/pkg/detectors/newsapi/newsapi.go
index 60ae03645..b928f0141 100644
--- a/pkg/detectors/newsapi/newsapi.go
+++ b/pkg/detectors/newsapi/newsapi.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Newsapi,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/newscatcher/newscatcher.go b/pkg/detectors/newscatcher/newscatcher.go
index f41c6a61e..47a7bdd6d 100644
--- a/pkg/detectors/newscatcher/newscatcher.go
+++ b/pkg/detectors/newscatcher/newscatcher.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Newscatcher,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/nexmoapikey/nexmoapikey.go b/pkg/detectors/nexmoapikey/nexmoapikey.go
index e9f50b0dd..a3969ac53 100644
--- a/pkg/detectors/nexmoapikey/nexmoapikey.go
+++ b/pkg/detectors/nexmoapikey/nexmoapikey.go
@@ -47,7 +47,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_NexmoApiKey,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resSecret),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "secret": resSecret,
+ },
+ RawV2: []byte(resMatch + resSecret),
}
if verify {
diff --git a/pkg/detectors/nftport/nftport.go b/pkg/detectors/nftport/nftport.go
index 2e219034a..155cd217d 100644
--- a/pkg/detectors/nftport/nftport.go
+++ b/pkg/detectors/nftport/nftport.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Nftport,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/ngc/ngc.go b/pkg/detectors/ngc/ngc.go
index 60fc10a5e..79b1b2f12 100644
--- a/pkg/detectors/ngc/ngc.go
+++ b/pkg/detectors/ngc/ngc.go
@@ -12,7 +12,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_NGC,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/nicereply/nicereply.go b/pkg/detectors/nicereply/nicereply.go
index 4520ca087..f70b5875b 100644
--- a/pkg/detectors/nicereply/nicereply.go
+++ b/pkg/detectors/nicereply/nicereply.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Nicereply,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/nightfall/nightfall.go b/pkg/detectors/nightfall/nightfall.go
index ee2a1deae..6e0cfface 100644
--- a/pkg/detectors/nightfall/nightfall.go
+++ b/pkg/detectors/nightfall/nightfall.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Nightfall,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/nimble/nimble.go b/pkg/detectors/nimble/nimble.go
index a359cdc8b..7b8519994 100644
--- a/pkg/detectors/nimble/nimble.go
+++ b/pkg/detectors/nimble/nimble.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Nimble,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/noticeable/noticeable.go b/pkg/detectors/noticeable/noticeable.go
index 439d4f3e7..505ff9b67 100644
--- a/pkg/detectors/noticeable/noticeable.go
+++ b/pkg/detectors/noticeable/noticeable.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Noticeable,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/nozbeteams/nozbeteams.go b/pkg/detectors/nozbeteams/nozbeteams.go
index f29a4b1da..c30252e53 100644
--- a/pkg/detectors/nozbeteams/nozbeteams.go
+++ b/pkg/detectors/nozbeteams/nozbeteams.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_NozbeTeams,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/nugetapikey/nugetapikey.go b/pkg/detectors/nugetapikey/nugetapikey.go
index 300e368d5..19f8bba82 100644
--- a/pkg/detectors/nugetapikey/nugetapikey.go
+++ b/pkg/detectors/nugetapikey/nugetapikey.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_NuGetApiKey,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/numverify/numverify.go b/pkg/detectors/numverify/numverify.go
index e239e7167..4d907c191 100644
--- a/pkg/detectors/numverify/numverify.go
+++ b/pkg/detectors/numverify/numverify.go
@@ -39,6 +39,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Numverify,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://apilayer.net/api/validate?access_key=%s&number=14158586273", resMatch), nil)
diff --git a/pkg/detectors/nutritionix/nutritionix.go b/pkg/detectors/nutritionix/nutritionix.go
index 2f288bc3b..086c43925 100644
--- a/pkg/detectors/nutritionix/nutritionix.go
+++ b/pkg/detectors/nutritionix/nutritionix.go
@@ -11,7 +11,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -49,6 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Nutritionix,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/nvapi/nvapi.go b/pkg/detectors/nvapi/nvapi.go
index 6bd46ff31..77baf1218 100644
--- a/pkg/detectors/nvapi/nvapi.go
+++ b/pkg/detectors/nvapi/nvapi.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_NVAPI,
Raw: []byte(match),
+ SecretParts: map[string]string{"key": match},
}
if verify {
diff --git a/pkg/detectors/nylas/nylas.go b/pkg/detectors/nylas/nylas.go
index 2f46679a6..8c779901a 100644
--- a/pkg/detectors/nylas/nylas.go
+++ b/pkg/detectors/nylas/nylas.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Nylas,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/oanda/oanda.go b/pkg/detectors/oanda/oanda.go
index 83241b66b..3715d8444 100644
--- a/pkg/detectors/oanda/oanda.go
+++ b/pkg/detectors/oanda/oanda.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Oanda,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/okta/okta.go b/pkg/detectors/okta/okta.go
index 011b7279a..56b7bad68 100644
--- a/pkg/detectors/okta/okta.go
+++ b/pkg/detectors/okta/okta.go
@@ -53,7 +53,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Okta,
Raw: []byte(token),
- RawV2: []byte(fmt.Sprintf("%s:%s", domain, token)),
+ SecretParts: map[string]string{
+ "domain": domain,
+ "token": token,
+ },
+ RawV2: []byte(fmt.Sprintf("%s:%s", domain, token)),
}
if verify {
diff --git a/pkg/detectors/omnisend/omnisend.go b/pkg/detectors/omnisend/omnisend.go
index be19ae1a9..70ea501c7 100644
--- a/pkg/detectors/omnisend/omnisend.go
+++ b/pkg/detectors/omnisend/omnisend.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Omnisend,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/onedesk/onedesk.go b/pkg/detectors/onedesk/onedesk.go
index 094e18184..475c0fb8b 100644
--- a/pkg/detectors/onedesk/onedesk.go
+++ b/pkg/detectors/onedesk/onedesk.go
@@ -53,6 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Onedesk,
Raw: []byte(emailMatch),
+ SecretParts: map[string]string{"key": emailMatch},
}
if verify {
diff --git a/pkg/detectors/onelogin/onelogin.go b/pkg/detectors/onelogin/onelogin.go
index 7c37eca02..64b7a1058 100644
--- a/pkg/detectors/onelogin/onelogin.go
+++ b/pkg/detectors/onelogin/onelogin.go
@@ -12,7 +12,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -46,8 +46,12 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
result := detectors.Result{
DetectorType: detector_typepb.DetectorType_OneLogin,
Raw: []byte(clientID[1]),
- RawV2: []byte(fmt.Sprintf("%s:%s", clientID[1], clientSecret[1])),
- Redacted: clientID[1],
+ SecretParts: map[string]string{
+ "client_id": clientID[1],
+ "client_secret": clientSecret[1],
+ },
+ RawV2: []byte(fmt.Sprintf("%s:%s", clientID[1], clientSecret[1])),
+ Redacted: clientID[1],
}
if verify {
diff --git a/pkg/detectors/onepagecrm/onepagecrm.go b/pkg/detectors/onepagecrm/onepagecrm.go
index d6a84c4f4..536a865d4 100644
--- a/pkg/detectors/onepagecrm/onepagecrm.go
+++ b/pkg/detectors/onepagecrm/onepagecrm.go
@@ -49,6 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_OnepageCRM,
Raw: []byte(tokenPatMatch),
+ SecretParts: map[string]string{"key": tokenPatMatch},
}
if verify {
req, err := http.NewRequestWithContext(ctx, "GET", "https://app.onepagecrm.com/api/v3/contacts.json?per_page=20&page=1", nil)
diff --git a/pkg/detectors/onesignal/onesignal.go b/pkg/detectors/onesignal/onesignal.go
index caa60921d..839007378 100644
--- a/pkg/detectors/onesignal/onesignal.go
+++ b/pkg/detectors/onesignal/onesignal.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Onesignal,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/onfleet/onfleet.go b/pkg/detectors/onfleet/onfleet.go
index 147d062a4..dac0d0fff 100644
--- a/pkg/detectors/onfleet/onfleet.go
+++ b/pkg/detectors/onfleet/onfleet.go
@@ -46,6 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Onfleet,
Raw: []byte(match),
+ SecretParts: map[string]string{"key": match},
}
if verify {
diff --git a/pkg/detectors/oopspam/oopspam.go b/pkg/detectors/oopspam/oopspam.go
index b82659eca..92d398a5e 100644
--- a/pkg/detectors/oopspam/oopspam.go
+++ b/pkg/detectors/oopspam/oopspam.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_OOPSpam,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/opencagedata/opencagedata.go b/pkg/detectors/opencagedata/opencagedata.go
index 064582d8d..2c61bb5a5 100644
--- a/pkg/detectors/opencagedata/opencagedata.go
+++ b/pkg/detectors/opencagedata/opencagedata.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_OpenCageData,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/openuv/openuv.go b/pkg/detectors/openuv/openuv.go
index a5004e1f4..daeaf7be6 100644
--- a/pkg/detectors/openuv/openuv.go
+++ b/pkg/detectors/openuv/openuv.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Openuv,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/openvpn/openvpn.go b/pkg/detectors/openvpn/openvpn.go
index 3bdc37d8e..1feca62e4 100644
--- a/pkg/detectors/openvpn/openvpn.go
+++ b/pkg/detectors/openvpn/openvpn.go
@@ -53,7 +53,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_OpenVpn,
Raw: []byte(clientSecretRes),
- RawV2: []byte(clientIDRes + clientSecretRes),
+ SecretParts: map[string]string{
+ "client_id": clientIDRes,
+ "client_secret": clientSecretRes,
+ },
+ RawV2: []byte(clientIDRes + clientSecretRes),
}
if verify {
diff --git a/pkg/detectors/openweather/openweather.go b/pkg/detectors/openweather/openweather.go
index 78f0c1ab7..8d8895dfb 100644
--- a/pkg/detectors/openweather/openweather.go
+++ b/pkg/detectors/openweather/openweather.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_OpenWeather,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/optimizely/optimizely.go b/pkg/detectors/optimizely/optimizely.go
index 7a7616c74..55827f93f 100644
--- a/pkg/detectors/optimizely/optimizely.go
+++ b/pkg/detectors/optimizely/optimizely.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Optimizely,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/overloop/overloop.go b/pkg/detectors/overloop/overloop.go
index 1ed500b14..93e5c7ecd 100644
--- a/pkg/detectors/overloop/overloop.go
+++ b/pkg/detectors/overloop/overloop.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Overloop,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/owlbot/owlbot.go b/pkg/detectors/owlbot/owlbot.go
index 6b0059f7c..34725279d 100644
--- a/pkg/detectors/owlbot/owlbot.go
+++ b/pkg/detectors/owlbot/owlbot.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Owlbot,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/packagecloud/packagecloud.go b/pkg/detectors/packagecloud/packagecloud.go
index 09531dbe8..2b5055a46 100644
--- a/pkg/detectors/packagecloud/packagecloud.go
+++ b/pkg/detectors/packagecloud/packagecloud.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_PackageCloud,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/pagarme/pagarme.go b/pkg/detectors/pagarme/pagarme.go
index cc923dede..0fc830ee5 100644
--- a/pkg/detectors/pagarme/pagarme.go
+++ b/pkg/detectors/pagarme/pagarme.go
@@ -46,6 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Pagarme,
Raw: []byte(match),
+ SecretParts: map[string]string{"key": match},
}
if verify {
diff --git a/pkg/detectors/pagerdutyapikey/pagerdutyapikey.go b/pkg/detectors/pagerdutyapikey/pagerdutyapikey.go
index d970bd9c9..01aefe3ef 100644
--- a/pkg/detectors/pagerdutyapikey/pagerdutyapikey.go
+++ b/pkg/detectors/pagerdutyapikey/pagerdutyapikey.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_PagerDutyApiKey,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/pandadoc/pandadoc.go b/pkg/detectors/pandadoc/pandadoc.go
index ed24a681e..9ee3ef07c 100644
--- a/pkg/detectors/pandadoc/pandadoc.go
+++ b/pkg/detectors/pandadoc/pandadoc.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Pandadoc,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/pandascore/pandascore.go b/pkg/detectors/pandascore/pandascore.go
index 3b3299993..e4b24cfa4 100644
--- a/pkg/detectors/pandascore/pandascore.go
+++ b/pkg/detectors/pandascore/pandascore.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_PandaScore,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/paperform/paperform.go b/pkg/detectors/paperform/paperform.go
index 4b5e2653b..84e78f9e1 100644
--- a/pkg/detectors/paperform/paperform.go
+++ b/pkg/detectors/paperform/paperform.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Paperform,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/paralleldots/paralleldots.go b/pkg/detectors/paralleldots/paralleldots.go
index 2dce84296..fd65488c4 100644
--- a/pkg/detectors/paralleldots/paralleldots.go
+++ b/pkg/detectors/paralleldots/paralleldots.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ParallelDots,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/parsehub/parsehub.go b/pkg/detectors/parsehub/parsehub.go
index 2e02eb15d..032392456 100644
--- a/pkg/detectors/parsehub/parsehub.go
+++ b/pkg/detectors/parsehub/parsehub.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Parsehub,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/parsers/parsers.go b/pkg/detectors/parsers/parsers.go
index 44e0bd605..f71d32e32 100644
--- a/pkg/detectors/parsers/parsers.go
+++ b/pkg/detectors/parsers/parsers.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Parsers,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/parseur/parseur.go b/pkg/detectors/parseur/parseur.go
index d962dbb4d..0d068f133 100644
--- a/pkg/detectors/parseur/parseur.go
+++ b/pkg/detectors/parseur/parseur.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Parseur,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/partnerstack/partnerstack.go b/pkg/detectors/partnerstack/partnerstack.go
index e794e9cb6..3ab42b13c 100644
--- a/pkg/detectors/partnerstack/partnerstack.go
+++ b/pkg/detectors/partnerstack/partnerstack.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Partnerstack,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/pastebin/pastebin.go b/pkg/detectors/pastebin/pastebin.go
index 2aa19fd40..5b585fb42 100644
--- a/pkg/detectors/pastebin/pastebin.go
+++ b/pkg/detectors/pastebin/pastebin.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Pastebin,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/paydirtapp/paydirtapp.go b/pkg/detectors/paydirtapp/paydirtapp.go
index 9e8141fe9..82fe2422a 100644
--- a/pkg/detectors/paydirtapp/paydirtapp.go
+++ b/pkg/detectors/paydirtapp/paydirtapp.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Paydirtapp,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/paymoapp/paymoapp.go b/pkg/detectors/paymoapp/paymoapp.go
index ca7a94662..58940fc00 100644
--- a/pkg/detectors/paymoapp/paymoapp.go
+++ b/pkg/detectors/paymoapp/paymoapp.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Paymoapp,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/paymongo/paymongo.go b/pkg/detectors/paymongo/paymongo.go
index 837abd690..20b0a2d61 100644
--- a/pkg/detectors/paymongo/paymongo.go
+++ b/pkg/detectors/paymongo/paymongo.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Paymongo,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/paypaloauth/paypaloauth.go b/pkg/detectors/paypaloauth/paypaloauth.go
index 5ceb36210..c9f15264e 100644
--- a/pkg/detectors/paypaloauth/paypaloauth.go
+++ b/pkg/detectors/paypaloauth/paypaloauth.go
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -49,6 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_PaypalOauth,
Raw: []byte(resSecretMatch),
+ SecretParts: map[string]string{"key": resSecretMatch},
}
if verify {
diff --git a/pkg/detectors/paystack/paystack.go b/pkg/detectors/paystack/paystack.go
index 9ce783e81..5326f0919 100644
--- a/pkg/detectors/paystack/paystack.go
+++ b/pkg/detectors/paystack/paystack.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Paystack,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/pdflayer/pdflayer.go b/pkg/detectors/pdflayer/pdflayer.go
index 175678b87..24b400f18 100644
--- a/pkg/detectors/pdflayer/pdflayer.go
+++ b/pkg/detectors/pdflayer/pdflayer.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_PdfLayer,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/pdfshift/pdfshift.go b/pkg/detectors/pdfshift/pdfshift.go
index 33509d55d..8cb9d0a6d 100644
--- a/pkg/detectors/pdfshift/pdfshift.go
+++ b/pkg/detectors/pdfshift/pdfshift.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_PdfShift,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/peopledatalabs/peopledatalabs.go b/pkg/detectors/peopledatalabs/peopledatalabs.go
index 97637ec48..951e5a177 100644
--- a/pkg/detectors/peopledatalabs/peopledatalabs.go
+++ b/pkg/detectors/peopledatalabs/peopledatalabs.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_PeopleDataLabs,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/pepipost/pepipost.go b/pkg/detectors/pepipost/pepipost.go
index 7ea509b80..18be9866f 100644
--- a/pkg/detectors/pepipost/pepipost.go
+++ b/pkg/detectors/pepipost/pepipost.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Pepipost,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/percy/percy.go b/pkg/detectors/percy/percy.go
index 9d1c4cd9c..81c45344c 100644
--- a/pkg/detectors/percy/percy.go
+++ b/pkg/detectors/percy/percy.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Percy,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/photoroom/photoroom.go b/pkg/detectors/photoroom/photoroom.go
index dc1337e26..ea359b053 100644
--- a/pkg/detectors/photoroom/photoroom.go
+++ b/pkg/detectors/photoroom/photoroom.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Photoroom,
Raw: []byte(match),
+ SecretParts: map[string]string{"key": match},
}
if verify {
diff --git a/pkg/detectors/phraseaccesstoken/phraseaccesstoken.go b/pkg/detectors/phraseaccesstoken/phraseaccesstoken.go
index afc4975b9..1dbaba1aa 100644
--- a/pkg/detectors/phraseaccesstoken/phraseaccesstoken.go
+++ b/pkg/detectors/phraseaccesstoken/phraseaccesstoken.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_PhraseAccessToken,
Raw: []byte(token),
+ SecretParts: map[string]string{"key": token},
}
if verify {
diff --git a/pkg/detectors/pinata/pinata.go b/pkg/detectors/pinata/pinata.go
index a762d873c..465dda391 100644
--- a/pkg/detectors/pinata/pinata.go
+++ b/pkg/detectors/pinata/pinata.go
@@ -12,7 +12,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -49,6 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Pinata,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/pipedream/pipedream.go b/pkg/detectors/pipedream/pipedream.go
index 7cb9e8fd3..ad4874737 100644
--- a/pkg/detectors/pipedream/pipedream.go
+++ b/pkg/detectors/pipedream/pipedream.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Pipedream,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/pipedrive/pipedrive.go b/pkg/detectors/pipedrive/pipedrive.go
index af1f78246..587de4427 100644
--- a/pkg/detectors/pipedrive/pipedrive.go
+++ b/pkg/detectors/pipedrive/pipedrive.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Pipedrive,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/pivotaltracker/pivotaltracker.go b/pkg/detectors/pivotaltracker/pivotaltracker.go
index e84c51218..c872968bc 100644
--- a/pkg/detectors/pivotaltracker/pivotaltracker.go
+++ b/pkg/detectors/pivotaltracker/pivotaltracker.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
result := detectors.Result{
DetectorType: detector_typepb.DetectorType_PivotalTracker,
Raw: []byte(token),
+ SecretParts: map[string]string{"key": token},
}
if verify {
diff --git a/pkg/detectors/pixabay/pixabay.go b/pkg/detectors/pixabay/pixabay.go
index b345ee3fb..37da38040 100644
--- a/pkg/detectors/pixabay/pixabay.go
+++ b/pkg/detectors/pixabay/pixabay.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Pixabay,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/planetscaledb/planetscaledb.go b/pkg/detectors/planetscaledb/planetscaledb.go
index 9f6d3e111..4a9db7b9a 100644
--- a/pkg/detectors/planetscaledb/planetscaledb.go
+++ b/pkg/detectors/planetscaledb/planetscaledb.go
@@ -12,7 +12,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -44,6 +44,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_PlanetScaleDb,
Raw: []byte(strings.Join([]string{host, username[0], password[0]}, "\t")),
+ SecretParts: map[string]string{
+ "host": host,
+ "username": username[0],
+ "password": password[0],
+ },
}
if verify {
diff --git a/pkg/detectors/planviewleankit/planviewleankit.go b/pkg/detectors/planviewleankit/planviewleankit.go
index 691953631..1aa14091d 100644
--- a/pkg/detectors/planviewleankit/planviewleankit.go
+++ b/pkg/detectors/planviewleankit/planviewleankit.go
@@ -49,6 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_PlanviewLeanKit,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/planyo/planyo.go b/pkg/detectors/planyo/planyo.go
index aadf6b428..f85b7ecf1 100644
--- a/pkg/detectors/planyo/planyo.go
+++ b/pkg/detectors/planyo/planyo.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Planyo,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/plivo/plivo.go b/pkg/detectors/plivo/plivo.go
index 46cc1fa8c..c47de4a29 100644
--- a/pkg/detectors/plivo/plivo.go
+++ b/pkg/detectors/plivo/plivo.go
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -48,7 +48,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
DetectorType: detector_typepb.DetectorType_Plivo,
Redacted: id,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + id),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "id": id,
+ },
+ RawV2: []byte(resMatch + id),
}
stringResMatch := fmt.Sprintf("%s:%s", id, resMatch)
decodeSecret := b64.StdEncoding.EncodeToString([]byte(stringResMatch))
diff --git a/pkg/detectors/podio/podio.go b/pkg/detectors/podio/podio.go
index d8fae06fc..87c9390cb 100644
--- a/pkg/detectors/podio/podio.go
+++ b/pkg/detectors/podio/podio.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Podio,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/pollsapi/pollsapi.go b/pkg/detectors/pollsapi/pollsapi.go
index 1fa414f7f..6d0c92319 100644
--- a/pkg/detectors/pollsapi/pollsapi.go
+++ b/pkg/detectors/pollsapi/pollsapi.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_PollsAPI,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/poloniex/poloniex.go b/pkg/detectors/poloniex/poloniex.go
index faec07c78..584bafb14 100644
--- a/pkg/detectors/poloniex/poloniex.go
+++ b/pkg/detectors/poloniex/poloniex.go
@@ -17,7 +17,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -54,7 +54,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Poloniex,
Raw: []byte(resSecretMatch),
- RawV2: []byte(resMatch + resSecretMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "secret": resSecretMatch,
+ },
+ RawV2: []byte(resMatch + resSecretMatch),
}
if verify {
diff --git a/pkg/detectors/polygon/polygon.go b/pkg/detectors/polygon/polygon.go
index 94fdcc2e0..c206fc309 100644
--- a/pkg/detectors/polygon/polygon.go
+++ b/pkg/detectors/polygon/polygon.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Polygon,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/portainer/portainer.go b/pkg/detectors/portainer/portainer.go
index 920567798..d40a99da1 100644
--- a/pkg/detectors/portainer/portainer.go
+++ b/pkg/detectors/portainer/portainer.go
@@ -56,7 +56,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Portainer,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resEndpointMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "url": resEndpointMatch,
+ },
+ RawV2: []byte(resMatch + resEndpointMatch),
}
if verify {
diff --git a/pkg/detectors/portainertoken/portainertoken.go b/pkg/detectors/portainertoken/portainertoken.go
index 157d3b442..539473799 100644
--- a/pkg/detectors/portainertoken/portainertoken.go
+++ b/pkg/detectors/portainertoken/portainertoken.go
@@ -57,7 +57,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_PortainerToken,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resEndpointMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "url": resEndpointMatch,
+ },
+ RawV2: []byte(resMatch + resEndpointMatch),
}
if verify {
diff --git a/pkg/detectors/positionstack/positionstack.go b/pkg/detectors/positionstack/positionstack.go
index 34607d37e..6e0c3af08 100644
--- a/pkg/detectors/positionstack/positionstack.go
+++ b/pkg/detectors/positionstack/positionstack.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_PositionStack,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/postageapp/postageapp.go b/pkg/detectors/postageapp/postageapp.go
index b6a046edf..8f2935215 100644
--- a/pkg/detectors/postageapp/postageapp.go
+++ b/pkg/detectors/postageapp/postageapp.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_PostageApp,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/postbacks/postbacks.go b/pkg/detectors/postbacks/postbacks.go
index 2dafb0343..341468a80 100644
--- a/pkg/detectors/postbacks/postbacks.go
+++ b/pkg/detectors/postbacks/postbacks.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Postbacks,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/powrbot/powrbot.go b/pkg/detectors/powrbot/powrbot.go
index c61edc8e6..9a1a5d8f7 100644
--- a/pkg/detectors/powrbot/powrbot.go
+++ b/pkg/detectors/powrbot/powrbot.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Powrbot,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/prefect/prefect.go b/pkg/detectors/prefect/prefect.go
index d00a390cd..0d2761eda 100644
--- a/pkg/detectors/prefect/prefect.go
+++ b/pkg/detectors/prefect/prefect.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Prefect,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/privacy/privacy.go b/pkg/detectors/privacy/privacy.go
index 80d014159..da59c9a05 100644
--- a/pkg/detectors/privacy/privacy.go
+++ b/pkg/detectors/privacy/privacy.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Privacy,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/prodpad/prodpad.go b/pkg/detectors/prodpad/prodpad.go
index 8a1e24f67..f3d7f6726 100644
--- a/pkg/detectors/prodpad/prodpad.go
+++ b/pkg/detectors/prodpad/prodpad.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Prodpad,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/prospectcrm/prospectcrm.go b/pkg/detectors/prospectcrm/prospectcrm.go
index 1dfadf915..3ebbbb533 100644
--- a/pkg/detectors/prospectcrm/prospectcrm.go
+++ b/pkg/detectors/prospectcrm/prospectcrm.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ProspectCRM,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/protocolsio/protocolsio.go b/pkg/detectors/protocolsio/protocolsio.go
index fcc8511e6..2e70a028f 100644
--- a/pkg/detectors/protocolsio/protocolsio.go
+++ b/pkg/detectors/protocolsio/protocolsio.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ProtocolsIO,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/proxycrawl/proxycrawl.go b/pkg/detectors/proxycrawl/proxycrawl.go
index eb8fa4772..682a32d76 100644
--- a/pkg/detectors/proxycrawl/proxycrawl.go
+++ b/pkg/detectors/proxycrawl/proxycrawl.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ProxyCrawl,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/pubnubpublishkey/pubnubpublishkey.go b/pkg/detectors/pubnubpublishkey/pubnubpublishkey.go
index 987f71758..281372b32 100644
--- a/pkg/detectors/pubnubpublishkey/pubnubpublishkey.go
+++ b/pkg/detectors/pubnubpublishkey/pubnubpublishkey.go
@@ -51,7 +51,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_PubNubPublishKey,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + "/" + ressubMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "subscribe_key": ressubMatch,
+ },
+ RawV2: []byte(resMatch + "/" + ressubMatch),
}
if verify {
diff --git a/pkg/detectors/pubnubsubscriptionkey/pubnubsubscriptionkey.go b/pkg/detectors/pubnubsubscriptionkey/pubnubsubscriptionkey.go
index 6ead84201..a6e4736c1 100644
--- a/pkg/detectors/pubnubsubscriptionkey/pubnubsubscriptionkey.go
+++ b/pkg/detectors/pubnubsubscriptionkey/pubnubsubscriptionkey.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_PubNubSubscriptionKey,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/pulumi/pulumi.go b/pkg/detectors/pulumi/pulumi.go
index 22f20bed3..c727abe1a 100644
--- a/pkg/detectors/pulumi/pulumi.go
+++ b/pkg/detectors/pulumi/pulumi.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Pulumi,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/purestake/purestake.go b/pkg/detectors/purestake/purestake.go
index 01af28570..e6cc2d5e3 100644
--- a/pkg/detectors/purestake/purestake.go
+++ b/pkg/detectors/purestake/purestake.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_PureStake,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/pushbulletapikey/pushbulletapikey.go b/pkg/detectors/pushbulletapikey/pushbulletapikey.go
index 904a7e7fb..f94e8fb1a 100644
--- a/pkg/detectors/pushbulletapikey/pushbulletapikey.go
+++ b/pkg/detectors/pushbulletapikey/pushbulletapikey.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_PushBulletApiKey,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/pusherchannelkey/pusherchannelkey.go b/pkg/detectors/pusherchannelkey/pusherchannelkey.go
index c25b6d559..f9ba2d993 100644
--- a/pkg/detectors/pusherchannelkey/pusherchannelkey.go
+++ b/pkg/detectors/pusherchannelkey/pusherchannelkey.go
@@ -72,7 +72,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_PusherChannelKey,
Raw: []byte(app),
- RawV2: []byte(app + key),
+ SecretParts: map[string]string{
+ "app": app,
+ "key": key,
+ },
+ RawV2: []byte(app + key),
}
if verify {
diff --git a/pkg/detectors/pypi/pypi.go b/pkg/detectors/pypi/pypi.go
index 684eb0811..7982041fe 100644
--- a/pkg/detectors/pypi/pypi.go
+++ b/pkg/detectors/pypi/pypi.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_PyPI,
Raw: []byte(match),
+ SecretParts: map[string]string{"key": match},
}
if verify {
diff --git a/pkg/detectors/qase/qase.go b/pkg/detectors/qase/qase.go
index 4d49f4c9c..b5a23cfe5 100644
--- a/pkg/detectors/qase/qase.go
+++ b/pkg/detectors/qase/qase.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Qase,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/qualaroo/qualaroo.go b/pkg/detectors/qualaroo/qualaroo.go
index dd501d7d9..a4042e02b 100644
--- a/pkg/detectors/qualaroo/qualaroo.go
+++ b/pkg/detectors/qualaroo/qualaroo.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Qualaroo,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/qubole/qubole.go b/pkg/detectors/qubole/qubole.go
index 759bb3120..32fbf824d 100644
--- a/pkg/detectors/qubole/qubole.go
+++ b/pkg/detectors/qubole/qubole.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Qubole,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/rabbitmq/rabbitmq.go b/pkg/detectors/rabbitmq/rabbitmq.go
index 241c09bc0..af7fcffb2 100644
--- a/pkg/detectors/rabbitmq/rabbitmq.go
+++ b/pkg/detectors/rabbitmq/rabbitmq.go
@@ -62,6 +62,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
r := detectors.Result{
DetectorType: detector_typepb.DetectorType_RabbitMQ,
Raw: []byte(urlMatch),
+ SecretParts: map[string]string{"key": urlMatch},
Redacted: strings.TrimSpace(strings.Replace(parsedURL.String(), password, "********", -1)),
}
diff --git a/pkg/detectors/railwayapp/railwayapp.go b/pkg/detectors/railwayapp/railwayapp.go
index ee6bec093..d0f61bca4 100644
--- a/pkg/detectors/railwayapp/railwayapp.go
+++ b/pkg/detectors/railwayapp/railwayapp.go
@@ -73,6 +73,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_RailwayApp,
Raw: []byte(match),
+ SecretParts: map[string]string{"key": match},
ExtraData: map[string]string{
"rotation_guide": "https://howtorotate.com/docs/tutorials/railwayapp/",
},
diff --git a/pkg/detectors/ramp/ramp.go b/pkg/detectors/ramp/ramp.go
index 3295e9133..a4d6a3df6 100644
--- a/pkg/detectors/ramp/ramp.go
+++ b/pkg/detectors/ramp/ramp.go
@@ -52,7 +52,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Ramp,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + ":" + resSecret),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "secret": resSecret,
+ },
+ RawV2: []byte(resMatch + ":" + resSecret),
}
if verify {
diff --git a/pkg/detectors/rapidapi/rapidapi.go b/pkg/detectors/rapidapi/rapidapi.go
index 2600369e4..5f9bfdcd4 100644
--- a/pkg/detectors/rapidapi/rapidapi.go
+++ b/pkg/detectors/rapidapi/rapidapi.go
@@ -40,6 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_RapidApi,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/raven/raven.go b/pkg/detectors/raven/raven.go
index 0c7da0dcd..4e05da246 100644
--- a/pkg/detectors/raven/raven.go
+++ b/pkg/detectors/raven/raven.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Raven,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/rawg/rawg.go b/pkg/detectors/rawg/rawg.go
index a4d3da7a5..c2f89615d 100644
--- a/pkg/detectors/rawg/rawg.go
+++ b/pkg/detectors/rawg/rawg.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Rawg,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/razorpay/razorpay.go b/pkg/detectors/razorpay/razorpay.go
index b85e46c4a..10cdf4849 100644
--- a/pkg/detectors/razorpay/razorpay.go
+++ b/pkg/detectors/razorpay/razorpay.go
@@ -48,8 +48,12 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_RazorPay,
Raw: []byte(key),
- RawV2: []byte(key + secret),
- Redacted: key,
+ SecretParts: map[string]string{
+ "key": key,
+ "secret": secret,
+ },
+ RawV2: []byte(key + secret),
+ Redacted: key,
}
if verify {
diff --git a/pkg/detectors/reachmail/reachmail.go b/pkg/detectors/reachmail/reachmail.go
index dc676164f..f4797ea95 100644
--- a/pkg/detectors/reachmail/reachmail.go
+++ b/pkg/detectors/reachmail/reachmail.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Reachmail,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/readme/readme.go b/pkg/detectors/readme/readme.go
index 866f43d27..12a286017 100644
--- a/pkg/detectors/readme/readme.go
+++ b/pkg/detectors/readme/readme.go
@@ -38,6 +38,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ReadMe,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/reallysimplesystems/reallysimplesystems.go b/pkg/detectors/reallysimplesystems/reallysimplesystems.go
index dc8772ffb..ea7506c5e 100644
--- a/pkg/detectors/reallysimplesystems/reallysimplesystems.go
+++ b/pkg/detectors/reallysimplesystems/reallysimplesystems.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ReallySimpleSystems,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/rebrandly/rebrandly.go b/pkg/detectors/rebrandly/rebrandly.go
index 4a2faf541..7ce567e42 100644
--- a/pkg/detectors/rebrandly/rebrandly.go
+++ b/pkg/detectors/rebrandly/rebrandly.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Rebrandly,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/rechargepayments/rechargepayments.go b/pkg/detectors/rechargepayments/rechargepayments.go
index 48feaef5d..6cf5282ae 100644
--- a/pkg/detectors/rechargepayments/rechargepayments.go
+++ b/pkg/detectors/rechargepayments/rechargepayments.go
@@ -10,7 +10,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
result := detectors.Result{
DetectorType: detector_typepb.DetectorType_RechargePayments,
Raw: []byte(token),
+ SecretParts: map[string]string{"key": token},
}
if verify {
client := common.SaneHttpClient()
diff --git a/pkg/detectors/redis/redis.go b/pkg/detectors/redis/redis.go
index 641ca20f6..4c4c39f73 100644
--- a/pkg/detectors/redis/redis.go
+++ b/pkg/detectors/redis/redis.go
@@ -61,7 +61,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s := detectors.Result{
DetectorType: detector_typepb.DetectorType_Redis,
Raw: []byte(urlMatch),
- Redacted: redact,
+ SecretParts: map[string]string{
+ "host": parsedURL.Host,
+ "password": password,
+ },
+ Redacted: redact,
}
if verify {
@@ -100,7 +104,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s := detectors.Result{
DetectorType: detector_typepb.DetectorType_Redis,
Raw: []byte(urlMatch),
- Redacted: redact,
+ SecretParts: map[string]string{
+ "host": parsedURL.Host,
+ "password": password,
+ },
+ Redacted: redact,
}
if verify {
diff --git a/pkg/detectors/refiner/refiner.go b/pkg/detectors/refiner/refiner.go
index c543cc195..a226cbdea 100644
--- a/pkg/detectors/refiner/refiner.go
+++ b/pkg/detectors/refiner/refiner.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Refiner,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/rentman/rentman.go b/pkg/detectors/rentman/rentman.go
index a7dd5b31f..d24294923 100644
--- a/pkg/detectors/rentman/rentman.go
+++ b/pkg/detectors/rentman/rentman.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Rentman,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/repairshopr/repairshopr.go b/pkg/detectors/repairshopr/repairshopr.go
index c57d7844b..203096388 100644
--- a/pkg/detectors/repairshopr/repairshopr.go
+++ b/pkg/detectors/repairshopr/repairshopr.go
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Repairshopr,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/replicate/replicate.go b/pkg/detectors/replicate/replicate.go
index c5ef54ec9..04ba7298e 100644
--- a/pkg/detectors/replicate/replicate.go
+++ b/pkg/detectors/replicate/replicate.go
@@ -39,6 +39,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Replicate,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/replyio/replyio.go b/pkg/detectors/replyio/replyio.go
index 880f4b522..b0740ae00 100644
--- a/pkg/detectors/replyio/replyio.go
+++ b/pkg/detectors/replyio/replyio.go
@@ -40,6 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ReplyIO,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/requestfinance/requestfinance.go b/pkg/detectors/requestfinance/requestfinance.go
index b9255e2dc..4f10dbd24 100644
--- a/pkg/detectors/requestfinance/requestfinance.go
+++ b/pkg/detectors/requestfinance/requestfinance.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_RequestFinance,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/restpackhtmltopdfapi/restpackhtmltopdfapi.go b/pkg/detectors/restpackhtmltopdfapi/restpackhtmltopdfapi.go
index 11aea59e8..8f9ec60f6 100644
--- a/pkg/detectors/restpackhtmltopdfapi/restpackhtmltopdfapi.go
+++ b/pkg/detectors/restpackhtmltopdfapi/restpackhtmltopdfapi.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_RestpackHtmlToPdfAPI,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/restpackscreenshotapi/restpackscreenshotapi.go b/pkg/detectors/restpackscreenshotapi/restpackscreenshotapi.go
index 001c2dd44..c4e4652de 100644
--- a/pkg/detectors/restpackscreenshotapi/restpackscreenshotapi.go
+++ b/pkg/detectors/restpackscreenshotapi/restpackscreenshotapi.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_RestpackScreenshotAPI,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/rev/rev.go b/pkg/detectors/rev/rev.go
index 419c1a763..27e7e93c6 100644
--- a/pkg/detectors/rev/rev.go
+++ b/pkg/detectors/rev/rev.go
@@ -12,7 +12,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -49,6 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Rev,
Raw: []byte(resUserMatch),
+ SecretParts: map[string]string{"key": resUserMatch},
}
if verify {
diff --git a/pkg/detectors/revampcrm/revampcrm.go b/pkg/detectors/revampcrm/revampcrm.go
index ae1322cc1..2e4088344 100644
--- a/pkg/detectors/revampcrm/revampcrm.go
+++ b/pkg/detectors/revampcrm/revampcrm.go
@@ -11,7 +11,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -49,6 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_RevampCRM,
Raw: []byte(tokenPatMatch),
+ SecretParts: map[string]string{"key": tokenPatMatch},
}
if verify {
req, err := http.NewRequestWithContext(ctx, "GET", "https://app.revampcrm.com/api/1.0/User/WhoAmI", nil)
diff --git a/pkg/detectors/ringcentral/ringcentral.go b/pkg/detectors/ringcentral/ringcentral.go
index fb09bfdcd..75d7026a9 100644
--- a/pkg/detectors/ringcentral/ringcentral.go
+++ b/pkg/detectors/ringcentral/ringcentral.go
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_RingCentral,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/ritekit/ritekit.go b/pkg/detectors/ritekit/ritekit.go
index f43d48811..692a47388 100644
--- a/pkg/detectors/ritekit/ritekit.go
+++ b/pkg/detectors/ritekit/ritekit.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_RiteKit,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/roaring/roaring.go b/pkg/detectors/roaring/roaring.go
index ea7ddb3da..e6b3b2b7c 100644
--- a/pkg/detectors/roaring/roaring.go
+++ b/pkg/detectors/roaring/roaring.go
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -51,6 +51,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
DetectorType: detector_typepb.DetectorType_Roaring,
Raw: []byte(resClient),
RawV2: []byte(resClient + resSecret),
+ SecretParts: map[string]string{
+ "client_id": resClient,
+ "client_secret": resSecret,
+ },
}
if verify {
diff --git a/pkg/detectors/robinhoodcrypto/robinhoodcrypto.go b/pkg/detectors/robinhoodcrypto/robinhoodcrypto.go
index cddec437b..bbf0d01b0 100644
--- a/pkg/detectors/robinhoodcrypto/robinhoodcrypto.go
+++ b/pkg/detectors/robinhoodcrypto/robinhoodcrypto.go
@@ -61,7 +61,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_RobinhoodCrypto,
Raw: []byte(apiKey),
- RawV2: []byte(apiKey + base64PrivateKey),
+ SecretParts: map[string]string{
+ "key": apiKey,
+ "private_key": base64PrivateKey,
+ },
+ RawV2: []byte(apiKey + base64PrivateKey),
}
if verify {
diff --git a/pkg/detectors/rocketreach/rocketreach.go b/pkg/detectors/rocketreach/rocketreach.go
index 4cfbaacaa..4db1d9250 100644
--- a/pkg/detectors/rocketreach/rocketreach.go
+++ b/pkg/detectors/rocketreach/rocketreach.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_RocketReach,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/rootly/rootly.go b/pkg/detectors/rootly/rootly.go
index 376061c88..524305a14 100644
--- a/pkg/detectors/rootly/rootly.go
+++ b/pkg/detectors/rootly/rootly.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Rootly,
Raw: []byte(match),
+ SecretParts: map[string]string{"key": match},
}
if verify {
diff --git a/pkg/detectors/route4me/route4me.go b/pkg/detectors/route4me/route4me.go
index 8793401d8..696576561 100644
--- a/pkg/detectors/route4me/route4me.go
+++ b/pkg/detectors/route4me/route4me.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Route4me,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/rownd/rownd.go b/pkg/detectors/rownd/rownd.go
index e7be3060f..98999f9b3 100644
--- a/pkg/detectors/rownd/rownd.go
+++ b/pkg/detectors/rownd/rownd.go
@@ -54,7 +54,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Rownd,
Raw: []byte(keyMatch),
- RawV2: []byte(keyMatch + secretMatch),
+ SecretParts: map[string]string{
+ "key": keyMatch,
+ "secret": secretMatch,
+ },
+ RawV2: []byte(keyMatch + secretMatch),
}
if verify {
diff --git a/pkg/detectors/rubygems/rubygems.go b/pkg/detectors/rubygems/rubygems.go
index 011003471..d7dacbce9 100644
--- a/pkg/detectors/rubygems/rubygems.go
+++ b/pkg/detectors/rubygems/rubygems.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_RubyGems,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/runrunit/runrunit.go b/pkg/detectors/runrunit/runrunit.go
index eb8c75634..365e3f8bd 100644
--- a/pkg/detectors/runrunit/runrunit.go
+++ b/pkg/detectors/runrunit/runrunit.go
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_RunRunIt,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/saladcloudapikey/saladcloudapikey.go b/pkg/detectors/saladcloudapikey/saladcloudapikey.go
index 826a94734..e4d5830e0 100644
--- a/pkg/detectors/saladcloudapikey/saladcloudapikey.go
+++ b/pkg/detectors/saladcloudapikey/saladcloudapikey.go
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SaladCloudApiKey,
Raw: []byte(match),
+ SecretParts: map[string]string{"key": match},
ExtraData: map[string]string{
"rotation_guide": "https://howtorotate.com/docs/tutorials/saladcloudapikey/",
},
diff --git a/pkg/detectors/salesblink/salesblink.go b/pkg/detectors/salesblink/salesblink.go
index bbf40df3c..5dfac3d26 100644
--- a/pkg/detectors/salesblink/salesblink.go
+++ b/pkg/detectors/salesblink/salesblink.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Salesblink,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/salescookie/salescookie.go b/pkg/detectors/salescookie/salescookie.go
index 7e24b47b1..b30af186c 100644
--- a/pkg/detectors/salescookie/salescookie.go
+++ b/pkg/detectors/salescookie/salescookie.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Salescookie,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/salesflare/salesflare.go b/pkg/detectors/salesflare/salesflare.go
index b41426607..41b6ebdd3 100644
--- a/pkg/detectors/salesflare/salesflare.go
+++ b/pkg/detectors/salesflare/salesflare.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Salesflare,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/salesforce/salesforce.go b/pkg/detectors/salesforce/salesforce.go
index ef903d8e3..d9d88dd25 100644
--- a/pkg/detectors/salesforce/salesforce.go
+++ b/pkg/detectors/salesforce/salesforce.go
@@ -56,6 +56,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Salesforce,
Raw: []byte(tokenMatch),
+ SecretParts: map[string]string{"key": tokenMatch},
}
if verify {
diff --git a/pkg/detectors/salesforcerefreshtoken/salesforcerefreshtoken.go b/pkg/detectors/salesforcerefreshtoken/salesforcerefreshtoken.go
index 7839ef5fa..2e731f14d 100644
--- a/pkg/detectors/salesforcerefreshtoken/salesforcerefreshtoken.go
+++ b/pkg/detectors/salesforcerefreshtoken/salesforcerefreshtoken.go
@@ -77,6 +77,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
DetectorType: detector_typepb.DetectorType_SalesforceRefreshToken,
Raw: []byte(refreshToken),
RawV2: fmt.Appendf([]byte{}, "%s:%s:%s", refreshToken, key, secret),
+ SecretParts: map[string]string{
+ "refresh_token": refreshToken,
+ "consumer_key": key,
+ "consumer_secret": secret,
+ },
}
if verify {
diff --git a/pkg/detectors/salesmate/salesmate.go b/pkg/detectors/salesmate/salesmate.go
index 017c4e776..1bdadef1d 100644
--- a/pkg/detectors/salesmate/salesmate.go
+++ b/pkg/detectors/salesmate/salesmate.go
@@ -12,7 +12,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Salesmate,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/sanity/sanity.go b/pkg/detectors/sanity/sanity.go
index f9a3bf23a..b207c02e0 100644
--- a/pkg/detectors/sanity/sanity.go
+++ b/pkg/detectors/sanity/sanity.go
@@ -49,6 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Sanity,
Raw: []byte(match),
+ SecretParts: map[string]string{"key": match},
}
if verify {
diff --git a/pkg/detectors/satismeterprojectkey/satismeterprojectkey.go b/pkg/detectors/satismeterprojectkey/satismeterprojectkey.go
index 7cf9e91fc..860c4309e 100644
--- a/pkg/detectors/satismeterprojectkey/satismeterprojectkey.go
+++ b/pkg/detectors/satismeterprojectkey/satismeterprojectkey.go
@@ -53,7 +53,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SatismeterProjectkey,
Raw: []byte(projectID),
- RawV2: []byte(projectID + token),
+ SecretParts: map[string]string{
+ "project_id": projectID,
+ "token": token,
+ },
+ RawV2: []byte(projectID + token),
}
if verify {
diff --git a/pkg/detectors/satismeterwritekey/satismeterwritekey.go b/pkg/detectors/satismeterwritekey/satismeterwritekey.go
index 0f1354754..78f757785 100644
--- a/pkg/detectors/satismeterwritekey/satismeterwritekey.go
+++ b/pkg/detectors/satismeterwritekey/satismeterwritekey.go
@@ -65,7 +65,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SatismeterWritekey,
Raw: []byte(projectID),
- RawV2: []byte(projectID + writeKey),
+ SecretParts: map[string]string{
+ "project_id": projectID,
+ "write_key": writeKey,
+ },
+ RawV2: []byte(projectID + writeKey),
}
if verify {
diff --git a/pkg/detectors/saucelabs/saucelabs.go b/pkg/detectors/saucelabs/saucelabs.go
index 911f4a5d9..d6ee368e0 100644
--- a/pkg/detectors/saucelabs/saucelabs.go
+++ b/pkg/detectors/saucelabs/saucelabs.go
@@ -67,7 +67,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SauceLabs,
Raw: []byte(userName),
- RawV2: []byte(userName + key),
+ SecretParts: map[string]string{
+ "username": userName,
+ "key": key,
+ },
+ RawV2: []byte(userName + key),
ExtraData: map[string]string{
// add base url in extradata to know which base url was used for verification
"Base URL": baseURL,
diff --git a/pkg/detectors/scalewaykey/scalewaykey.go b/pkg/detectors/scalewaykey/scalewaykey.go
index d102ed286..e6fd1189d 100644
--- a/pkg/detectors/scalewaykey/scalewaykey.go
+++ b/pkg/detectors/scalewaykey/scalewaykey.go
@@ -40,6 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ScalewayKey,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/scalr/scalr.go b/pkg/detectors/scalr/scalr.go
index 639d55ddc..e4ef42b8f 100644
--- a/pkg/detectors/scalr/scalr.go
+++ b/pkg/detectors/scalr/scalr.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Scalr,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/scrapeowl/scrapeowl.go b/pkg/detectors/scrapeowl/scrapeowl.go
index 70e67c6d5..a18329bcd 100644
--- a/pkg/detectors/scrapeowl/scrapeowl.go
+++ b/pkg/detectors/scrapeowl/scrapeowl.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Scrapeowl,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/scraperapi/scraperapi.go b/pkg/detectors/scraperapi/scraperapi.go
index 689a3fae3..96f93691f 100644
--- a/pkg/detectors/scraperapi/scraperapi.go
+++ b/pkg/detectors/scraperapi/scraperapi.go
@@ -40,6 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ScraperAPI,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/scraperbox/scraperbox.go b/pkg/detectors/scraperbox/scraperbox.go
index f07971fab..4a12dbad6 100644
--- a/pkg/detectors/scraperbox/scraperbox.go
+++ b/pkg/detectors/scraperbox/scraperbox.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ScraperBox,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/scrapestack/scrapestack.go b/pkg/detectors/scrapestack/scrapestack.go
index c2d723086..50c03e419 100644
--- a/pkg/detectors/scrapestack/scrapestack.go
+++ b/pkg/detectors/scrapestack/scrapestack.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ScrapeStack,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/scrapfly/scrapfly.go b/pkg/detectors/scrapfly/scrapfly.go
index fadfc309d..780f71963 100644
--- a/pkg/detectors/scrapfly/scrapfly.go
+++ b/pkg/detectors/scrapfly/scrapfly.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Scrapfly,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/scrapingant/scrapingant.go b/pkg/detectors/scrapingant/scrapingant.go
index 8bde19f53..75fade77e 100644
--- a/pkg/detectors/scrapingant/scrapingant.go
+++ b/pkg/detectors/scrapingant/scrapingant.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ScrapingAnt,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/scrapingbee/scrapingbee.go b/pkg/detectors/scrapingbee/scrapingbee.go
index a8c371236..02d7896f6 100644
--- a/pkg/detectors/scrapingbee/scrapingbee.go
+++ b/pkg/detectors/scrapingbee/scrapingbee.go
@@ -55,6 +55,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
r := detectors.Result{
DetectorType: detector_typepb.DetectorType_ScrapingBee,
Raw: []byte(key),
+ SecretParts: map[string]string{"key": key},
}
if verify {
diff --git a/pkg/detectors/screenshotapi/screenshotapi.go b/pkg/detectors/screenshotapi/screenshotapi.go
index f7d3ed87d..d4df2c733 100644
--- a/pkg/detectors/screenshotapi/screenshotapi.go
+++ b/pkg/detectors/screenshotapi/screenshotapi.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ScreenshotAPI,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/screenshotlayer/screenshotlayer.go b/pkg/detectors/screenshotlayer/screenshotlayer.go
index fafd1348f..346124a69 100644
--- a/pkg/detectors/screenshotlayer/screenshotlayer.go
+++ b/pkg/detectors/screenshotlayer/screenshotlayer.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ScreenshotLayer,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/scrutinizerci/scrutinizerci.go b/pkg/detectors/scrutinizerci/scrutinizerci.go
index 1a0584b22..61ab7ff46 100644
--- a/pkg/detectors/scrutinizerci/scrutinizerci.go
+++ b/pkg/detectors/scrutinizerci/scrutinizerci.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ScrutinizerCi,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/securitytrails/securitytrails.go b/pkg/detectors/securitytrails/securitytrails.go
index 26a5b5047..d3faffc7a 100644
--- a/pkg/detectors/securitytrails/securitytrails.go
+++ b/pkg/detectors/securitytrails/securitytrails.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SecurityTrails,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/segmentapikey/segmentapikey.go b/pkg/detectors/segmentapikey/segmentapikey.go
index ae8e61269..e7c3c92fb 100644
--- a/pkg/detectors/segmentapikey/segmentapikey.go
+++ b/pkg/detectors/segmentapikey/segmentapikey.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SegmentApiKey,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/selectpdf/selectpdf.go b/pkg/detectors/selectpdf/selectpdf.go
index b22217253..400b7f6b5 100644
--- a/pkg/detectors/selectpdf/selectpdf.go
+++ b/pkg/detectors/selectpdf/selectpdf.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SelectPDF,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/semaphore/semaphore.go b/pkg/detectors/semaphore/semaphore.go
index 5e238cacc..874c36b24 100644
--- a/pkg/detectors/semaphore/semaphore.go
+++ b/pkg/detectors/semaphore/semaphore.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Semaphore,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/sendbird/sendbird.go b/pkg/detectors/sendbird/sendbird.go
index d66e00124..3785de53e 100644
--- a/pkg/detectors/sendbird/sendbird.go
+++ b/pkg/detectors/sendbird/sendbird.go
@@ -55,6 +55,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Sendbird,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
s1.ExtraData = map[string]string{
"rotation_guide": "https://howtorotate.com/docs/tutorials/sendbird/",
diff --git a/pkg/detectors/sendbirdorganizationapi/sendbirdorganizationapi.go b/pkg/detectors/sendbirdorganizationapi/sendbirdorganizationapi.go
index a0431b7e0..10b265e98 100644
--- a/pkg/detectors/sendbirdorganizationapi/sendbirdorganizationapi.go
+++ b/pkg/detectors/sendbirdorganizationapi/sendbirdorganizationapi.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SendbirdOrganizationAPI,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/sendinbluev2/sendinbluev2.go b/pkg/detectors/sendinbluev2/sendinbluev2.go
index 24eca0866..63508b2ea 100644
--- a/pkg/detectors/sendinbluev2/sendinbluev2.go
+++ b/pkg/detectors/sendinbluev2/sendinbluev2.go
@@ -40,6 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SendinBlueV2,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/sentryorgtoken/sentryorgtoken.go b/pkg/detectors/sentryorgtoken/sentryorgtoken.go
index 971a4bb00..5cd24530b 100644
--- a/pkg/detectors/sentryorgtoken/sentryorgtoken.go
+++ b/pkg/detectors/sentryorgtoken/sentryorgtoken.go
@@ -54,6 +54,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SentryOrgToken,
Raw: []byte(orgToken),
+ SecretParts: map[string]string{"key": orgToken},
}
if verify {
diff --git a/pkg/detectors/sentrytoken/v1/sentrytoken.go b/pkg/detectors/sentrytoken/v1/sentrytoken.go
index c62fc056c..f402ebd64 100644
--- a/pkg/detectors/sentrytoken/v1/sentrytoken.go
+++ b/pkg/detectors/sentrytoken/v1/sentrytoken.go
@@ -60,6 +60,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SentryToken,
Raw: []byte(authToken),
+ SecretParts: map[string]string{"key": authToken},
}
if verify {
diff --git a/pkg/detectors/sentrytoken/v2/sentrytoken.go b/pkg/detectors/sentrytoken/v2/sentrytoken.go
index ee65ef57d..2244a35e1 100644
--- a/pkg/detectors/sentrytoken/v2/sentrytoken.go
+++ b/pkg/detectors/sentrytoken/v2/sentrytoken.go
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SentryToken,
Raw: []byte(authToken),
+ SecretParts: map[string]string{"key": authToken},
}
if verify {
diff --git a/pkg/detectors/serphouse/serphouse.go b/pkg/detectors/serphouse/serphouse.go
index a72b2c589..772e0470f 100644
--- a/pkg/detectors/serphouse/serphouse.go
+++ b/pkg/detectors/serphouse/serphouse.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Serphouse,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/serpstack/serpstack.go b/pkg/detectors/serpstack/serpstack.go
index 7cf5e44af..79c905ae0 100644
--- a/pkg/detectors/serpstack/serpstack.go
+++ b/pkg/detectors/serpstack/serpstack.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SerpStack,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/sheety/sheety.go b/pkg/detectors/sheety/sheety.go
index 83ce03878..46f409a52 100644
--- a/pkg/detectors/sheety/sheety.go
+++ b/pkg/detectors/sheety/sheety.go
@@ -49,6 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Sheety,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/sherpadesk/sherpadesk.go b/pkg/detectors/sherpadesk/sherpadesk.go
index ad56d2682..0ec99b5a3 100644
--- a/pkg/detectors/sherpadesk/sherpadesk.go
+++ b/pkg/detectors/sherpadesk/sherpadesk.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Sherpadesk,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/shipday/shipday.go b/pkg/detectors/shipday/shipday.go
index 41e6fcb02..82434b87a 100644
--- a/pkg/detectors/shipday/shipday.go
+++ b/pkg/detectors/shipday/shipday.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Shipday,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/shodankey/shodankey.go b/pkg/detectors/shodankey/shodankey.go
index 49299fb72..1b56b3586 100644
--- a/pkg/detectors/shodankey/shodankey.go
+++ b/pkg/detectors/shodankey/shodankey.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ShodanKey,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/shopifyoauth/shopifyoauth.go b/pkg/detectors/shopifyoauth/shopifyoauth.go
index 1fc0974b6..7603555b7 100644
--- a/pkg/detectors/shopifyoauth/shopifyoauth.go
+++ b/pkg/detectors/shopifyoauth/shopifyoauth.go
@@ -78,6 +78,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
DetectorType: detector_typepb.DetectorType_ShopifyOAuth,
Raw: []byte(secret),
RawV2: fmt.Appendf(nil, "%s:%s:%s", domain, clientId, secret),
+ SecretParts: map[string]string{
+ "domain": domain,
+ "client_id": clientId,
+ "client_secret": secret,
+ },
}
if verify {
diff --git a/pkg/detectors/shortcut/shortcut.go b/pkg/detectors/shortcut/shortcut.go
index 153b54974..0acd21031 100644
--- a/pkg/detectors/shortcut/shortcut.go
+++ b/pkg/detectors/shortcut/shortcut.go
@@ -40,6 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Shortcut,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/shotstack/shotstack.go b/pkg/detectors/shotstack/shotstack.go
index 348179af0..3735ca167 100644
--- a/pkg/detectors/shotstack/shotstack.go
+++ b/pkg/detectors/shotstack/shotstack.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Shotstack,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/shutterstock/shutterstock.go b/pkg/detectors/shutterstock/shutterstock.go
index 096c53966..cdd6f116b 100644
--- a/pkg/detectors/shutterstock/shutterstock.go
+++ b/pkg/detectors/shutterstock/shutterstock.go
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Shutterstock,
Raw: []byte(resSecretMatch),
+ SecretParts: map[string]string{"key": resSecretMatch},
}
if verify {
diff --git a/pkg/detectors/shutterstockoauth/shutterstockoauth.go b/pkg/detectors/shutterstockoauth/shutterstockoauth.go
index 2fb3930a9..61937ec45 100644
--- a/pkg/detectors/shutterstockoauth/shutterstockoauth.go
+++ b/pkg/detectors/shutterstockoauth/shutterstockoauth.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ShutterstockOAuth,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/signable/signable.go b/pkg/detectors/signable/signable.go
index 0ed73cfa0..cf10728ba 100644
--- a/pkg/detectors/signable/signable.go
+++ b/pkg/detectors/signable/signable.go
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Signable,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/signalwire/signalwire.go b/pkg/detectors/signalwire/signalwire.go
index d079ab421..87ce6eae2 100644
--- a/pkg/detectors/signalwire/signalwire.go
+++ b/pkg/detectors/signalwire/signalwire.go
@@ -55,6 +55,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Signalwire,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/signaturit/signaturit.go b/pkg/detectors/signaturit/signaturit.go
index 4a35955e3..e941bc4a3 100644
--- a/pkg/detectors/signaturit/signaturit.go
+++ b/pkg/detectors/signaturit/signaturit.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Signaturit,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/signupgenius/signupgenius.go b/pkg/detectors/signupgenius/signupgenius.go
index 01ac0ffbc..0c1dc4370 100644
--- a/pkg/detectors/signupgenius/signupgenius.go
+++ b/pkg/detectors/signupgenius/signupgenius.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Signupgenius,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/sigopt/sigopt.go b/pkg/detectors/sigopt/sigopt.go
index bd397e95a..68d7c176d 100644
--- a/pkg/detectors/sigopt/sigopt.go
+++ b/pkg/detectors/sigopt/sigopt.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Sigopt,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/simfin/simfin.go b/pkg/detectors/simfin/simfin.go
index 576b092b3..8a079ac2a 100644
--- a/pkg/detectors/simfin/simfin.go
+++ b/pkg/detectors/simfin/simfin.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SimFin,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/simplesat/simplesat.go b/pkg/detectors/simplesat/simplesat.go
index 08c7b565c..d5ea5f216 100644
--- a/pkg/detectors/simplesat/simplesat.go
+++ b/pkg/detectors/simplesat/simplesat.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Simplesat,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/simplynoted/simplynoted.go b/pkg/detectors/simplynoted/simplynoted.go
index 28140fd94..fca259feb 100644
--- a/pkg/detectors/simplynoted/simplynoted.go
+++ b/pkg/detectors/simplynoted/simplynoted.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SimplyNoted,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/simvoly/simvoly.go b/pkg/detectors/simvoly/simvoly.go
index 4440378f1..b4ba6fcb2 100644
--- a/pkg/detectors/simvoly/simvoly.go
+++ b/pkg/detectors/simvoly/simvoly.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Simvoly,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/sinchmessage/sinchmessage.go b/pkg/detectors/sinchmessage/sinchmessage.go
index a5b807d1f..b1f840558 100644
--- a/pkg/detectors/sinchmessage/sinchmessage.go
+++ b/pkg/detectors/sinchmessage/sinchmessage.go
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SinchMessage,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/sirv/sirv.go b/pkg/detectors/sirv/sirv.go
index aa6edeed9..21f135bbb 100644
--- a/pkg/detectors/sirv/sirv.go
+++ b/pkg/detectors/sirv/sirv.go
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Sirv,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/siteleaf/siteleaf.go b/pkg/detectors/siteleaf/siteleaf.go
index 3ca5a510f..f53d506af 100644
--- a/pkg/detectors/siteleaf/siteleaf.go
+++ b/pkg/detectors/siteleaf/siteleaf.go
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Siteleaf,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/skrappio/skrappio.go b/pkg/detectors/skrappio/skrappio.go
index 1842523f1..500c98f0d 100644
--- a/pkg/detectors/skrappio/skrappio.go
+++ b/pkg/detectors/skrappio/skrappio.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Skrappio,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/skybiometry/skybiometry.go b/pkg/detectors/skybiometry/skybiometry.go
index 7f0e114d0..9e65b8413 100644
--- a/pkg/detectors/skybiometry/skybiometry.go
+++ b/pkg/detectors/skybiometry/skybiometry.go
@@ -57,6 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SkyBiometry,
Raw: []byte(secret),
+ SecretParts: map[string]string{"key": secret},
}
if verify {
diff --git a/pkg/detectors/slackwebhook/slackwebhook.go b/pkg/detectors/slackwebhook/slackwebhook.go
index 63e313dfb..c81c33fc1 100644
--- a/pkg/detectors/slackwebhook/slackwebhook.go
+++ b/pkg/detectors/slackwebhook/slackwebhook.go
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SlackWebhook,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
s1.ExtraData = map[string]string{
"rotation_guide": "https://howtorotate.com/docs/tutorials/slack-webhook/",
diff --git a/pkg/detectors/smartsheets/smartsheets.go b/pkg/detectors/smartsheets/smartsheets.go
index e4e313a67..c786343e3 100644
--- a/pkg/detectors/smartsheets/smartsheets.go
+++ b/pkg/detectors/smartsheets/smartsheets.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Smartsheets,
Raw: []byte(key),
+ SecretParts: map[string]string{"key": key},
}
if verify {
diff --git a/pkg/detectors/smartystreets/smartystreets.go b/pkg/detectors/smartystreets/smartystreets.go
index 7ea1d53b9..4e7228f72 100644
--- a/pkg/detectors/smartystreets/smartystreets.go
+++ b/pkg/detectors/smartystreets/smartystreets.go
@@ -12,7 +12,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -49,6 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SmartyStreets,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/smooch/smooch.go b/pkg/detectors/smooch/smooch.go
index 03ae41bb4..85209aecc 100644
--- a/pkg/detectors/smooch/smooch.go
+++ b/pkg/detectors/smooch/smooch.go
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -50,7 +50,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Smooch,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resSecret),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "secret": resSecret,
+ },
+ RawV2: []byte(resMatch + resSecret),
}
if verify {
diff --git a/pkg/detectors/snipcart/snipcart.go b/pkg/detectors/snipcart/snipcart.go
index 97b27b420..ebcb57334 100644
--- a/pkg/detectors/snipcart/snipcart.go
+++ b/pkg/detectors/snipcart/snipcart.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Snipcart,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/snowflake/snowflake.go b/pkg/detectors/snowflake/snowflake.go
index 7ade1dac1..7466baf04 100644
--- a/pkg/detectors/snowflake/snowflake.go
+++ b/pkg/detectors/snowflake/snowflake.go
@@ -123,6 +123,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Snowflake,
Raw: []byte(resPasswordMatch),
+ SecretParts: map[string]string{"key": resPasswordMatch},
ExtraData: map[string]string{
"account": resAccountMatch,
"username": resUsernameMatch,
diff --git a/pkg/detectors/snykkey/snykkey.go b/pkg/detectors/snykkey/snykkey.go
index 0d7c83baa..afe4afdd6 100644
--- a/pkg/detectors/snykkey/snykkey.go
+++ b/pkg/detectors/snykkey/snykkey.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: s.Type(),
Raw: []byte(token),
+ SecretParts: map[string]string{"key": token},
}
if verify {
diff --git a/pkg/detectors/sonarcloud/sonarcloud.go b/pkg/detectors/sonarcloud/sonarcloud.go
index 62dc978a4..6e236f1a7 100644
--- a/pkg/detectors/sonarcloud/sonarcloud.go
+++ b/pkg/detectors/sonarcloud/sonarcloud.go
@@ -55,6 +55,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SonarCloud,
Raw: []byte(match),
+ SecretParts: map[string]string{"key": match},
}
if verify {
diff --git a/pkg/detectors/sourcegraphcody/sourcegraphcody.go b/pkg/detectors/sourcegraphcody/sourcegraphcody.go
index 6a9990039..b26882d05 100644
--- a/pkg/detectors/sourcegraphcody/sourcegraphcody.go
+++ b/pkg/detectors/sourcegraphcody/sourcegraphcody.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SourcegraphCody,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/sparkpost/sparkpost.go b/pkg/detectors/sparkpost/sparkpost.go
index d8c38826f..d5e39e1fd 100644
--- a/pkg/detectors/sparkpost/sparkpost.go
+++ b/pkg/detectors/sparkpost/sparkpost.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Sparkpost,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/speechtextai/speechtextai.go b/pkg/detectors/speechtextai/speechtextai.go
index be9566cda..c090483c5 100644
--- a/pkg/detectors/speechtextai/speechtextai.go
+++ b/pkg/detectors/speechtextai/speechtextai.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SpeechTextAI,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/splunkobservabilitytoken/splunkobservabilitytoken.go b/pkg/detectors/splunkobservabilitytoken/splunkobservabilitytoken.go
index 881929c9f..a15becbae 100644
--- a/pkg/detectors/splunkobservabilitytoken/splunkobservabilitytoken.go
+++ b/pkg/detectors/splunkobservabilitytoken/splunkobservabilitytoken.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SplunkOberservabilityToken,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/spoonacular/spoonacular.go b/pkg/detectors/spoonacular/spoonacular.go
index 86eaef255..ee383d620 100644
--- a/pkg/detectors/spoonacular/spoonacular.go
+++ b/pkg/detectors/spoonacular/spoonacular.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Spoonacular,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/sportsmonk/sportsmonk.go b/pkg/detectors/sportsmonk/sportsmonk.go
index f2285a260..63fe85e66 100644
--- a/pkg/detectors/sportsmonk/sportsmonk.go
+++ b/pkg/detectors/sportsmonk/sportsmonk.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Sportsmonk,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/spotifykey/spotifykey.go b/pkg/detectors/spotifykey/spotifykey.go
index 9bbcde25c..e45c4934a 100644
--- a/pkg/detectors/spotifykey/spotifykey.go
+++ b/pkg/detectors/spotifykey/spotifykey.go
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SpotifyKey,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/sqlserver/sqlserver.go b/pkg/detectors/sqlserver/sqlserver.go
index 101b3a3cd..220974d8f 100644
--- a/pkg/detectors/sqlserver/sqlserver.go
+++ b/pkg/detectors/sqlserver/sqlserver.go
@@ -82,7 +82,13 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
DetectorType: detector_typepb.DetectorType_SQLServer,
Raw: []byte(paramsUnsafe.Password),
RawV2: []byte(paramsUnsafe.URL().String()),
- Redacted: detectors.RedactURL(*paramsUnsafe.URL()),
+ SecretParts: map[string]string{
+ "host": paramsUnsafe.Host,
+ "database": paramsUnsafe.Database,
+ "user": paramsUnsafe.User,
+ "password": paramsUnsafe.Password,
+ },
+ Redacted: detectors.RedactURL(*paramsUnsafe.URL()),
}
if verify {
diff --git a/pkg/detectors/squareapp/squareapp.go b/pkg/detectors/squareapp/squareapp.go
index c15985da7..6e1a240d0 100644
--- a/pkg/detectors/squareapp/squareapp.go
+++ b/pkg/detectors/squareapp/squareapp.go
@@ -75,6 +75,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
result := detectors.Result{
DetectorType: detector_typepb.DetectorType_SquareApp,
Raw: []byte(id),
+ SecretParts: map[string]string{"key": id},
Redacted: id,
ExtraData: map[string]string{},
}
diff --git a/pkg/detectors/squarespace/squarespace.go b/pkg/detectors/squarespace/squarespace.go
index 51f8bafe6..bad86c3c5 100644
--- a/pkg/detectors/squarespace/squarespace.go
+++ b/pkg/detectors/squarespace/squarespace.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Squarespace,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/sslmate/sslmate.go b/pkg/detectors/sslmate/sslmate.go
index f1c61db86..ea931dd98 100644
--- a/pkg/detectors/sslmate/sslmate.go
+++ b/pkg/detectors/sslmate/sslmate.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SslMate,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/statuscake/statuscake.go b/pkg/detectors/statuscake/statuscake.go
index 21d92cc2a..0eb8f395e 100644
--- a/pkg/detectors/statuscake/statuscake.go
+++ b/pkg/detectors/statuscake/statuscake.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Statuscake,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/statuspage/statuspage.go b/pkg/detectors/statuspage/statuspage.go
index aa3f01435..bab989d21 100644
--- a/pkg/detectors/statuspage/statuspage.go
+++ b/pkg/detectors/statuspage/statuspage.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Statuspage,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/statuspal/statuspal.go b/pkg/detectors/statuspal/statuspal.go
index 17f9fae73..a7ab099ba 100644
--- a/pkg/detectors/statuspal/statuspal.go
+++ b/pkg/detectors/statuspal/statuspal.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Statuspal,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/stitchdata/stitchdata.go b/pkg/detectors/stitchdata/stitchdata.go
index 1506b69ef..dfd5a3f99 100644
--- a/pkg/detectors/stitchdata/stitchdata.go
+++ b/pkg/detectors/stitchdata/stitchdata.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Stitchdata,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/stockdata/stockdata.go b/pkg/detectors/stockdata/stockdata.go
index 0e13bb843..d8de59edf 100644
--- a/pkg/detectors/stockdata/stockdata.go
+++ b/pkg/detectors/stockdata/stockdata.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Stockdata,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/storecove/storecove.go b/pkg/detectors/storecove/storecove.go
index 60b31fe70..a019b323a 100644
--- a/pkg/detectors/storecove/storecove.go
+++ b/pkg/detectors/storecove/storecove.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Storecove,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/stormboard/stormboard.go b/pkg/detectors/stormboard/stormboard.go
index 02477e623..e7b2ede18 100644
--- a/pkg/detectors/stormboard/stormboard.go
+++ b/pkg/detectors/stormboard/stormboard.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Stormboard,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/stormglass/stormglass.go b/pkg/detectors/stormglass/stormglass.go
index 540d6e814..7bad5e5cc 100644
--- a/pkg/detectors/stormglass/stormglass.go
+++ b/pkg/detectors/stormglass/stormglass.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Stormglass,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/storyblok/storyblok.go b/pkg/detectors/storyblok/storyblok.go
index fc3a07c1d..a12f424fb 100644
--- a/pkg/detectors/storyblok/storyblok.go
+++ b/pkg/detectors/storyblok/storyblok.go
@@ -54,6 +54,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_StoryblokAccessToken,
Raw: []byte(accessToken),
+ SecretParts: map[string]string{"key": accessToken},
}
if verify {
diff --git a/pkg/detectors/storyblokpersonalaccesstoken/storyblok.go b/pkg/detectors/storyblokpersonalaccesstoken/storyblok.go
index 72c9343de..70fe26ac3 100644
--- a/pkg/detectors/storyblokpersonalaccesstoken/storyblok.go
+++ b/pkg/detectors/storyblokpersonalaccesstoken/storyblok.go
@@ -55,6 +55,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_StoryblokPersonalAccessToken,
Raw: []byte(pat),
+ SecretParts: map[string]string{"key": pat},
}
if verify {
diff --git a/pkg/detectors/storychief/storychief.go b/pkg/detectors/storychief/storychief.go
index 8d0236f11..94c371d7c 100644
--- a/pkg/detectors/storychief/storychief.go
+++ b/pkg/detectors/storychief/storychief.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Storychief,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/strava/strava.go b/pkg/detectors/strava/strava.go
index bcc722c4a..bcb11cc86 100644
--- a/pkg/detectors/strava/strava.go
+++ b/pkg/detectors/strava/strava.go
@@ -11,7 +11,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -53,7 +53,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Strava,
Raw: []byte(resId),
- RawV2: []byte(resId + resSecret),
+ SecretParts: map[string]string{
+ "id": resId,
+ "secret": resSecret,
+ },
+ RawV2: []byte(resId + resSecret),
}
if verify {
diff --git a/pkg/detectors/streak/streak.go b/pkg/detectors/streak/streak.go
index 48e9d3d42..4d16eb958 100644
--- a/pkg/detectors/streak/streak.go
+++ b/pkg/detectors/streak/streak.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Streak,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/stripepaymentintent/stripepaymentintent.go b/pkg/detectors/stripepaymentintent/stripepaymentintent.go
index cbe30ba79..386395c0d 100644
--- a/pkg/detectors/stripepaymentintent/stripepaymentintent.go
+++ b/pkg/detectors/stripepaymentintent/stripepaymentintent.go
@@ -65,7 +65,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) ([]dete
result := detectors.Result{
DetectorType: detector_typepb.DetectorType_StripePaymentIntent,
Raw: []byte(clientSecret),
- RawV2: []byte(clientSecret + key),
+ SecretParts: map[string]string{
+ "client_secret": clientSecret,
+ "key": key,
+ },
+ RawV2: []byte(clientSecret + key),
ExtraData: map[string]string{
"key_type": "secret",
},
@@ -84,7 +88,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) ([]dete
result := detectors.Result{
DetectorType: detector_typepb.DetectorType_StripePaymentIntent,
Raw: []byte(clientSecret),
- RawV2: []byte(clientSecret + key),
+ SecretParts: map[string]string{
+ "client_secret": clientSecret,
+ "key": key,
+ },
+ RawV2: []byte(clientSecret + key),
ExtraData: map[string]string{
"key_type": "publishable",
},
diff --git a/pkg/detectors/stripo/stripo.go b/pkg/detectors/stripo/stripo.go
index 8b0dcff61..02e42976e 100644
--- a/pkg/detectors/stripo/stripo.go
+++ b/pkg/detectors/stripo/stripo.go
@@ -40,6 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Stripo,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/stytch/stytch.go b/pkg/detectors/stytch/stytch.go
index 5ac865095..00c25fb6f 100644
--- a/pkg/detectors/stytch/stytch.go
+++ b/pkg/detectors/stytch/stytch.go
@@ -11,7 +11,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Stytch,
Raw: []byte(tokenPatMatch),
+ SecretParts: map[string]string{"key": tokenPatMatch},
}
if verify {
diff --git a/pkg/detectors/sugester/sugester.go b/pkg/detectors/sugester/sugester.go
index a7317d202..8f75b4463 100644
--- a/pkg/detectors/sugester/sugester.go
+++ b/pkg/detectors/sugester/sugester.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Sugester,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/sumologickey/sumologickey.go b/pkg/detectors/sumologickey/sumologickey.go
index b264be97e..31eadc6b2 100644
--- a/pkg/detectors/sumologickey/sumologickey.go
+++ b/pkg/detectors/sumologickey/sumologickey.go
@@ -142,6 +142,7 @@ func createResult(accessId string, accessKey string, endpoint string, verified b
r := &detectors.Result{
DetectorType: detector_typepb.DetectorType_SumoLogicKey,
Raw: []byte(accessKey),
+ SecretParts: map[string]string{"key": accessKey},
Verified: verified,
ExtraData: map[string]string{
"rotation_guide": "https://howtorotate.com/docs/tutorials/sumologic/",
diff --git a/pkg/detectors/supabasetoken/supabasetoken.go b/pkg/detectors/supabasetoken/supabasetoken.go
index 61e01af8e..35c54bf29 100644
--- a/pkg/detectors/supabasetoken/supabasetoken.go
+++ b/pkg/detectors/supabasetoken/supabasetoken.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SupabaseToken,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/supernotesapi/supernotesapi.go b/pkg/detectors/supernotesapi/supernotesapi.go
index 3cd89a977..de4410245 100644
--- a/pkg/detectors/supernotesapi/supernotesapi.go
+++ b/pkg/detectors/supernotesapi/supernotesapi.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SuperNotesAPI,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/surveyanyplace/surveyanyplace.go b/pkg/detectors/surveyanyplace/surveyanyplace.go
index b3b9354d8..f24eaa544 100644
--- a/pkg/detectors/surveyanyplace/surveyanyplace.go
+++ b/pkg/detectors/surveyanyplace/surveyanyplace.go
@@ -12,7 +12,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -49,6 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SurveyAnyplace,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/surveybot/surveybot.go b/pkg/detectors/surveybot/surveybot.go
index f9154585d..232722d0a 100644
--- a/pkg/detectors/surveybot/surveybot.go
+++ b/pkg/detectors/surveybot/surveybot.go
@@ -46,6 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SurveyBot,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/surveysparrow/surveysparrow.go b/pkg/detectors/surveysparrow/surveysparrow.go
index 29d3229a0..1edd6f013 100644
--- a/pkg/detectors/surveysparrow/surveysparrow.go
+++ b/pkg/detectors/surveysparrow/surveysparrow.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_SurveySparrow,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/survicate/survicate.go b/pkg/detectors/survicate/survicate.go
index 98f948a6b..400341852 100644
--- a/pkg/detectors/survicate/survicate.go
+++ b/pkg/detectors/survicate/survicate.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Survicate,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/swell/swell.go b/pkg/detectors/swell/swell.go
index 553598b7c..585e41579 100644
--- a/pkg/detectors/swell/swell.go
+++ b/pkg/detectors/swell/swell.go
@@ -49,6 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Swell,
Raw: []byte(tokenPatMatch),
+ SecretParts: map[string]string{"key": tokenPatMatch},
}
if verify {
req, err := http.NewRequestWithContext(ctx, "GET", "https://api.swell.store/products?limit=100", nil)
diff --git a/pkg/detectors/swiftype/swiftype.go b/pkg/detectors/swiftype/swiftype.go
index 3312d7b7c..acd67dab0 100644
--- a/pkg/detectors/swiftype/swiftype.go
+++ b/pkg/detectors/swiftype/swiftype.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Swiftype,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/tailscale/tailscale.go b/pkg/detectors/tailscale/tailscale.go
index 3a8fc7f98..e155c5312 100644
--- a/pkg/detectors/tailscale/tailscale.go
+++ b/pkg/detectors/tailscale/tailscale.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Tailscale,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/tallyfy/tallyfy.go b/pkg/detectors/tallyfy/tallyfy.go
index 288960b4a..cfb003bae 100644
--- a/pkg/detectors/tallyfy/tallyfy.go
+++ b/pkg/detectors/tallyfy/tallyfy.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Tallyfy,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/tatumio/tatumio.go b/pkg/detectors/tatumio/tatumio.go
index 74db4ef8c..9c0494b45 100644
--- a/pkg/detectors/tatumio/tatumio.go
+++ b/pkg/detectors/tatumio/tatumio.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_TatumIO,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/taxjar/taxjar.go b/pkg/detectors/taxjar/taxjar.go
index 13a22fa0f..3707612a9 100644
--- a/pkg/detectors/taxjar/taxjar.go
+++ b/pkg/detectors/taxjar/taxjar.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Taxjar,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/teamgate/teamgate.go b/pkg/detectors/teamgate/teamgate.go
index 89ede44d1..dc87d52b7 100644
--- a/pkg/detectors/teamgate/teamgate.go
+++ b/pkg/detectors/teamgate/teamgate.go
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Teamgate,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
req, err := http.NewRequestWithContext(ctx, "GET", "https://api.teamgate.com/v4/users", nil)
diff --git a/pkg/detectors/teamworkcrm/teamworkcrm.go b/pkg/detectors/teamworkcrm/teamworkcrm.go
index 9a676023d..6f5387d46 100644
--- a/pkg/detectors/teamworkcrm/teamworkcrm.go
+++ b/pkg/detectors/teamworkcrm/teamworkcrm.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_TeamworkCRM,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/teamworkdesk/teamworkdesk.go b/pkg/detectors/teamworkdesk/teamworkdesk.go
index 10dfaead7..507171c29 100644
--- a/pkg/detectors/teamworkdesk/teamworkdesk.go
+++ b/pkg/detectors/teamworkdesk/teamworkdesk.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_TeamworkDesk,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/teamworkspaces/teamworkspaces.go b/pkg/detectors/teamworkspaces/teamworkspaces.go
index c8fe2c81f..c2fcd8d2a 100644
--- a/pkg/detectors/teamworkspaces/teamworkspaces.go
+++ b/pkg/detectors/teamworkspaces/teamworkspaces.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_TeamworkSpaces,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/technicalanalysisapi/technicalanalysisapi.go b/pkg/detectors/technicalanalysisapi/technicalanalysisapi.go
index dcc01241a..2ec3dbdf1 100644
--- a/pkg/detectors/technicalanalysisapi/technicalanalysisapi.go
+++ b/pkg/detectors/technicalanalysisapi/technicalanalysisapi.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_TechnicalAnalysisApi,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/tefter/tefter.go b/pkg/detectors/tefter/tefter.go
index 2027d0293..93eba4b0b 100644
--- a/pkg/detectors/tefter/tefter.go
+++ b/pkg/detectors/tefter/tefter.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Tefter,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/telegrambottoken/telegrambottoken.go b/pkg/detectors/telegrambottoken/telegrambottoken.go
index 162ed7c57..6010fadbc 100644
--- a/pkg/detectors/telegrambottoken/telegrambottoken.go
+++ b/pkg/detectors/telegrambottoken/telegrambottoken.go
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_TelegramBotToken,
Raw: []byte(key),
+ SecretParts: map[string]string{"key": key},
}
if verify {
diff --git a/pkg/detectors/teletype/teletype.go b/pkg/detectors/teletype/teletype.go
index 12736fd94..7368e6516 100644
--- a/pkg/detectors/teletype/teletype.go
+++ b/pkg/detectors/teletype/teletype.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Teletype,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/telnyx/telnyx.go b/pkg/detectors/telnyx/telnyx.go
index 4b963ee12..d6af0965c 100644
--- a/pkg/detectors/telnyx/telnyx.go
+++ b/pkg/detectors/telnyx/telnyx.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Telnyx,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/terraformcloudpersonaltoken/terraformcloudpersonaltoken.go b/pkg/detectors/terraformcloudpersonaltoken/terraformcloudpersonaltoken.go
index 48ec8d7e5..5c1adf13c 100644
--- a/pkg/detectors/terraformcloudpersonaltoken/terraformcloudpersonaltoken.go
+++ b/pkg/detectors/terraformcloudpersonaltoken/terraformcloudpersonaltoken.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_TerraformCloudPersonalToken,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/testingbot/testingbot.go b/pkg/detectors/testingbot/testingbot.go
index 5539f4bcc..64e283abd 100644
--- a/pkg/detectors/testingbot/testingbot.go
+++ b/pkg/detectors/testingbot/testingbot.go
@@ -57,6 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_TestingBot,
Raw: []byte(key),
+ SecretParts: map[string]string{"key": key},
}
if verify {
diff --git a/pkg/detectors/textmagic/textmagic.go b/pkg/detectors/textmagic/textmagic.go
index a1b102df4..3efefa834 100644
--- a/pkg/detectors/textmagic/textmagic.go
+++ b/pkg/detectors/textmagic/textmagic.go
@@ -50,7 +50,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Textmagic,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resUser),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "username": resUser,
+ },
+ RawV2: []byte(resMatch + resUser),
}
if verify {
diff --git a/pkg/detectors/theoddsapi/theoddsapi.go b/pkg/detectors/theoddsapi/theoddsapi.go
index 67dd3faa1..60ee52ec4 100644
--- a/pkg/detectors/theoddsapi/theoddsapi.go
+++ b/pkg/detectors/theoddsapi/theoddsapi.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_TheOddsApi,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/thinkific/thinkific.go b/pkg/detectors/thinkific/thinkific.go
index d07457d30..bdbcbcb34 100644
--- a/pkg/detectors/thinkific/thinkific.go
+++ b/pkg/detectors/thinkific/thinkific.go
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Thinkific,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/thousandeyes/thousandeyes.go b/pkg/detectors/thousandeyes/thousandeyes.go
index 71880b429..7bc3df09c 100644
--- a/pkg/detectors/thousandeyes/thousandeyes.go
+++ b/pkg/detectors/thousandeyes/thousandeyes.go
@@ -11,7 +11,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -49,6 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ThousandEyes,
Raw: []byte(tokenPatMatch),
+ SecretParts: map[string]string{"key": tokenPatMatch},
}
if verify {
diff --git a/pkg/detectors/ticketmaster/ticketmaster.go b/pkg/detectors/ticketmaster/ticketmaster.go
index e0cb4ad29..e7c68dcce 100644
--- a/pkg/detectors/ticketmaster/ticketmaster.go
+++ b/pkg/detectors/ticketmaster/ticketmaster.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_TicketMaster,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/tickettailor/tickettailor.go b/pkg/detectors/tickettailor/tickettailor.go
index 7bad33fa1..5a4d74502 100644
--- a/pkg/detectors/tickettailor/tickettailor.go
+++ b/pkg/detectors/tickettailor/tickettailor.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Tickettailor,
Raw: []byte(key),
+ SecretParts: map[string]string{"key": key},
}
if verify {
diff --git a/pkg/detectors/tiingo/tiingo.go b/pkg/detectors/tiingo/tiingo.go
index 7c36d734e..3a1e124ea 100644
--- a/pkg/detectors/tiingo/tiingo.go
+++ b/pkg/detectors/tiingo/tiingo.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Tiingo,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/timecamp/timecamp.go b/pkg/detectors/timecamp/timecamp.go
index a2405a498..168b6e333 100644
--- a/pkg/detectors/timecamp/timecamp.go
+++ b/pkg/detectors/timecamp/timecamp.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_TimeCamp,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/timezoneapi/timezoneapi.go b/pkg/detectors/timezoneapi/timezoneapi.go
index 71d3433b5..a1433612c 100644
--- a/pkg/detectors/timezoneapi/timezoneapi.go
+++ b/pkg/detectors/timezoneapi/timezoneapi.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Timezoneapi,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/tineswebhook/tineswebhook.go b/pkg/detectors/tineswebhook/tineswebhook.go
index 839647215..55415b2cc 100644
--- a/pkg/detectors/tineswebhook/tineswebhook.go
+++ b/pkg/detectors/tineswebhook/tineswebhook.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_TinesWebhook,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/tly/tly.go b/pkg/detectors/tly/tly.go
index 13a74a3c7..8e38eafe9 100644
--- a/pkg/detectors/tly/tly.go
+++ b/pkg/detectors/tly/tly.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_TLy,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/tmetric/tmetric.go b/pkg/detectors/tmetric/tmetric.go
index 114fe4c84..c9d6e8b0e 100644
--- a/pkg/detectors/tmetric/tmetric.go
+++ b/pkg/detectors/tmetric/tmetric.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Tmetric,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/todoist/todoist.go b/pkg/detectors/todoist/todoist.go
index 1161e97be..6181f9d72 100644
--- a/pkg/detectors/todoist/todoist.go
+++ b/pkg/detectors/todoist/todoist.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Todoist,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/toggltrack/toggltrack.go b/pkg/detectors/toggltrack/toggltrack.go
index cdaddb52f..d646f1af6 100644
--- a/pkg/detectors/toggltrack/toggltrack.go
+++ b/pkg/detectors/toggltrack/toggltrack.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_TogglTrack,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/tokeet/tokeet.go b/pkg/detectors/tokeet/tokeet.go
index 092e025ac..e0823f10a 100644
--- a/pkg/detectors/tokeet/tokeet.go
+++ b/pkg/detectors/tokeet/tokeet.go
@@ -12,7 +12,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -49,6 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Tokeet,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://capi.tokeet.com/v1/user?account=%s", resIdMatch), nil)
diff --git a/pkg/detectors/tomorrowio/tomorrowio.go b/pkg/detectors/tomorrowio/tomorrowio.go
index 039a238e3..4a9011ac8 100644
--- a/pkg/detectors/tomorrowio/tomorrowio.go
+++ b/pkg/detectors/tomorrowio/tomorrowio.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_TomorrowIO,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/tomtom/tomtom.go b/pkg/detectors/tomtom/tomtom.go
index 5fccc94d5..007f1eeb0 100644
--- a/pkg/detectors/tomtom/tomtom.go
+++ b/pkg/detectors/tomtom/tomtom.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Tomtom,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/tradier/tradier.go b/pkg/detectors/tradier/tradier.go
index 0ce499355..dedd679e9 100644
--- a/pkg/detectors/tradier/tradier.go
+++ b/pkg/detectors/tradier/tradier.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Tradier,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/transferwise/transferwise.go b/pkg/detectors/transferwise/transferwise.go
index b0ba38e91..1fa16c9e8 100644
--- a/pkg/detectors/transferwise/transferwise.go
+++ b/pkg/detectors/transferwise/transferwise.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Transferwise,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/travelpayouts/travelpayouts.go b/pkg/detectors/travelpayouts/travelpayouts.go
index 32beac624..aaee81115 100644
--- a/pkg/detectors/travelpayouts/travelpayouts.go
+++ b/pkg/detectors/travelpayouts/travelpayouts.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_TravelPayouts,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/travisci/travisci.go b/pkg/detectors/travisci/travisci.go
index 4bc036cd3..bcfbbd033 100644
--- a/pkg/detectors/travisci/travisci.go
+++ b/pkg/detectors/travisci/travisci.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_TravisCI,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/trelloapikey/trelloapikey.go b/pkg/detectors/trelloapikey/trelloapikey.go
index c319259f9..ed6962486 100644
--- a/pkg/detectors/trelloapikey/trelloapikey.go
+++ b/pkg/detectors/trelloapikey/trelloapikey.go
@@ -11,7 +11,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
DetectorType: detector_typepb.DetectorType_TrelloApiKey,
Redacted: resMatch,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/tru/tru.go b/pkg/detectors/tru/tru.go
index 707350c53..3ba432c35 100644
--- a/pkg/detectors/tru/tru.go
+++ b/pkg/detectors/tru/tru.go
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -49,7 +49,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Tru,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + resSecret),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "secret": resSecret,
+ },
+ RawV2: []byte(resMatch + resSecret),
}
if verify {
diff --git a/pkg/detectors/trufflehogenterprise/trufflehogenterprise.go b/pkg/detectors/trufflehogenterprise/trufflehogenterprise.go
index 3485212f9..d0415b3c8 100644
--- a/pkg/detectors/trufflehogenterprise/trufflehogenterprise.go
+++ b/pkg/detectors/trufflehogenterprise/trufflehogenterprise.go
@@ -54,6 +54,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_TrufflehogEnterprise,
Raw: []byte(resKeyMatch),
+ SecretParts: map[string]string{"key": resKeyMatch},
}
if verify {
diff --git a/pkg/detectors/twelvedata/twelvedata.go b/pkg/detectors/twelvedata/twelvedata.go
index cdb123aa7..5f779eea7 100644
--- a/pkg/detectors/twelvedata/twelvedata.go
+++ b/pkg/detectors/twelvedata/twelvedata.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_TwelveData,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/twist/twist.go b/pkg/detectors/twist/twist.go
index 383390df0..c59f90cf8 100644
--- a/pkg/detectors/twist/twist.go
+++ b/pkg/detectors/twist/twist.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Twist,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/twitch/twitch.go b/pkg/detectors/twitch/twitch.go
index 42d61776c..c5276b9b4 100644
--- a/pkg/detectors/twitch/twitch.go
+++ b/pkg/detectors/twitch/twitch.go
@@ -63,7 +63,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Twitch,
Raw: []byte(id),
- RawV2: []byte(id + ":" + secret),
+ SecretParts: map[string]string{
+ "id": id,
+ "secret": secret,
+ },
+ RawV2: []byte(id + ":" + secret),
}
if verify {
diff --git a/pkg/detectors/twitchaccesstoken/twitchaccesstoken.go b/pkg/detectors/twitchaccesstoken/twitchaccesstoken.go
index c6b937645..9a11e2b13 100644
--- a/pkg/detectors/twitchaccesstoken/twitchaccesstoken.go
+++ b/pkg/detectors/twitchaccesstoken/twitchaccesstoken.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_TwitchAccessToken,
Raw: []byte(match),
+ SecretParts: map[string]string{"key": match},
}
if verify {
diff --git a/pkg/detectors/twitter/v1/twitter_v1.go b/pkg/detectors/twitter/v1/twitter_v1.go
index eebca0be0..094288f18 100644
--- a/pkg/detectors/twitter/v1/twitter_v1.go
+++ b/pkg/detectors/twitter/v1/twitter_v1.go
@@ -53,6 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Twitter,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
ExtraData: map[string]string{
"version": fmt.Sprintf("%d", s.Version()),
},
diff --git a/pkg/detectors/twitter/v2/twitter_v2.go b/pkg/detectors/twitter/v2/twitter_v2.go
index 61b6f63a2..88f8eb5c1 100644
--- a/pkg/detectors/twitter/v2/twitter_v2.go
+++ b/pkg/detectors/twitter/v2/twitter_v2.go
@@ -54,6 +54,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Twitter,
Raw: []byte(match),
+ SecretParts: map[string]string{"key": match},
ExtraData: map[string]string{
"version": fmt.Sprintf("%d", s.Version()),
},
diff --git a/pkg/detectors/twitterconsumerkey/twitterconsumerkey.go b/pkg/detectors/twitterconsumerkey/twitterconsumerkey.go
index 9c673a18d..3a6687b9b 100644
--- a/pkg/detectors/twitterconsumerkey/twitterconsumerkey.go
+++ b/pkg/detectors/twitterconsumerkey/twitterconsumerkey.go
@@ -59,7 +59,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_TwitterConsumerkey,
Raw: []byte(key),
- RawV2: []byte(key + secret),
+ SecretParts: map[string]string{
+ "key": key,
+ "secret": secret,
+ },
+ RawV2: []byte(key + secret),
}
if verify {
diff --git a/pkg/detectors/tyntec/tyntec.go b/pkg/detectors/tyntec/tyntec.go
index 33999b872..692fa4907 100644
--- a/pkg/detectors/tyntec/tyntec.go
+++ b/pkg/detectors/tyntec/tyntec.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Tyntec,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/typeform/v1/typeform.go b/pkg/detectors/typeform/v1/typeform.go
index 1ebd5973c..05c3523c6 100644
--- a/pkg/detectors/typeform/v1/typeform.go
+++ b/pkg/detectors/typeform/v1/typeform.go
@@ -46,6 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Typeform,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/typeform/v2/typeform.go b/pkg/detectors/typeform/v2/typeform.go
index e83f73594..89885dc08 100644
--- a/pkg/detectors/typeform/v2/typeform.go
+++ b/pkg/detectors/typeform/v2/typeform.go
@@ -60,6 +60,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Typeform,
Raw: []byte(match),
+ SecretParts: map[string]string{"key": match},
}
if verify {
diff --git a/pkg/detectors/typetalk/typetalk.go b/pkg/detectors/typetalk/typetalk.go
index a844c5266..c27764be4 100644
--- a/pkg/detectors/typetalk/typetalk.go
+++ b/pkg/detectors/typetalk/typetalk.go
@@ -12,7 +12,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -49,6 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Typetalk,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/ubidots/ubidots.go b/pkg/detectors/ubidots/ubidots.go
index 2239b0ddf..b18ea4e18 100644
--- a/pkg/detectors/ubidots/ubidots.go
+++ b/pkg/detectors/ubidots/ubidots.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Ubidots,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/uclassify/uclassify.go b/pkg/detectors/uclassify/uclassify.go
index bf120fbd3..c97189fe7 100644
--- a/pkg/detectors/uclassify/uclassify.go
+++ b/pkg/detectors/uclassify/uclassify.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Uclassify,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/unifyid/unifyid.go b/pkg/detectors/unifyid/unifyid.go
index 26d44bb86..25a4b2ad5 100644
--- a/pkg/detectors/unifyid/unifyid.go
+++ b/pkg/detectors/unifyid/unifyid.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_UnifyID,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/unplugg/unplugg.go b/pkg/detectors/unplugg/unplugg.go
index 656a3d862..981d9381f 100644
--- a/pkg/detectors/unplugg/unplugg.go
+++ b/pkg/detectors/unplugg/unplugg.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Unplugg,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/unsplash/unsplash.go b/pkg/detectors/unsplash/unsplash.go
index 5f3c16884..fce516866 100644
--- a/pkg/detectors/unsplash/unsplash.go
+++ b/pkg/detectors/unsplash/unsplash.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Unsplash,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/upcdatabase/upcdatabase.go b/pkg/detectors/upcdatabase/upcdatabase.go
index 3e26337e1..b0227be30 100644
--- a/pkg/detectors/upcdatabase/upcdatabase.go
+++ b/pkg/detectors/upcdatabase/upcdatabase.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_UPCDatabase,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/uplead/uplead.go b/pkg/detectors/uplead/uplead.go
index d04a029f8..536300baa 100644
--- a/pkg/detectors/uplead/uplead.go
+++ b/pkg/detectors/uplead/uplead.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Uplead,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/uploadcare/uploadcare.go b/pkg/detectors/uploadcare/uploadcare.go
index f4e41890d..12ba6f78e 100644
--- a/pkg/detectors/uploadcare/uploadcare.go
+++ b/pkg/detectors/uploadcare/uploadcare.go
@@ -12,7 +12,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_UploadCare,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/uptimerobot/uptimerobot.go b/pkg/detectors/uptimerobot/uptimerobot.go
index a959ac9bb..18c372f8a 100644
--- a/pkg/detectors/uptimerobot/uptimerobot.go
+++ b/pkg/detectors/uptimerobot/uptimerobot.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_UptimeRobot,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/upwave/upwave.go b/pkg/detectors/upwave/upwave.go
index 1a1a99494..95d22f650 100644
--- a/pkg/detectors/upwave/upwave.go
+++ b/pkg/detectors/upwave/upwave.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Upwave,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/uri/uri.go b/pkg/detectors/uri/uri.go
index 8a357cbd3..e36ccdf56 100644
--- a/pkg/detectors/uri/uri.go
+++ b/pkg/detectors/uri/uri.go
@@ -101,7 +101,12 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
DetectorType: detector_typepb.DetectorType_URI,
Raw: []byte(rawUrlWithoutPath),
RawV2: []byte(rawUrlWithPath),
- Redacted: detectors.RedactURL(*parsedURL),
+ SecretParts: map[string]string{
+ "host": parsedURL.Host,
+ "username": parsedURL.User.Username(),
+ "password": password,
+ },
+ Redacted: detectors.RedactURL(*parsedURL),
}
if verify {
diff --git a/pkg/detectors/urlscan/urlscan.go b/pkg/detectors/urlscan/urlscan.go
index e3b3e56c8..2291df6af 100644
--- a/pkg/detectors/urlscan/urlscan.go
+++ b/pkg/detectors/urlscan/urlscan.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Urlscan,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/user/user.go b/pkg/detectors/user/user.go
index 0e6a17099..50c224226 100644
--- a/pkg/detectors/user/user.go
+++ b/pkg/detectors/user/user.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_User,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/userflow/userflow.go b/pkg/detectors/userflow/userflow.go
index 267bfbe14..118ce97f6 100644
--- a/pkg/detectors/userflow/userflow.go
+++ b/pkg/detectors/userflow/userflow.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Userflow,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/userstack/userstack.go b/pkg/detectors/userstack/userstack.go
index 09358aa14..6d0a201a4 100644
--- a/pkg/detectors/userstack/userstack.go
+++ b/pkg/detectors/userstack/userstack.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_UserStack,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/vagrantcloudpersonaltoken/vagrantcloudpersonaltoken.go b/pkg/detectors/vagrantcloudpersonaltoken/vagrantcloudpersonaltoken.go
index 2fcff4dd9..3dd2cf7e8 100644
--- a/pkg/detectors/vagrantcloudpersonaltoken/vagrantcloudpersonaltoken.go
+++ b/pkg/detectors/vagrantcloudpersonaltoken/vagrantcloudpersonaltoken.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_VagrantCloudPersonalToken,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/vatlayer/vatlayer.go b/pkg/detectors/vatlayer/vatlayer.go
index db8eba9f4..3f1629891 100644
--- a/pkg/detectors/vatlayer/vatlayer.go
+++ b/pkg/detectors/vatlayer/vatlayer.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_VatLayer,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/vbout/vbout.go b/pkg/detectors/vbout/vbout.go
index 970cdf783..477e2dee6 100644
--- a/pkg/detectors/vbout/vbout.go
+++ b/pkg/detectors/vbout/vbout.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Vbout,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/vercel/vercel.go b/pkg/detectors/vercel/vercel.go
index 39a33d923..336ed1d4b 100644
--- a/pkg/detectors/vercel/vercel.go
+++ b/pkg/detectors/vercel/vercel.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Vercel,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/verifier/verifier.go b/pkg/detectors/verifier/verifier.go
index 606460518..d13df44c1 100644
--- a/pkg/detectors/verifier/verifier.go
+++ b/pkg/detectors/verifier/verifier.go
@@ -52,6 +52,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Verifier,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://verifier.meetchopra.com/verify/%s?token=%s", emailMatch, resMatch), nil)
diff --git a/pkg/detectors/verimail/verimail.go b/pkg/detectors/verimail/verimail.go
index 4c4170788..24c2fc958 100644
--- a/pkg/detectors/verimail/verimail.go
+++ b/pkg/detectors/verimail/verimail.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Verimail,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/veriphone/veriphone.go b/pkg/detectors/veriphone/veriphone.go
index 511b2df2b..447437d87 100644
--- a/pkg/detectors/veriphone/veriphone.go
+++ b/pkg/detectors/veriphone/veriphone.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Veriphone,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/versioneye/versioneye.go b/pkg/detectors/versioneye/versioneye.go
index 63e2eb374..e32474089 100644
--- a/pkg/detectors/versioneye/versioneye.go
+++ b/pkg/detectors/versioneye/versioneye.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_VersionEye,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/viewneo/viewneo.go b/pkg/detectors/viewneo/viewneo.go
index a2417fdd5..eb3381567 100644
--- a/pkg/detectors/viewneo/viewneo.go
+++ b/pkg/detectors/viewneo/viewneo.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Viewneo,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/virustotal/virustotal.go b/pkg/detectors/virustotal/virustotal.go
index dde964cc7..591d8de9f 100644
--- a/pkg/detectors/virustotal/virustotal.go
+++ b/pkg/detectors/virustotal/virustotal.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_VirusTotal,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/visualcrossing/visualcrossing.go b/pkg/detectors/visualcrossing/visualcrossing.go
index 48692b789..01eded31e 100644
--- a/pkg/detectors/visualcrossing/visualcrossing.go
+++ b/pkg/detectors/visualcrossing/visualcrossing.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_VisualCrossing,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/voiceflow/voiceflow.go b/pkg/detectors/voiceflow/voiceflow.go
index f294f362d..59ba768a0 100644
--- a/pkg/detectors/voiceflow/voiceflow.go
+++ b/pkg/detectors/voiceflow/voiceflow.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Voiceflow,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/voicegain/voicegain.go b/pkg/detectors/voicegain/voicegain.go
index 9e76cc1f2..538b103b6 100644
--- a/pkg/detectors/voicegain/voicegain.go
+++ b/pkg/detectors/voicegain/voicegain.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Voicegain,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/voodoosms/voodoosms.go b/pkg/detectors/voodoosms/voodoosms.go
index e5dae3c52..5fe86f6d9 100644
--- a/pkg/detectors/voodoosms/voodoosms.go
+++ b/pkg/detectors/voodoosms/voodoosms.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_VoodooSMS,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/vouchery/vouchery.go b/pkg/detectors/vouchery/vouchery.go
index d33ca2f32..cf2f3369c 100644
--- a/pkg/detectors/vouchery/vouchery.go
+++ b/pkg/detectors/vouchery/vouchery.go
@@ -12,7 +12,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -50,7 +50,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Vouchery,
Raw: []byte(resMatch),
- RawV2: []byte(resMatch + subMatch),
+ SecretParts: map[string]string{
+ "key": resMatch,
+ "subdomain": subMatch,
+ },
+ RawV2: []byte(resMatch + subMatch),
}
if verify {
diff --git a/pkg/detectors/vpnapi/vpnapi.go b/pkg/detectors/vpnapi/vpnapi.go
index aa4661682..9cc630afa 100644
--- a/pkg/detectors/vpnapi/vpnapi.go
+++ b/pkg/detectors/vpnapi/vpnapi.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Vpnapi,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/vultrapikey/vultrapikey.go b/pkg/detectors/vultrapikey/vultrapikey.go
index 6164de3cb..d3210ec93 100644
--- a/pkg/detectors/vultrapikey/vultrapikey.go
+++ b/pkg/detectors/vultrapikey/vultrapikey.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_VultrApiKey,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/vyte/vyte.go b/pkg/detectors/vyte/vyte.go
index d7fc14d5f..5127a9ebb 100644
--- a/pkg/detectors/vyte/vyte.go
+++ b/pkg/detectors/vyte/vyte.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Vyte,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/walkscore/walkscore.go b/pkg/detectors/walkscore/walkscore.go
index 4e5d5da8a..3b6f26951 100644
--- a/pkg/detectors/walkscore/walkscore.go
+++ b/pkg/detectors/walkscore/walkscore.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_WalkScore,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/weatherbit/weatherbit.go b/pkg/detectors/weatherbit/weatherbit.go
index 3f5ee929f..02b7e6b29 100644
--- a/pkg/detectors/weatherbit/weatherbit.go
+++ b/pkg/detectors/weatherbit/weatherbit.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_WeatherBit,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/weatherstack/weatherstack.go b/pkg/detectors/weatherstack/weatherstack.go
index 7a20c79a2..685d360d7 100644
--- a/pkg/detectors/weatherstack/weatherstack.go
+++ b/pkg/detectors/weatherstack/weatherstack.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_WeatherStack,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/web3storage/web3storage.go b/pkg/detectors/web3storage/web3storage.go
index 0ba8bdc2a..06516a662 100644
--- a/pkg/detectors/web3storage/web3storage.go
+++ b/pkg/detectors/web3storage/web3storage.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Web3Storage,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/webex/webex.go b/pkg/detectors/webex/webex.go
index 026b616cd..67bacc452 100644
--- a/pkg/detectors/webex/webex.go
+++ b/pkg/detectors/webex/webex.go
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -46,6 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Webex,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/webexbot/webexbot.go b/pkg/detectors/webexbot/webexbot.go
index cdf61b8af..1be6ef630 100644
--- a/pkg/detectors/webexbot/webexbot.go
+++ b/pkg/detectors/webexbot/webexbot.go
@@ -46,6 +46,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_WebexBot,
Raw: []byte(match),
+ SecretParts: map[string]string{"key": match},
Redacted: match[:5] + "...",
ExtraData: map[string]string{},
}
diff --git a/pkg/detectors/webflow/webflow.go b/pkg/detectors/webflow/webflow.go
index 8d5ac33ed..3a65cb603 100644
--- a/pkg/detectors/webflow/webflow.go
+++ b/pkg/detectors/webflow/webflow.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Webflow,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/webscraper/webscraper.go b/pkg/detectors/webscraper/webscraper.go
index ea894ce89..13319c8fd 100644
--- a/pkg/detectors/webscraper/webscraper.go
+++ b/pkg/detectors/webscraper/webscraper.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_WebScraper,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/webscraping/webscraping.go b/pkg/detectors/webscraping/webscraping.go
index 1979db415..ebf57bee6 100644
--- a/pkg/detectors/webscraping/webscraping.go
+++ b/pkg/detectors/webscraping/webscraping.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Webscraping,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/websitepulse/websitepulse.go b/pkg/detectors/websitepulse/websitepulse.go
index a1fcb68d9..2a84454ed 100644
--- a/pkg/detectors/websitepulse/websitepulse.go
+++ b/pkg/detectors/websitepulse/websitepulse.go
@@ -13,7 +13,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -49,6 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Websitepulse,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.websitepulse.com/textserver.php?method=GetContacts&username=%s&key=%s", resIdMatch, resMatch), nil)
diff --git a/pkg/detectors/weightsandbiases/weightsandbiases.go b/pkg/detectors/weightsandbiases/weightsandbiases.go
index 7dac7bb14..a175ed948 100644
--- a/pkg/detectors/weightsandbiases/weightsandbiases.go
+++ b/pkg/detectors/weightsandbiases/weightsandbiases.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_WeightsAndBiases,
Raw: []byte(match),
+ SecretParts: map[string]string{"key": match},
}
if verify {
diff --git a/pkg/detectors/wepay/wepay.go b/pkg/detectors/wepay/wepay.go
index 106cf712d..6c2316014 100644
--- a/pkg/detectors/wepay/wepay.go
+++ b/pkg/detectors/wepay/wepay.go
@@ -11,7 +11,7 @@ import (
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
)
-type Scanner struct{
+type Scanner struct {
detectors.DefaultMultiPartCredentialProvider
}
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_WePay,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/whoxy/whoxy.go b/pkg/detectors/whoxy/whoxy.go
index 9aa1d1d84..f84e7efe9 100644
--- a/pkg/detectors/whoxy/whoxy.go
+++ b/pkg/detectors/whoxy/whoxy.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Whoxy,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/wistia/wistia.go b/pkg/detectors/wistia/wistia.go
index 27fbef3c1..846565df1 100644
--- a/pkg/detectors/wistia/wistia.go
+++ b/pkg/detectors/wistia/wistia.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Wistia,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/wit/wit.go b/pkg/detectors/wit/wit.go
index 8d21e2599..fb1829a0d 100644
--- a/pkg/detectors/wit/wit.go
+++ b/pkg/detectors/wit/wit.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Wit,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/wiz/wiz.go b/pkg/detectors/wiz/wiz.go
index 92763c824..cff333632 100644
--- a/pkg/detectors/wiz/wiz.go
+++ b/pkg/detectors/wiz/wiz.go
@@ -55,7 +55,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Wiz,
Raw: []byte(idMatch),
- RawV2: []byte(idMatch + secretMatch),
+ SecretParts: map[string]string{
+ "id": idMatch,
+ "secret": secretMatch,
+ },
+ RawV2: []byte(idMatch + secretMatch),
}
if verify {
diff --git a/pkg/detectors/worksnaps/worksnaps.go b/pkg/detectors/worksnaps/worksnaps.go
index 8d393c4ea..875339835 100644
--- a/pkg/detectors/worksnaps/worksnaps.go
+++ b/pkg/detectors/worksnaps/worksnaps.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Worksnaps,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/workstack/workstack.go b/pkg/detectors/workstack/workstack.go
index 18c68d7ff..37883a01a 100644
--- a/pkg/detectors/workstack/workstack.go
+++ b/pkg/detectors/workstack/workstack.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Workstack,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/worldcoinindex/worldcoinindex.go b/pkg/detectors/worldcoinindex/worldcoinindex.go
index a1c11ef97..92783c8e7 100644
--- a/pkg/detectors/worldcoinindex/worldcoinindex.go
+++ b/pkg/detectors/worldcoinindex/worldcoinindex.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_WorldCoinIndex,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/worldweather/worldweather.go b/pkg/detectors/worldweather/worldweather.go
index 541176ecc..596c2d2d0 100644
--- a/pkg/detectors/worldweather/worldweather.go
+++ b/pkg/detectors/worldweather/worldweather.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_WorldWeather,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/wrike/wrike.go b/pkg/detectors/wrike/wrike.go
index d6cc06bab..a0017ab1c 100644
--- a/pkg/detectors/wrike/wrike.go
+++ b/pkg/detectors/wrike/wrike.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Wrike,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/xai/xai.go b/pkg/detectors/xai/xai.go
index 6b29d4e1f..755c7947b 100644
--- a/pkg/detectors/xai/xai.go
+++ b/pkg/detectors/xai/xai.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_XAI,
Raw: []byte(match),
+ SecretParts: map[string]string{"key": match},
}
if verify {
diff --git a/pkg/detectors/yandex/yandex.go b/pkg/detectors/yandex/yandex.go
index 50a6e60fc..a021e5204 100644
--- a/pkg/detectors/yandex/yandex.go
+++ b/pkg/detectors/yandex/yandex.go
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Yandex,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/yelp/yelp.go b/pkg/detectors/yelp/yelp.go
index 6e9534bee..a5577b667 100644
--- a/pkg/detectors/yelp/yelp.go
+++ b/pkg/detectors/yelp/yelp.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Yelp,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/youneedabudget/youneedabudget.go b/pkg/detectors/youneedabudget/youneedabudget.go
index a67ca4d1d..49a83193e 100644
--- a/pkg/detectors/youneedabudget/youneedabudget.go
+++ b/pkg/detectors/youneedabudget/youneedabudget.go
@@ -42,6 +42,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_YouNeedABudget,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/yousign/yousign.go b/pkg/detectors/yousign/yousign.go
index 5fbab4b9f..973fd4b59 100644
--- a/pkg/detectors/yousign/yousign.go
+++ b/pkg/detectors/yousign/yousign.go
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_YouSign,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/youtubeapikey/youtubeapikey.go b/pkg/detectors/youtubeapikey/youtubeapikey.go
index 15b2d9efd..d0f6dffa1 100644
--- a/pkg/detectors/youtubeapikey/youtubeapikey.go
+++ b/pkg/detectors/youtubeapikey/youtubeapikey.go
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_YoutubeApiKey,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/zapierwebhook/zapierwebhook.go b/pkg/detectors/zapierwebhook/zapierwebhook.go
index 99f33e472..2f8936591 100644
--- a/pkg/detectors/zapierwebhook/zapierwebhook.go
+++ b/pkg/detectors/zapierwebhook/zapierwebhook.go
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ZapierWebhook,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/zendeskapi/zendeskapi.go b/pkg/detectors/zendeskapi/zendeskapi.go
index cd77e4ec5..3efbf4731 100644
--- a/pkg/detectors/zendeskapi/zendeskapi.go
+++ b/pkg/detectors/zendeskapi/zendeskapi.go
@@ -57,6 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ZendeskApi,
Raw: []byte(token),
+ SecretParts: map[string]string{"key": token},
}
if verify {
diff --git a/pkg/detectors/zenkitapi/zenkitapi.go b/pkg/detectors/zenkitapi/zenkitapi.go
index 9f8ee2fcb..362d35dc1 100644
--- a/pkg/detectors/zenkitapi/zenkitapi.go
+++ b/pkg/detectors/zenkitapi/zenkitapi.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ZenkitAPI,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/zenrows/zenrows.go b/pkg/detectors/zenrows/zenrows.go
index acec9995c..5e6051546 100644
--- a/pkg/detectors/zenrows/zenrows.go
+++ b/pkg/detectors/zenrows/zenrows.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ZenRows,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/zenscrape/zenscrape.go b/pkg/detectors/zenscrape/zenscrape.go
index 0b77c00d3..09c98c356 100644
--- a/pkg/detectors/zenscrape/zenscrape.go
+++ b/pkg/detectors/zenscrape/zenscrape.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Zenscrape,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/zenserp/zenserp.go b/pkg/detectors/zenserp/zenserp.go
index 2d38ade07..430520c21 100644
--- a/pkg/detectors/zenserp/zenserp.go
+++ b/pkg/detectors/zenserp/zenserp.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Zenserp,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/zeplin/zeplin.go b/pkg/detectors/zeplin/zeplin.go
index 5b8436ada..ae6e06b4d 100644
--- a/pkg/detectors/zeplin/zeplin.go
+++ b/pkg/detectors/zeplin/zeplin.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Zeplin,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/zerobounce/zerobounce.go b/pkg/detectors/zerobounce/zerobounce.go
index 4577d4621..c184953b2 100644
--- a/pkg/detectors/zerobounce/zerobounce.go
+++ b/pkg/detectors/zerobounce/zerobounce.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Zerobounce,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/zerotier/zerotier.go b/pkg/detectors/zerotier/zerotier.go
index 4cd833d62..5975eca87 100644
--- a/pkg/detectors/zerotier/zerotier.go
+++ b/pkg/detectors/zerotier/zerotier.go
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ZeroTier,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/zipapi/zipapi.go b/pkg/detectors/zipapi/zipapi.go
index e87b9cf12..f2cd7f1e3 100644
--- a/pkg/detectors/zipapi/zipapi.go
+++ b/pkg/detectors/zipapi/zipapi.go
@@ -59,6 +59,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ZipAPI,
Raw: []byte(keyMatch),
+ SecretParts: map[string]string{"key": keyMatch},
}
if verify {
diff --git a/pkg/detectors/zipbooks/zipbooks.go b/pkg/detectors/zipbooks/zipbooks.go
index 504483798..e62b5ee16 100644
--- a/pkg/detectors/zipbooks/zipbooks.go
+++ b/pkg/detectors/zipbooks/zipbooks.go
@@ -53,6 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ZipBooks,
Raw: []byte(emailMatch),
+ SecretParts: map[string]string{"key": emailMatch},
}
if verify {
diff --git a/pkg/detectors/zipcodeapi/zipcodeapi.go b/pkg/detectors/zipcodeapi/zipcodeapi.go
index dc60a7367..84796294e 100644
--- a/pkg/detectors/zipcodeapi/zipcodeapi.go
+++ b/pkg/detectors/zipcodeapi/zipcodeapi.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ZipCodeAPI,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/zipcodebase/zipcodebase.go b/pkg/detectors/zipcodebase/zipcodebase.go
index f04830e78..3203ba7b4 100644
--- a/pkg/detectors/zipcodebase/zipcodebase.go
+++ b/pkg/detectors/zipcodebase/zipcodebase.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Zipcodebase,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/zohocrm/zohocrm.go b/pkg/detectors/zohocrm/zohocrm.go
index ca73d78a6..dcd443d16 100644
--- a/pkg/detectors/zohocrm/zohocrm.go
+++ b/pkg/detectors/zohocrm/zohocrm.go
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
result := detectors.Result{
DetectorType: detector_typepb.DetectorType_ZohoCRM,
Raw: []byte(match),
+ SecretParts: map[string]string{"key": match},
}
if verify {
diff --git a/pkg/detectors/zonkafeedback/zonkafeedback.go b/pkg/detectors/zonkafeedback/zonkafeedback.go
index 92d1d693c..7379f195c 100644
--- a/pkg/detectors/zonkafeedback/zonkafeedback.go
+++ b/pkg/detectors/zonkafeedback/zonkafeedback.go
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ZonkaFeedback,
Raw: []byte(resMatch),
+ SecretParts: map[string]string{"key": resMatch},
}
if verify {
diff --git a/pkg/detectors/zulipchat/zulipchat.go b/pkg/detectors/zulipchat/zulipchat.go
index 74c111b8c..08ae518f5 100644
--- a/pkg/detectors/zulipchat/zulipchat.go
+++ b/pkg/detectors/zulipchat/zulipchat.go
@@ -60,7 +60,12 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ZulipChat,
Raw: []byte(key),
- RawV2: []byte(fmt.Sprintf("%s:%s:%s", key, id, domain)),
+ SecretParts: map[string]string{
+ "key": key,
+ "id": id,
+ "domain": domain,
+ },
+ RawV2: []byte(fmt.Sprintf("%s:%s:%s", key, id, domain)),
ExtraData: map[string]string{
"Domain": domain,
"Id": id,