Explorar el Código

Fix typos in *.md, comments and logs (#1185)

Oleksandr Redko hace 2 años
padre
commit
6705461b33
Se han modificado 7 ficheros con 8 adiciones y 8 borrados
  1. 1 1
      CONTRIBUTING.md
  2. 1 1
      README.md
  3. 2 2
      cmd/generate/config/rules/telegram.go
  4. 1 1
      detect/baseline.go
  5. 1 1
      detect/detect_test.go
  6. 1 1
      detect/utils.go
  7. 1 1
      report/finding.go

+ 1 - 1
CONTRIBUTING.md

@@ -78,7 +78,7 @@ If you want to add a new rule to the [default Gitleaks configuration](https://gi
    token that is unique enough not to require an identifier then you can use
    this function. For example, Pulumi's API Token has the prefix `pul-` which is
    unique enough to use `generateUniqueToken`. But something like Beamer's API
-   token that has a `b_` prefix is not unqiue enough to use `generateUniqueToken`,
+   token that has a `b_` prefix is not unique enough to use `generateUniqueToken`,
    so instead we use `generateSemiGenericRegex` and require a `beamer`
    identifier is part of the rule.
    If a token's prefix has more than `3` characters then you could

+ 1 - 1
README.md

@@ -272,7 +272,7 @@ Gitleaks offers a configuration format you can follow to write your own secret d
 title = "Gitleaks title"
 
 # Extend the base (this) configuration. When you extend a configuration
-# the base rules take precendence over the extended rules. I.e, if there are
+# the base rules take precedence over the extended rules. I.e., if there are
 # duplicate rules in both the base configuration and the extended configuration
 # the base rules will override the extended rules.
 # Another thing to know with extending configurations is you can chain together

+ 2 - 2
cmd/generate/config/rules/telegram.go

@@ -28,9 +28,9 @@ func TelegramBotToken() *config.Rule {
 	minToken := secrets.NewSecret(numeric("5") + ":A" + alphaNumericExtendedShort("34"))
 	maxToken := secrets.NewSecret(numeric("16") + ":A" + alphaNumericExtendedShort("34"))
 	tps := []string{
-		// variable assigment
+		// variable assignment
 		generateSampleSecret("telegram", validToken),
-		// URL contaning token
+		// URL containing token
 		generateSampleSecret("url", "https://api.telegram.org/bot"+validToken+"/sendMessage"),
 		// object constructor
 		`const bot = new Telegraf("` + validToken + `")`,

+ 1 - 1
detect/baseline.go

@@ -13,7 +13,7 @@ import (
 
 func IsNew(finding report.Finding, baseline []report.Finding) bool {
 	// Explicitly testing each property as it gives significantly better performance in comparison to cmp.Equal(). Drawback is that
-	// the code requires maintanance if/when the Finding struct changes
+	// the code requires maintenance if/when the Finding struct changes
 	for _, b := range baseline {
 
 		if finding.Author == b.Author &&

+ 1 - 1
detect/detect_test.go

@@ -23,7 +23,7 @@ func TestDetect(t *testing.T) {
 		fragment     Fragment
 		// NOTE: for expected findings, all line numbers will be 0
 		// because line deltas are added _after_ the finding is created.
-		// I.e, if the finding is from a --no-git file, the line number will be
+		// I.e., if the finding is from a --no-git file, the line number will be
 		// increase by 1 in DetectFromFiles(). If the finding is from git,
 		// the line number will be increased by the patch delta.
 		expectedFindings []report.Finding

+ 1 - 1
detect/utils.go

@@ -74,7 +74,7 @@ func filter(findings []report.Finding, redact bool) []report.Finding {
 
 					genericMatch := strings.Replace(f.Match, f.Secret, "REDACTED", -1)
 					betterMatch := strings.Replace(fPrime.Match, fPrime.Secret, "REDACTED", -1)
-					log.Trace().Msgf("skipping %s finding (%s), %s rule takes precendence (%s)", f.RuleID, genericMatch, fPrime.RuleID, betterMatch)
+					log.Trace().Msgf("skipping %s finding (%s), %s rule takes precedence (%s)", f.RuleID, genericMatch, fPrime.RuleID, betterMatch)
 					include = false
 					break
 				}

+ 1 - 1
report/finding.go

@@ -38,7 +38,7 @@ type Finding struct {
 	// Rule is the name of the rule that was matched
 	RuleID string
 
-	// unique identifer
+	// unique identifier
 	Fingerprint string
 }