Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
chore: fix some typos in comments (#2851)
cuiyourongead4e8fa2d57
diff --git a/pkg/detectors/falsepositives.go b/pkg/detectors/falsepositives.goindex 1b3594a6d..9a5eb28a2 100644--- a/pkg/detectors/falsepositives.go+++ b/pkg/detectors/falsepositives.go@@ -57,7 +57,7 @@ func GetFalsePositiveCheck(detector Detector) func(Result) bool {}// IsKnownFalsePositive will not return a valid secret finding if any of the disqualifying conditions are met-// Currently that includes: No number, english word in key, or matches common example pattens.+// Currently that includes: No number, english word in key, or matches common example patterns.// Only the secret key material should be passed into this functionfunc IsKnownFalsePositive(match string, falsePositives []FalsePositive, wordCheck bool) bool {if !utf8.ValidString(match) {diff --git a/pkg/detectors/twilio/twilio.go b/pkg/detectors/twilio/twilio.goindex fa3224701..927a106da 100644--- a/pkg/detectors/twilio/twilio.go+++ b/pkg/detectors/twilio/twilio.go@@ -90,7 +90,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultif res.StatusCode >= 200 && res.StatusCode < 300 {s1.Verified = truevar serviceResponse serviceResponse- if err := json.NewDecoder(res.Body).Decode(&serviceResponse); err == nil && len(serviceResponse.Services) > 0 { // no error in parsing and have atleast one service+ if err := json.NewDecoder(res.Body).Decode(&serviceResponse); err == nil && len(serviceResponse.Services) > 0 { // no error in parsing and have at least one serviceservice := serviceResponse.Services[0]s1.ExtraData["friendly_name"] = service.FriendlyNames1.ExtraData["account_sid"] = service.AccountSIDdiff --git a/pkg/handlers/default.go b/pkg/handlers/default.goindex 6b73fe036..a587d0696 100644--- a/pkg/handlers/default.go+++ b/pkg/handlers/default.go@@ -157,7 +157,7 @@ func (h *defaultHandler) openArchive(ctx logContext.Context, depth int, reader iswitch archive := format.(type) {case archiver.Decompressor:- // Decompress tha archive and feed the decompressed data back into the archive handler to extract any nested archives.+ // Decompress the archive and feed the decompressed data back into the archive handler to extract any nested archives.compReader, err := archive.OpenReader(arReader)if err != nil {return fmt.Errorf("error opening decompressor with format %q: %w", format.Name(), err)diff --git a/pkg/sources/s3/s3.go b/pkg/sources/s3/s3.goindex 8f90c2df5..ebd39a102 100644--- a/pkg/sources/s3/s3.go+++ b/pkg/sources/s3/s3.go@@ -349,7 +349,7 @@ func (s *Source) pageChunker(ctx context.Context, client *s3.S3, chunksChan chan}nErr = nErr.(int) + 1errorCount.Store(prefix, nErr)- // too many consective errors on this page+ // too many consecutive errors on this pageif nErr.(int) > 3 {s.log.V(2).Info("Too many consecutive errors, excluding prefix", "prefix", prefix)}