diff --git a/e2e/plugin/basic/basic.go b/e2e/plugin/basic/basic.go index 892272826f..b03ca96ee0 100644 --- a/e2e/plugin/basic/basic.go +++ b/e2e/plugin/basic/basic.go @@ -6,6 +6,7 @@ import ( "net/http" "os" "path/filepath" + "time" ) func main() { @@ -23,8 +24,9 @@ func main() { mux := http.NewServeMux() server := http.Server{ - Addr: l.Addr().String(), - Handler: http.NewServeMux(), + Addr: l.Addr().String(), + Handler: http.NewServeMux(), + ReadHeaderTimeout: 2 * time.Second, // G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server } mux.HandleFunc("/Plugin.Activate", func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/vnd.docker.plugins.v1.1+json")