Skip to content

Find, verify, and analyze leaked credentials

chore: fix some typos (#2666)

redismongof1957fec59c6
diff --git a/hack/docs/Adding_Detectors_Internal.md b/hack/docs/Adding_Detectors_Internal.md
index c6ec4f993..197aa676d 100644
--- a/hack/docs/Adding_Detectors_Internal.md
+++ b/hack/docs/Adding_Detectors_Internal.md
@@ -46,7 +46,7 @@ If you think that something should be included outside of these guidelines, plea
### Adding New Token Formats to an Existing Scanner
-In some instances, services will update their token format, requiring a new regex to properly detect secrets in addition to supporting the previous token format. Accomodating this can be done without adding a net-new detector. [We provide a `Versioner` interface](https://github.com/trufflesecurity/trufflehog/blob/e18cfd5e0af1469a9f05b8d5732bcc94c39da49c/pkg/detectors/detectors.go#L30) that can be implemented.
+In some instances, services will update their token format, requiring a new regex to properly detect secrets in addition to supporting the previous token format. Accommodating this can be done without adding a net-new detector. [We provide a `Versioner` interface](https://github.com/trufflesecurity/trufflehog/blob/e18cfd5e0af1469a9f05b8d5732bcc94c39da49c/pkg/detectors/detectors.go#L30) that can be implemented.
1. Create two new directories `v1` and `v2`. Move the existing detector and tests into `v1`, and add new files to `v2`.
Ex: `<packagename>/<old_files>` -> `<packagename>/v1/<old_files>`, `<packagename>/v2/<new_files>`
diff --git a/hack/docs/Adding_Detectors_external.md b/hack/docs/Adding_Detectors_external.md
index 32a578978..48beb7d3c 100644
--- a/hack/docs/Adding_Detectors_external.md
+++ b/hack/docs/Adding_Detectors_external.md
@@ -42,7 +42,7 @@ If you think that something should be included outside of these guidelines, plea
### Adding New Token Formats to an Existing Scanner
-In some instances, services will update their token format, requiring a new regex to properly detect secrets in addition to supporting the previous token format. Accomodating this can be done without adding a net-new detector. [We provide a `Versioner` interface](https://github.com/trufflesecurity/trufflehog/blob/e18cfd5e0af1469a9f05b8d5732bcc94c39da49c/pkg/detectors/detectors.go#L30) that can be implemented.
+In some instances, services will update their token format, requiring a new regex to properly detect secrets in addition to supporting the previous token format. Accommodating this can be done without adding a net-new detector. [We provide a `Versioner` interface](https://github.com/trufflesecurity/trufflehog/blob/e18cfd5e0af1469a9f05b8d5732bcc94c39da49c/pkg/detectors/detectors.go#L30) that can be implemented.
1. Create two new directories `v1` and `v2`. Move the existing detector and tests into `v1`, and add new files to `v2`.
Ex: `<packagename>/<old_files>` -> `<packagename>/v1/<old_files>`, `<packagename>/v2/<new_files>`
diff --git a/pkg/detectors/coinbase_waas/coinbase_waas_test.go b/pkg/detectors/coinbase_waas/coinbase_waas_test.go
index 2a493be5e..27f6cc64c 100644
--- a/pkg/detectors/coinbase_waas/coinbase_waas_test.go
+++ b/pkg/detectors/coinbase_waas/coinbase_waas_test.go
@@ -75,7 +75,7 @@ func TestCoinbaseWaaS_Pattern(t *testing.T) {
shouldMatch: true,
match: "organizations/7eead2d5-fa48-4423-8f40-c70d8ce398ae/apiKeys/7b9516b6-d82e-44e8-bed5-89b160452ed9:-----BEGIN ECDSA PRIVATE KEY-----\nMHcCAQEEINQdZMbF2r07KF0mxfLYt9Y1PNaC0C6UpZ31MxD4NEE8oAoGCCqGSM49\nAwEHoUQDQgAEeRFgMrQEHI/APWaziRH90jN7EozjdbPVxvzc1F4zqWTeCtLASwqA\nqnMugYX2epqsFhGn82xNXu2NwgORc6embQ==\n-----END ECDSA PRIVATE KEY-----\n",
},
- // TODO: Is it worth supporting case-insensitve headers?
+ // TODO: Is it worth supporting case-insensitive headers?
// https://github.com/coinbase/waas-sdk-react-native/blob/bbaf597e73d02ecaf64161061e71b85d9eeeb9d6/example/src/.coinbase_cloud_api_key.json#L4
// {
// name: "valid_result_case_insensitive",
diff --git a/pkg/detectors/gcpapplicationdefaultcredentials/gcpapplicationdefaultcredentials.go b/pkg/detectors/gcpapplicationdefaultcredentials/gcpapplicationdefaultcredentials.go
index 2a0f5b9bc..eeecab957 100644
--- a/pkg/detectors/gcpapplicationdefaultcredentials/gcpapplicationdefaultcredentials.go
+++ b/pkg/detectors/gcpapplicationdefaultcredentials/gcpapplicationdefaultcredentials.go
@@ -100,7 +100,7 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool,
return false, nil, err
}
- // Credential not loaded. Not sure this can happend but it should be labeled unverified.
+ // Credential not loaded. Not sure this can happened but it should be labeled unverified.
if credentials == nil {
return false, nil, nil
}
diff --git a/pkg/detectors/googleoauth2/googleoauth2_access_token.go b/pkg/detectors/googleoauth2/googleoauth2_access_token.go
index 63284dc83..193d1b836 100644
--- a/pkg/detectors/googleoauth2/googleoauth2_access_token.go
+++ b/pkg/detectors/googleoauth2/googleoauth2_access_token.go
@@ -122,7 +122,7 @@ func (s Scanner) verify(ctx context.Context, token string) (bool, map[string]str
return false, nil, fmt.Errorf("unexpected error description '%s' for %s", errInfo.Error, req.URL)
}
} else {
- return false, nil, fmt.Errorf("unexpected respones %d for %s", res.StatusCode, req.URL)
+ return false, nil, fmt.Errorf("unexpected response %d for %s", res.StatusCode, req.URL)
}
}
diff --git a/pkg/detectors/snowflake/snowflake.go b/pkg/detectors/snowflake/snowflake.go
index aee0c6d2d..53e034253 100644
--- a/pkg/detectors/snowflake/snowflake.go
+++ b/pkg/detectors/snowflake/snowflake.go
@@ -118,7 +118,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
ctx = context.Background()
}
- // Disable pool + retries to prevent flooding the server with failed login attemps.
+ // Disable pool + retries to prevent flooding the server with failed login attempts.
db.SetConnMaxLifetime(time.Second)
db.SetMaxOpenConns(1)