2018-02-21 05:59:18 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import "text/template"
|
|
|
|
|
|
|
|
var generatedRuleTmpl = template.Must(template.New("generated").Parse(`
|
|
|
|
// New{{.Name}}TLSCheck creates a check for {{.Name}} TLS ciphers
|
|
|
|
// DO NOT EDIT - generated by tlsconfig tool
|
2018-07-19 17:42:25 +01:00
|
|
|
func New{{.Name}}TLSCheck(id string, conf gosec.Config) (gosec.Rule, []ast.Node) {
|
2018-02-21 05:59:18 +00:00
|
|
|
return &insecureConfigTLS{
|
2018-07-19 17:42:25 +01:00
|
|
|
MetaData: gosec.MetaData{ID: id},
|
2018-02-21 05:59:18 +00:00
|
|
|
requiredType: "crypto/tls.Config",
|
|
|
|
MinVersion: {{ .MinVersion }},
|
|
|
|
MaxVersion: {{ .MaxVersion }},
|
|
|
|
goodCiphers: []string{
|
|
|
|
{{range $cipherName := .Ciphers }} "{{$cipherName}}",
|
|
|
|
{{end}}
|
|
|
|
},
|
2023-01-09 14:10:44 +00:00
|
|
|
}, []ast.Node{(*ast.CompositeLit)(nil), (*ast.AssignStmt)(nil)}
|
2018-02-21 05:59:18 +00:00
|
|
|
}
|
|
|
|
`))
|