moby/cmd/dockerd
Sebastiaan van Stijn 9d08a57a9c set ReadHeaderTimeout to address G112: Potential Slowloris Attack (gosec)
After discussing in the maintainers meeting, we concluded that Slowloris attacks
are not a real risk other than potentially having some additional goroutines
lingering around, so setting a long timeout to satisfy the linter, and to at
least have "some" timeout.

    api/server/server.go:60:10: G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server (gosec)
                srv: &http.Server{
                    Addr: addr,
                },
    daemon/metrics_unix.go:34:13: G114: Use of net/http serve function that has no support for setting timeouts (gosec)
            if err := http.Serve(l, mux); err != nil && !strings.Contains(err.Error(), "use of closed network connection") {
                      ^
    cmd/dockerd/metrics.go:27:13: G114: Use of net/http serve function that has no support for setting timeouts (gosec)
            if err := http.Serve(l, mux); err != nil && !strings.Contains(err.Error(), "use of closed network connection") {
                      ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 55fd77f724)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 997ec12ec8)
Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-02-24 17:05:42 -05:00
..
config.go Unhide containerd-namespace flags 2020-11-05 12:14:01 -08:00
config_common_unix.go Update to Go 1.17.0, and gofmt with Go 1.17 2022-04-07 23:27:50 +02:00
config_unix.go Update to Go 1.17.0, and gofmt with Go 1.17 2022-04-07 23:27:50 +02:00
config_unix_test.go Update to Go 1.17.0, and gofmt with Go 1.17 2022-04-07 23:27:50 +02:00
config_windows.go allow running dockerd in an unprivileged user namespace (rootless mode) 2019-02-04 00:24:27 +09:00
daemon.go gofmt GoDoc comments with go1.19 2023-02-24 17:05:41 -05:00
daemon_freebsd.go cmd/dockerd: sd_notify STOPPING=1 when shutting down 2020-12-22 10:51:17 +01:00
daemon_linux.go cmd/dockerd: sd_notify STOPPING=1 when shutting down 2020-12-22 10:51:17 +01:00
daemon_test.go Sterner warnings for unathenticated tcp 2020-09-25 00:21:54 +00:00
daemon_unix.go Update to Go 1.17.0, and gofmt with Go 1.17 2022-04-07 23:27:50 +02:00
daemon_unix_test.go Update to Go 1.17.0, and gofmt with Go 1.17 2022-04-07 23:27:50 +02:00
daemon_windows.go cmd/dockerd: sd_notify STOPPING=1 when shutting down 2020-12-22 10:51:17 +01:00
docker.go vendor: spf13/cobra v1.0.0 2020-05-08 10:44:36 +02:00
docker_unix.go Update to Go 1.17.0, and gofmt with Go 1.17 2022-04-07 23:27:50 +02:00
docker_windows.go Windows:Add ETW logging hook 2019-03-12 18:41:55 -07:00
metrics.go set ReadHeaderTimeout to address G112: Potential Slowloris Attack (gosec) 2023-02-24 17:05:42 -05:00
options.go Sterner warnings for unathenticated tcp 2020-09-25 00:21:54 +00:00
options_test.go bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
README.md Fix readme doc for dockerd 2016-09-01 14:47:51 +08:00
service_unsupported.go Update to Go 1.17.0, and gofmt with Go 1.17 2022-04-07 23:27:50 +02:00
service_windows.go refactor: move from io/ioutil to io and os package 2023-02-24 16:11:55 -05:00

docker.go contains Docker daemon's main function.

This file provides first line CLI argument parsing and environment variable setting.