1
0
mirror of https://github.com/securego/gosec.git synced 2025-06-14 23:45:03 +02:00

Fix typos in comments, vars and tests

This commit is contained in:
Oleksandr Redko
2023-05-26 18:03:54 +03:00
committed by Cosmin Cojocar
parent e1484658ac
commit 1f689968ec
12 changed files with 19 additions and 19 deletions

View File

@ -517,7 +517,7 @@ func main() {
b := createBuffer()
b.WriteString("*bytes.Buffer")
}`}, 0, gosec.NewConfig()},
} // it shoudn't return any errors because all method calls are whitelisted by default
} // it shouldn't return any errors because all method calls are whitelisted by default
// SampleCodeG104Audit finds errors that aren't being handled in audit mode
SampleCodeG104Audit = []CodeSample{
@ -1931,7 +1931,7 @@ import (
)
func main() {
err := exec.CommandContext(context.Background(), "git", "rev-parse", "--show-toplavel").Run()
err := exec.CommandContext(context.Background(), "git", "rev-parse", "--show-toplevel").Run()
if err != nil {
log.Fatal(err)
}
@ -1980,7 +1980,7 @@ func main() {
}`}, 1, gosec.NewConfig()},
{[]string{`
// gosec doesn't have enough context to decide that the
// command argument of the RunCmd function is harcoded string
// command argument of the RunCmd function is hardcoded string
// and that's why it's better to warn the user so he can audit it
package main
@ -2032,7 +2032,7 @@ func main() {
RunCmd("ll", "ls")
}`}, 0, gosec.NewConfig()},
{[]string{`
// syscall.Exec function called with harcoded arguments
// syscall.Exec function called with hardcoded arguments
// shouldn't be consider as a command injection
package main
@ -2090,7 +2090,7 @@ func main() {
{[]string{`
// starting a process with a variable as an argument
// even if not constant is not considered as dangerous
// because it has harcoded value
// because it has hardcoded value
package main
import (