mirror of
https://github.com/securego/gosec.git
synced 2025-07-09 00:45:40 +02:00
Add a rule to detect the usage of ssh InsecureIgnoreHostKey function
This commit is contained in:
@ -183,6 +183,15 @@ func main() {
|
||||
z = z.Exp(x, y, m)
|
||||
}`, 1}}
|
||||
|
||||
// SampleCodeG106 - ssh InsecureIgnoreHostKey
|
||||
SampleCodeG106 = []CodeSample{{`
|
||||
package main
|
||||
import (
|
||||
"golang.org/x/crypto/ssh"
|
||||
)
|
||||
func main() {
|
||||
_ := ssh.InsecureIgnoreHostKey()
|
||||
}`, 1}}
|
||||
// SampleCodeG201 - SQL injection via format string
|
||||
SampleCodeG201 = []CodeSample{
|
||||
{`
|
||||
|
Reference in New Issue
Block a user