moby--moby/cmd/dockerd
Sebastiaan van Stijn 55fd77f724
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.

    libnetwork/diagnostic/server.go:96:10: G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server (gosec)
        srv := &http.Server{
            Addr:    net.JoinHostPort(ip, strconv.Itoa(port)),
            Handler: s,
        }
    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>
2022-09-22 12:13:28 +02:00
..
trap gofmt GoDoc comments with go1.19 2022-07-08 19:56:23 +02:00
README.md Fix readme doc for dockerd 2016-09-01 14:47:51 +08:00
config.go daemon: complete the "--graph" / "-g" deprecation 2022-08-18 14:57:16 +02:00
config_unix.go daemon/config: New(): initialize config with platform-specific defaults 2022-08-17 08:54:32 +02:00
config_unix_test.go daemon/config: New(): initialize config with platform-specific defaults 2022-08-17 08:54:32 +02:00
config_windows.go daemon/config: New(): initialize config with platform-specific defaults 2022-08-17 08:54:32 +02:00
daemon.go daemon: complete the "--graph" / "-g" deprecation 2022-08-18 14:57:16 +02:00
daemon_freebsd.go daemon: move check for CPU-realtime daemon options 2022-03-03 19:50:27 +01:00
daemon_linux.go daemon: move check for CPU-realtime daemon options 2022-03-03 19:50:27 +01:00
daemon_test.go cmd/dockerd: use initialized config in tests 2022-08-17 14:07:03 +02:00
daemon_unix.go cmd/dockerd: initContainerd() use early return 2022-08-11 14:11:10 +02:00
daemon_unix_test.go cmd/dockerd: produce error when using discovery options 2022-01-06 18:28:15 +01:00
daemon_windows.go Merge pull request #43942 from thaJeztah/rundaemon_windows_nit 2022-08-11 08:30:44 -07:00
docker.go daemon/config: New(): initialize config with platform-specific defaults 2022-08-17 08:54:32 +02:00
docker_unix.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
docker_windows.go cmd/dockerd: fix some minor issues in Windows implementation 2022-08-09 22:50:41 +02:00
genwinres_windows.go use go-winres for cross to create Windows resources 2022-04-14 19:52:35 +02:00
metrics.go set ReadHeaderTimeout to address G112: Potential Slowloris Attack (gosec) 2022-09-22 12:13:28 +02:00
options.go cmd/dockerd: un-export config methods, and don't pass flags "twice" 2022-04-27 00:34:17 +02:00
options_test.go cmd/dockerd: un-export config methods, and don't pass flags "twice" 2022-04-27 00:34:17 +02:00
service_unsupported.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
service_windows.go Windows: require Windows Server RS5 / ltsc2019 (build 17763) as minimum 2022-02-18 22:58:28 +01:00

README.md

docker.go contains Docker daemon's main function.

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