Populate SecretParts on all detectors (#4919)

* Populate SecretParts on single-part detectors

Adds SecretParts: map[string]string{"key": <secret>} to every detector
package that constructs detectors.Result with a single captured secret
value. This is the single-part half of the SecretParts migration (the
linter's common case, ~695 packages).

* Populate SecretParts on multi-part detectors
This commit is contained in:
Miccah
2026-04-24 08:32:51 -07:00
committed by GitHub
parent 5b15214466
commit ad2f9a4b98
820 changed files with 1399 additions and 171 deletions
+1
View File
@@ -53,6 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Abstract, DetectorType: detector_typepb.DetectorType_Abstract,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
+1
View File
@@ -56,6 +56,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AbuseIPDB, DetectorType: detector_typepb.DetectorType_AbuseIPDB,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
+1
View File
@@ -54,6 +54,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Abyssale, DetectorType: detector_typepb.DetectorType_Abyssale,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
@@ -56,6 +56,7 @@ func (s Scanner) ProcessMatches(ctx context.Context, matches [][]string, verify
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Accuweather, DetectorType: detector_typepb.DetectorType_Accuweather,
Raw: []byte(key), Raw: []byte(key),
SecretParts: map[string]string{"key": key},
} }
if verify { if verify {
+1
View File
@@ -54,6 +54,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AdafruitIO, DetectorType: detector_typepb.DetectorType_AdafruitIO,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
+4
View File
@@ -55,6 +55,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
DetectorType: detector_typepb.DetectorType_AdobeIO, DetectorType: detector_typepb.DetectorType_AdobeIO,
Raw: []byte(key), Raw: []byte(key),
RawV2: []byte(key + id), RawV2: []byte(key + id),
SecretParts: map[string]string{
"key": key,
"id": id,
},
} }
if verify { if verify {
+5 -1
View File
@@ -59,7 +59,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Adzuna, DetectorType: detector_typepb.DetectorType_Adzuna,
Raw: []byte(resMatch), Raw: []byte(resMatch),
RawV2: []byte(resMatch + resIdMatch), SecretParts: map[string]string{
"key": resMatch,
"id": resIdMatch,
},
RawV2: []byte(resMatch + resIdMatch),
} }
if verify { if verify {
+5 -1
View File
@@ -60,7 +60,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Aeroworkflow, DetectorType: detector_typepb.DetectorType_Aeroworkflow,
Raw: []byte(resMatch), Raw: []byte(resMatch),
RawV2: []byte(resMatch + resIdMatch), SecretParts: map[string]string{
"key": resMatch,
"id": resIdMatch,
},
RawV2: []byte(resMatch + resIdMatch),
} }
if verify { if verify {
+5 -1
View File
@@ -67,7 +67,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Agora, DetectorType: detector_typepb.DetectorType_Agora,
Raw: []byte(resMatch), Raw: []byte(resMatch),
RawV2: []byte(resMatch + resSecret), SecretParts: map[string]string{
"key": resMatch,
"secret": resSecret,
},
RawV2: []byte(resMatch + resSecret),
} }
if verify { if verify {
+5 -1
View File
@@ -73,7 +73,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Aha, DetectorType: detector_typepb.DetectorType_Aha,
Raw: []byte(resMatch), Raw: []byte(resMatch),
RawV2: []byte(resMatch + url), SecretParts: map[string]string{
"key": resMatch,
"url": url,
},
RawV2: []byte(resMatch + url),
} }
if verify { if verify {
+1
View File
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Airship, DetectorType: detector_typepb.DetectorType_Airship,
Raw: []byte(key), Raw: []byte(key),
SecretParts: map[string]string{"key": key},
} }
if verify { if verify {
+1
View File
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AirVisual, DetectorType: detector_typepb.DetectorType_AirVisual,
Raw: []byte(key), Raw: []byte(key),
SecretParts: map[string]string{"key": key},
} }
if verify { if verify {
+1
View File
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Aiven, DetectorType: detector_typepb.DetectorType_Aiven,
Raw: []byte(key), Raw: []byte(key),
SecretParts: map[string]string{"key": key},
} }
if verify { if verify {
+1
View File
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Alchemy, DetectorType: detector_typepb.DetectorType_Alchemy,
Raw: []byte(match), Raw: []byte(match),
SecretParts: map[string]string{"key": match},
} }
if verify { if verify {
+1
View File
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Alconost, DetectorType: detector_typepb.DetectorType_Alconost,
Raw: []byte(key), Raw: []byte(key),
SecretParts: map[string]string{"key": key},
} }
if verify { if verify {
+5 -1
View File
@@ -58,7 +58,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Alegra, DetectorType: detector_typepb.DetectorType_Alegra,
Raw: []byte(token), Raw: []byte(token),
RawV2: []byte(token + ":" + id), SecretParts: map[string]string{
"token": token,
"id": id,
},
RawV2: []byte(token + ":" + id),
} }
if verify { if verify {
+1
View File
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AletheiaApi, DetectorType: detector_typepb.DetectorType_AletheiaApi,
Raw: []byte(key), Raw: []byte(key),
SecretParts: map[string]string{"key": key},
} }
if verify { if verify {
@@ -77,7 +77,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
r := detectors.Result{ r := detectors.Result{
DetectorType: detector_typepb.DetectorType_AlgoliaAdminKey, DetectorType: detector_typepb.DetectorType_AlgoliaAdminKey,
Raw: []byte(key), Raw: []byte(key),
RawV2: []byte(id + ":" + key), SecretParts: map[string]string{
"id": id,
"key": key,
},
RawV2: []byte(id + ":" + key),
} }
if verify { if verify {
+5 -1
View File
@@ -105,7 +105,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Alibaba, DetectorType: detector_typepb.DetectorType_Alibaba,
Raw: []byte(resMatch), Raw: []byte(resMatch),
RawV2: []byte(resMatch + resIdMatch), SecretParts: map[string]string{
"key": resMatch,
"id": resIdMatch,
},
RawV2: []byte(resMatch + resIdMatch),
} }
if verify { if verify {
+1
View File
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AlienVault, DetectorType: detector_typepb.DetectorType_AlienVault,
Raw: []byte(key), Raw: []byte(key),
SecretParts: map[string]string{"key": key},
} }
if verify { if verify {
+1
View File
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Allsports, DetectorType: detector_typepb.DetectorType_Allsports,
Raw: []byte(key), Raw: []byte(key),
SecretParts: map[string]string{"key": key},
} }
if verify { if verify {
+5 -1
View File
@@ -55,7 +55,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Amadeus, DetectorType: detector_typepb.DetectorType_Amadeus,
Raw: []byte(key), Raw: []byte(key),
RawV2: []byte(key + secret), SecretParts: map[string]string{
"key": key,
"secret": secret,
},
RawV2: []byte(key + secret),
} }
if verify { if verify {
+1
View File
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Ambee, DetectorType: detector_typepb.DetectorType_Ambee,
Raw: []byte(key), Raw: []byte(key),
SecretParts: map[string]string{"key": key},
} }
if verify { if verify {
@@ -59,7 +59,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AmplitudeApiKey, DetectorType: detector_typepb.DetectorType_AmplitudeApiKey,
Raw: []byte(key), Raw: []byte(key),
RawV2: []byte(key + secret), SecretParts: map[string]string{
"key": key,
"secret": secret,
},
RawV2: []byte(key + secret),
} }
if verify { if verify {
+5 -1
View File
@@ -59,7 +59,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Anypoint, DetectorType: detector_typepb.DetectorType_Anypoint,
Raw: []byte(key), Raw: []byte(key),
RawV2: []byte(key + org), SecretParts: map[string]string{
"key": key,
"organization": org,
},
RawV2: []byte(key + org),
} }
if verify { if verify {
+1
View File
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Apacta, DetectorType: detector_typepb.DetectorType_Apacta,
Raw: []byte(key), Raw: []byte(key),
SecretParts: map[string]string{"key": key},
} }
if verify { if verify {
+1
View File
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Api2Cart, DetectorType: detector_typepb.DetectorType_Api2Cart,
Raw: []byte(key), Raw: []byte(key),
SecretParts: map[string]string{"key": key},
} }
if verify { if verify {
+5 -1
View File
@@ -54,7 +54,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ApiDeck, DetectorType: detector_typepb.DetectorType_ApiDeck,
Raw: []byte(key), Raw: []byte(key),
RawV2: []byte(key + id), SecretParts: map[string]string{
"key": key,
"id": id,
},
RawV2: []byte(key + id),
} }
if verify { if verify {
+1
View File
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Apiflash, DetectorType: detector_typepb.DetectorType_Apiflash,
Raw: []byte(key), Raw: []byte(key),
SecretParts: map[string]string{"key": key},
} }
if verify { if verify {
+1
View File
@@ -53,6 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ApiFonica, DetectorType: detector_typepb.DetectorType_ApiFonica,
Raw: []byte(key), Raw: []byte(key),
SecretParts: map[string]string{"key": key},
} }
if verify { if verify {
+1
View File
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Apify, DetectorType: detector_typepb.DetectorType_Apify,
Raw: []byte(key), Raw: []byte(key),
SecretParts: map[string]string{"key": key},
} }
if verify { if verify {
+1
View File
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Apilayer, DetectorType: detector_typepb.DetectorType_Apilayer,
Raw: []byte(key), Raw: []byte(key),
SecretParts: map[string]string{"key": key},
} }
if verify { if verify {
+1
View File
@@ -48,6 +48,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_APIMatic, DetectorType: detector_typepb.DetectorType_APIMatic,
Raw: []byte(apiKey), Raw: []byte(apiKey),
SecretParts: map[string]string{"key": apiKey},
} }
if verify { if verify {
+1
View File
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_ApiMetrics, DetectorType: detector_typepb.DetectorType_ApiMetrics,
Raw: []byte(key), Raw: []byte(key),
SecretParts: map[string]string{"key": key},
} }
if verify { if verify {
+1
View File
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_APITemplate, DetectorType: detector_typepb.DetectorType_APITemplate,
Raw: []byte(key), Raw: []byte(key),
SecretParts: map[string]string{"key": key},
} }
if verify { if verify {
+1
View File
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Apollo, DetectorType: detector_typepb.DetectorType_Apollo,
Raw: []byte(key), Raw: []byte(key),
SecretParts: map[string]string{"key": key},
} }
if verify { if verify {
+5 -1
View File
@@ -58,7 +58,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Appcues, DetectorType: detector_typepb.DetectorType_Appcues,
Raw: []byte(resMatch), Raw: []byte(resMatch),
RawV2: []byte(resMatch + resUserMatch), SecretParts: map[string]string{
"key": resMatch,
"username": resUserMatch,
},
RawV2: []byte(resMatch + resUserMatch),
} }
if verify { if verify {
isVerified, err := verifyMatch(ctx, client, resUserMatch, resMatch, resIdMatch) isVerified, err := verifyMatch(ctx, client, resUserMatch, resMatch, resIdMatch)
+1
View File
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Appfollow, DetectorType: detector_typepb.DetectorType_Appfollow,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
+1
View File
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Appointedd, DetectorType: detector_typepb.DetectorType_Appointedd,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
isVerified, err := verifyMatch(ctx, client, resMatch) isVerified, err := verifyMatch(ctx, client, resMatch)
+1
View File
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AppOptics, DetectorType: detector_typepb.DetectorType_AppOptics,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
+1
View File
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AppSynergy, DetectorType: detector_typepb.DetectorType_AppSynergy,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
+5 -1
View File
@@ -50,7 +50,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Apptivo, DetectorType: detector_typepb.DetectorType_Apptivo,
Raw: []byte(resMatch), Raw: []byte(resMatch),
RawV2: []byte(resMatch + resIdMatch), SecretParts: map[string]string{
"key": resMatch,
"id": resIdMatch,
},
RawV2: []byte(resMatch + resIdMatch),
} }
if verify { if verify {
+5 -1
View File
@@ -52,7 +52,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Artsy, DetectorType: detector_typepb.DetectorType_Artsy,
Raw: []byte(resMatch), Raw: []byte(resMatch),
RawV2: []byte(resMatch + resIdMatch), SecretParts: map[string]string{
"key": resMatch,
"id": resIdMatch,
},
RawV2: []byte(resMatch + resIdMatch),
} }
if verify { if verify {
+1
View File
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AssemblyAI, DetectorType: detector_typepb.DetectorType_AssemblyAI,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
+1
View File
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Atera, DetectorType: detector_typepb.DetectorType_Atera,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
+1
View File
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Audd, DetectorType: detector_typepb.DetectorType_Audd,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
@@ -58,7 +58,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
DetectorType: detector_typepb.DetectorType_Auth0ManagementApiToken, DetectorType: detector_typepb.DetectorType_Auth0ManagementApiToken,
Redacted: domainRes, Redacted: domainRes,
Raw: []byte(managementAPITokenRes), Raw: []byte(managementAPITokenRes),
RawV2: []byte(managementAPITokenRes + domainRes), SecretParts: map[string]string{
"token": managementAPITokenRes,
"domain": domainRes,
},
RawV2: []byte(managementAPITokenRes + domainRes),
} }
if verify { if verify {
+5 -1
View File
@@ -59,7 +59,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
DetectorType: detector_typepb.DetectorType_Auth0oauth, DetectorType: detector_typepb.DetectorType_Auth0oauth,
Redacted: clientIdRes, Redacted: clientIdRes,
Raw: []byte(clientSecretRes), Raw: []byte(clientSecretRes),
RawV2: []byte(clientIdRes + clientSecretRes), SecretParts: map[string]string{
"client_id": clientIdRes,
"client_secret": clientSecretRes,
},
RawV2: []byte(clientIdRes + clientSecretRes),
} }
if verify { if verify {
+5 -1
View File
@@ -49,7 +49,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Autodesk, DetectorType: detector_typepb.DetectorType_Autodesk,
Raw: []byte(resMatch), Raw: []byte(resMatch),
RawV2: []byte(resMatch + resSecret), SecretParts: map[string]string{
"key": resMatch,
"secret": resSecret,
},
RawV2: []byte(resMatch + resSecret),
} }
if verify { if verify {
+1
View File
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Autoklose, DetectorType: detector_typepb.DetectorType_Autoklose,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
+1
View File
@@ -41,6 +41,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AutoPilot, DetectorType: detector_typepb.DetectorType_AutoPilot,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AvazaPersonalAccessToken, DetectorType: detector_typepb.DetectorType_AvazaPersonalAccessToken,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AviationStack, DetectorType: detector_typepb.DetectorType_AviationStack,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
+8 -3
View File
@@ -128,9 +128,14 @@ func (s scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AWSSessionKey, DetectorType: detector_typepb.DetectorType_AWSSessionKey,
Raw: []byte(idMatch), Raw: []byte(idMatch),
RawV2: []byte(fmt.Sprintf("%s:%s:%s", idMatch, secretMatch, sessionMatch)), SecretParts: map[string]string{
Redacted: idMatch, "access_key_id": idMatch,
ExtraData: make(map[string]string), "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 { if verify {
+1
View File
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Axonaut, DetectorType: detector_typepb.DetectorType_Axonaut,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
+5 -1
View File
@@ -51,7 +51,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Aylien, DetectorType: detector_typepb.DetectorType_Aylien,
Raw: []byte(resMatch), Raw: []byte(resMatch),
RawV2: []byte(resMatch + resIdMatch), SecretParts: map[string]string{
"key": resMatch,
"id": resIdMatch,
},
RawV2: []byte(resMatch + resIdMatch),
} }
if verify { if verify {
isVerified, err := verifyMatch(ctx, client, resIdMatch, resMatch) isVerified, err := verifyMatch(ctx, client, resIdMatch, resMatch)
+1
View File
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Ayrshare, DetectorType: detector_typepb.DetectorType_Ayrshare,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
+6 -2
View File
@@ -56,8 +56,12 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AzureBatch, DetectorType: detector_typepb.DetectorType_AzureBatch,
Raw: []byte(endpoint), Raw: []byte(endpoint),
RawV2: []byte(endpoint + accountKey), SecretParts: map[string]string{
Redacted: endpoint, "url": endpoint,
"account_key": accountKey,
},
RawV2: []byte(endpoint + accountKey),
Redacted: endpoint,
} }
if verify { if verify {
@@ -82,8 +82,12 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AzureCosmosDBKeyIdentifiable, DetectorType: detector_typepb.DetectorType_AzureCosmosDBKeyIdentifiable,
Raw: []byte(key), Raw: []byte(key),
RawV2: []byte("key: " + key + " account_url: " + accountUrl), // key: <key> account_url: <account_url> SecretParts: map[string]string{
ExtraData: 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 { if verify {
@@ -310,6 +310,7 @@ func createResult(refreshToken, clientId, tenantId string, verified bool, extraD
r := &detectors.Result{ r := &detectors.Result{
DetectorType: detector_typepb.DetectorType_AzureRefreshToken, DetectorType: detector_typepb.DetectorType_AzureRefreshToken,
Raw: []byte(refreshToken), Raw: []byte(refreshToken),
SecretParts: map[string]string{"key": refreshToken},
ExtraData: extraData, ExtraData: extraData,
Verified: verified, Verified: verified,
} }
@@ -157,6 +157,7 @@ func createResult(tenantId string, clientId string, clientSecret string, verifie
r := &detectors.Result{ r := &detectors.Result{
DetectorType: detector_typepb.DetectorType_Azure, DetectorType: detector_typepb.DetectorType_Azure,
Raw: []byte(clientSecret), Raw: []byte(clientSecret),
SecretParts: map[string]string{"key": clientSecret},
ExtraData: extraData, ExtraData: extraData,
Verified: verified, Verified: verified,
Redacted: clientSecret[:5] + "...", Redacted: clientSecret[:5] + "...",
@@ -78,6 +78,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
DetectorType: s.Type(), DetectorType: s.Type(),
Redacted: token[:3] + "..." + token[25:], Redacted: token[:3] + "..." + token[25:],
Raw: []byte(token), Raw: []byte(token),
SecretParts: map[string]string{"key": token},
} }
for url := range urls { for url := range urls {
+4
View File
@@ -99,6 +99,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
DetectorType: s.Type(), DetectorType: s.Type(),
Raw: []byte(key), Raw: []byte(key),
RawV2: []byte(fmt.Sprintf(`{"accountName":"%s","accountKey":"%s"}`, name, 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{ ExtraData: map[string]string{
"Account_name": name, "Account_name": name,
}, },
@@ -66,7 +66,11 @@ EndpointLoop:
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AzureApiManagementRepositoryKey, DetectorType: detector_typepb.DetectorType_AzureApiManagementRepositoryKey,
Raw: []byte(passwordMatch), Raw: []byte(passwordMatch),
RawV2: []byte(urlMatch + passwordMatch), SecretParts: map[string]string{
"url": urlMatch,
"password": passwordMatch,
},
RawV2: []byte(urlMatch + passwordMatch),
} }
if verify { if verify {
@@ -60,7 +60,11 @@ EndpointLoop:
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AzureAPIManagementSubscriptionKey, DetectorType: detector_typepb.DetectorType_AzureAPIManagementSubscriptionKey,
Raw: []byte(baseUrl), Raw: []byte(baseUrl),
RawV2: []byte(baseUrl + ":" + key), SecretParts: map[string]string{
"url": baseUrl,
"key": key,
},
RawV2: []byte(baseUrl + ":" + key),
} }
if verify { if verify {
@@ -53,6 +53,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
DetectorType: detector_typepb.DetectorType_AzureAppConfigConnectionString, DetectorType: detector_typepb.DetectorType_AzureAppConfigConnectionString,
Raw: []byte(id), Raw: []byte(id),
RawV2: []byte(connectionString), RawV2: []byte(connectionString),
SecretParts: map[string]string{
"endpoint": endpoint,
"id": id,
"secret": secret,
},
} }
if verify { if verify {
@@ -79,8 +79,12 @@ EndpointLoop:
r := detectors.Result{ r := detectors.Result{
DetectorType: detector_typepb.DetectorType_AzureContainerRegistry, DetectorType: detector_typepb.DetectorType_AzureContainerRegistry,
Raw: []byte(password), Raw: []byte(password),
RawV2: []byte(`{"username":"` + username + `","password":"` + password + `"}`), SecretParts: map[string]string{
Redacted: username, "username": username,
"password": password,
},
RawV2: []byte(`{"username":"` + username + `","password":"` + password + `"}`),
Redacted: username,
} }
if verify { if verify {
@@ -49,7 +49,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AzureDevopsPersonalAccessToken, DetectorType: detector_typepb.DetectorType_AzureDevopsPersonalAccessToken,
Raw: []byte(resMatch), Raw: []byte(resMatch),
RawV2: []byte(resMatch + resOrgMatch), SecretParts: map[string]string{
"key": resMatch,
"organization": resOrgMatch,
},
RawV2: []byte(resMatch + resOrgMatch),
} }
if verify { if verify {
@@ -66,7 +66,11 @@ EndpointLoop:
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AzureDirectManagementKey, DetectorType: detector_typepb.DetectorType_AzureDirectManagementKey,
Raw: []byte(baseUrl), Raw: []byte(baseUrl),
RawV2: []byte(baseUrl + ":" + key), SecretParts: map[string]string{
"url": baseUrl,
"key": key,
},
RawV2: []byte(baseUrl + ":" + key),
} }
if verify { if verify {
@@ -46,7 +46,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AzureFunctionKey, DetectorType: detector_typepb.DetectorType_AzureFunctionKey,
Raw: []byte(resMatch), Raw: []byte(resMatch),
RawV2: []byte(resMatch + resUrl), SecretParts: map[string]string{
"key": resMatch,
"url": resUrl,
},
RawV2: []byte(resMatch + resUrl),
} }
if verify { if verify {
+5 -1
View File
@@ -79,7 +79,11 @@ UrlLoop:
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AzureSasToken, DetectorType: detector_typepb.DetectorType_AzureSasToken,
Raw: []byte(url), Raw: []byte(url),
RawV2: []byte(url + key), SecretParts: map[string]string{
"url": url,
"key": key,
},
RawV2: []byte(url + key),
} }
if verify { if verify {
@@ -50,6 +50,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
DetectorType: detector_typepb.DetectorType_AzureSearchAdminKey, DetectorType: detector_typepb.DetectorType_AzureSearchAdminKey,
Raw: []byte(resMatch), Raw: []byte(resMatch),
RawV2: []byte(resMatch + resServiceMatch), RawV2: []byte(resMatch + resServiceMatch),
SecretParts: map[string]string{
"key": resMatch,
"service": resServiceMatch,
},
} }
if verify { if verify {
@@ -50,7 +50,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_AzureSearchQueryKey, DetectorType: detector_typepb.DetectorType_AzureSearchQueryKey,
Raw: []byte(resMatch), Raw: []byte(resMatch),
RawV2: []byte(resMatch + resUrlMatch), SecretParts: map[string]string{
"key": resMatch,
"url": resUrlMatch,
},
RawV2: []byte(resMatch + resUrlMatch),
} }
if verify { if verify {
client := s.client client := s.client
@@ -47,6 +47,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Bannerbear, DetectorType: detector_typepb.DetectorType_Bannerbear,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
ExtraData: map[string]string{ ExtraData: map[string]string{
"version": fmt.Sprintf("%d", s.Version()), "version": fmt.Sprintf("%d", s.Version()),
}, },
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Bannerbear, DetectorType: detector_typepb.DetectorType_Bannerbear,
Raw: []byte(match), Raw: []byte(match),
SecretParts: map[string]string{"key": match},
ExtraData: map[string]string{ ExtraData: map[string]string{
"version": fmt.Sprintf("%d", s.Version()), "version": fmt.Sprintf("%d", s.Version()),
}, },
+1
View File
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Baremetrics, DetectorType: detector_typepb.DetectorType_Baremetrics,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
+1
View File
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Beamer, DetectorType: detector_typepb.DetectorType_Beamer,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
+1
View File
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Beebole, DetectorType: detector_typepb.DetectorType_Beebole,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
+1
View File
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Besnappy, DetectorType: detector_typepb.DetectorType_Besnappy,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
isVerified, verificationErr := verifyBesnappy(ctx, client, resMatch) isVerified, verificationErr := verifyBesnappy(ctx, client, resMatch)
+1
View File
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Besttime, DetectorType: detector_typepb.DetectorType_Besttime,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
+1
View File
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_BetterStack, DetectorType: detector_typepb.DetectorType_BetterStack,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
+5 -1
View File
@@ -65,7 +65,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Billomat, DetectorType: detector_typepb.DetectorType_Billomat,
Raw: []byte(apiKey), Raw: []byte(apiKey),
RawV2: []byte(apiKey + id), SecretParts: map[string]string{
"key": apiKey,
"id": id,
},
RawV2: []byte(apiKey + id),
} }
if verify { if verify {
@@ -21,7 +21,7 @@ var _ detectors.Detector = (*Scanner)(nil)
var ( var (
defaultClient = common.SaneHttpClient() 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 { func (s Scanner) Keywords() []string {
@@ -40,6 +40,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_BingSubscriptionKey, DetectorType: detector_typepb.DetectorType_BingSubscriptionKey,
Raw: []byte(match), Raw: []byte(match),
SecretParts: map[string]string{"key": match},
} }
if verify { if verify {
+1
View File
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Bitbar, DetectorType: detector_typepb.DetectorType_Bitbar,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
@@ -82,6 +82,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) ([]dete
result := detectors.Result{ result := detectors.Result{
DetectorType: detector_typepb.DetectorType_BitbucketAppPassword, DetectorType: detector_typepb.DetectorType_BitbucketAppPassword,
Raw: fmt.Appendf(nil, "%s:%s", username, password), Raw: fmt.Appendf(nil, "%s:%s", username, password),
SecretParts: map[string]string{
"username": username,
"password": password,
},
} }
if verify { if verify {
client := s.client client := s.client
@@ -73,7 +73,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_BitbucketDataCenter, DetectorType: detector_typepb.DetectorType_BitbucketDataCenter,
Raw: []byte(secret), 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{ ExtraData: map[string]string{
"URL": bitBucketURL, "URL": bitBucketURL,
}, },
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_BitcoinAverage, DetectorType: detector_typepb.DetectorType_BitcoinAverage,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
+1
View File
@@ -81,6 +81,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Bitfinex, DetectorType: detector_typepb.DetectorType_Bitfinex,
Raw: []byte(apiKey), Raw: []byte(apiKey),
SecretParts: map[string]string{"key": apiKey},
} }
if verify { if verify {
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_BitLyAccessToken, DetectorType: detector_typepb.DetectorType_BitLyAccessToken,
Raw: []byte(token), Raw: []byte(token),
SecretParts: map[string]string{"key": token},
} }
if verify { if verify {
+5 -1
View File
@@ -57,7 +57,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Bitmex, DetectorType: detector_typepb.DetectorType_Bitmex,
Raw: []byte(resSecretMatch), Raw: []byte(resSecretMatch),
RawV2: []byte(resMatch + resSecretMatch), SecretParts: map[string]string{
"key": resMatch,
"secret": resSecretMatch,
},
RawV2: []byte(resMatch + resSecretMatch),
} }
if verify { if verify {
+1
View File
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Blazemeter, DetectorType: detector_typepb.DetectorType_Blazemeter,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
+1
View File
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_BlitApp, DetectorType: detector_typepb.DetectorType_BlitApp,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
+1
View File
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_BlockNative, DetectorType: detector_typepb.DetectorType_BlockNative,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
+1
View File
@@ -43,6 +43,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Blogger, DetectorType: detector_typepb.DetectorType_Blogger,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
+1
View File
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_BombBomb, DetectorType: detector_typepb.DetectorType_BombBomb,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
+1
View File
@@ -44,6 +44,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_BoostNote, DetectorType: detector_typepb.DetectorType_BoostNote,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
+1
View File
@@ -45,6 +45,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Borgbase, DetectorType: detector_typepb.DetectorType_Borgbase,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {
+1
View File
@@ -50,6 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_Box, DetectorType: detector_typepb.DetectorType_Box,
Raw: []byte(match), Raw: []byte(match),
SecretParts: map[string]string{"key": match},
} }
if verify { if verify {
+5 -1
View File
@@ -63,7 +63,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_BoxOauth, DetectorType: detector_typepb.DetectorType_BoxOauth,
Raw: []byte(resIdMatch), Raw: []byte(resIdMatch),
RawV2: []byte(resIdMatch + resSecretMatch), SecretParts: map[string]string{
"id": resIdMatch,
"secret": resSecretMatch,
},
RawV2: []byte(resIdMatch + resSecretMatch),
} }
if verify { if verify {
@@ -57,6 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
s1 := detectors.Result{ s1 := detectors.Result{
DetectorType: detector_typepb.DetectorType_BraintreePayments, DetectorType: detector_typepb.DetectorType_BraintreePayments,
Raw: []byte(resMatch), Raw: []byte(resMatch),
SecretParts: map[string]string{"key": resMatch},
} }
if verify { if verify {

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