Skip to content

Commit 09cf6ef

Browse files
authored
Fix typos in struct fields, comments, and docs (#1023)
1 parent 665e87b commit 09cf6ef

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ directory you can supply `./...` as the input argument.
157157
- G304: File path provided as taint input
158158
- G305: File traversal when extracting zip/tar archive
159159
- G306: Poor file permissions used when writing to a new file
160-
- G307: Poor file permissions used when crating a file with os.Create
160+
- G307: Poor file permissions used when creating a file with os.Create
161161
- G401: Detect the usage of DES, RC4, MD5 or SHA1
162162
- G402: Look for bad TLS connection settings
163163
- G403: Ensure minimum RSA key length of 2048 bits

cmd/tlsconfig/tlsconfig.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ type Configuration struct {
4646
ECDHParamSize float64 `json:"ecdh_param_size"`
4747
HstsMinAge float64 `json:"hsts_min_age"`
4848
OldestClients []string `json:"oldest_clients"`
49-
OCSPStample bool `json:"ocsp_staple"`
50-
ServerPreferedOrder bool `json:"server_preferred_order"`
49+
OCSPStaple bool `json:"ocsp_staple"`
50+
ServerPreferredOrder bool `json:"server_preferred_order"`
5151
MaxCertLifespan float64 `json:"maximum_certificate_lifespan"`
5252
}
5353

@@ -121,27 +121,27 @@ func getGoTLSConf() (goTLSConfiguration, error) {
121121
panic(msg)
122122
}
123123

124-
tlsConfg := goTLSConfiguration{}
124+
tlsConfig := goTLSConfiguration{}
125125

126126
modern, err := getGoCipherConfig("modern", *sstls)
127127
if err != nil {
128-
return tlsConfg, err
128+
return tlsConfig, err
129129
}
130-
tlsConfg.cipherConfigs = append(tlsConfg.cipherConfigs, modern)
130+
tlsConfig.cipherConfigs = append(tlsConfig.cipherConfigs, modern)
131131

132132
intermediate, err := getGoCipherConfig("intermediate", *sstls)
133133
if err != nil {
134-
return tlsConfg, err
134+
return tlsConfig, err
135135
}
136-
tlsConfg.cipherConfigs = append(tlsConfg.cipherConfigs, intermediate)
136+
tlsConfig.cipherConfigs = append(tlsConfig.cipherConfigs, intermediate)
137137

138138
old, err := getGoCipherConfig("old", *sstls)
139139
if err != nil {
140-
return tlsConfg, err
140+
return tlsConfig, err
141141
}
142-
tlsConfg.cipherConfigs = append(tlsConfg.cipherConfigs, old)
142+
tlsConfig.cipherConfigs = append(tlsConfig.cipherConfigs, old)
143143

144-
return tlsConfg, nil
144+
return tlsConfig, nil
145145
}
146146

147147
func getCurrentDir() (string, error) {

helpers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func GetChar(n ast.Node) (byte, error) {
100100
// Unlike the other getters, it does _not_ raise an error for unknown ast.Node types. At the base, the recursion will hit a non-BinaryExpr type,
101101
// either BasicLit or other, so it's not an error case. It will only error if `strconv.Unquote` errors. This matters, because there's
102102
// currently functionality that relies on error values being returned by GetString if and when it hits a non-basiclit string node type,
103-
// hence for cases where recursion is needed, we use this separate function, so that we can still be backwards compatbile.
103+
// hence for cases where recursion is needed, we use this separate function, so that we can still be backwards compatible.
104104
//
105105
// This was added to handle a SQL injection concatenation case where the injected value is infixed between two strings, not at the start or end. See example below
106106
//

issue/issue_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ var _ = Describe("Issue", func() {
7979
ast.Walk(v, ctx.Root)
8080
Expect(target).ShouldNot(BeNil())
8181

82-
// Use hardcodeded rule to check assignment
82+
// Use hardcoded rule to check assignment
8383
cfg := gosec.NewConfig()
8484
rule, _ := rules.NewHardcodedCredentials("TEST", cfg)
8585
foundIssue, err := rule.Match(target, ctx)

report/sarif/builder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ func NewReport(version string, schema string) *Report {
88
}
99
}
1010

11-
// WithRuns dafines runs for the current report
11+
// WithRuns defines runs for the current report
1212
func (r *Report) WithRuns(runs ...*Run) *Report {
1313
r.Runs = runs
1414
return r

0 commit comments

Comments
 (0)