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

Fix the TLS config rule when parsing the settings from a variable (#911)

This commit is contained in:
Cosmin Cojocar
2023-01-09 15:10:44 +01:00
committed by GitHub
parent a522ae6f5f
commit fd280360cd
4 changed files with 65 additions and 23 deletions

View File

@ -2859,6 +2859,18 @@ func main() {
if err != nil {
fmt.Println(err)
}
}`}, 1, gosec.NewConfig()},
{[]string{`
// InsecureSkipVerify from variable
package main
import (
"crypto/tls"
)
func main() {
var conf tls.Config
conf.InsecureSkipVerify = true
}`}, 1, gosec.NewConfig()},
{[]string{
`