Skip to content

Find, verify, and analyze leaked credentials

chore: fix some typos in comments (#2851)

cuiyourongead4e8fa2d57
diff --git a/pkg/detectors/falsepositives.go b/pkg/detectors/falsepositives.go
index 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 function
func 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.go
index 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) (result
if res.StatusCode >= 200 && res.StatusCode < 300 {
s1.Verified = true
var 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 service
service := serviceResponse.Services[0]
s1.ExtraData["friendly_name"] = service.FriendlyName
s1.ExtraData["account_sid"] = service.AccountSID
diff --git a/pkg/handlers/default.go b/pkg/handlers/default.go
index 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 i
switch 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.go
index 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) + 1
errorCount.Store(prefix, nErr)
- // too many consective errors on this page
+ // too many consecutive errors on this page
if nErr.(int) > 3 {
s.log.V(2).Info("Too many consecutive errors, excluding prefix", "prefix", prefix)
}