Skip to content

Commit

Permalink
Fix typos in *.md, comments and logs (#1185)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandear committed May 30, 2023
1 parent 9869eab commit 6705461
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions cmd/generate/config/rules/telegram.go
Expand Up @@ -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 + `")`,
Expand Down
2 changes: 1 addition & 1 deletion detect/baseline.go
Expand Up @@ -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 &&
Expand Down
2 changes: 1 addition & 1 deletion detect/detect_test.go
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion detect/utils.go
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion report/finding.go
Expand Up @@ -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
}

Expand Down

0 comments on commit 6705461

Please sign in to comment.