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:
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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] + "...",
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
|
||||
@@ -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 {
|
||||
|
||||
+5
-1
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()),
|
||||
},
|
||||
|
||||
@@ -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()),
|
||||
},
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user