kubernetes-retired/cluster-api-provider-nested

๐Ÿ› Add ReadHeaderTimeout values

Closed this issue ยท 1 comments

What steps did you take and what happened:
[A clear and concise description on how to REPRODUCE the bug.]
The following lint errors started showing up after the latest upgrade to golangci-lint (v1.47.1):

cmd/vn-agent/app/server.go:100:8: G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server (gosec)
        s := &http.Server{
                Addr:    fmt.Sprintf(":%d", serverOption.Port),
                Handler: handler,
                TLSConfig: &tls.Config{
                        ClientAuth: tls.RequestClientCert,
                        MinVersion: tls.VersionTLS12,
                },
        }

/kind bug
[One or more /area label. See https://github.com/kubernetes-sigs/cluster-api-provider-nested/labels?q=area for the list of labels]

Thanks for catching this, I wonder if we should consider upgrading to 1.47.1 golangci-lint and then make sure we resolve this in that addition?