Files
coredns/plugin/pprof/pprof.go
Syed Azeez 6dca5b26d1 fix(lint): address G114 gosec findings in ready, pprof, and health plugins (#7798)
Replace http.Serve() with http.Server{} configured with timeouts to
address G114 gosec findings (HTTP server without timeouts). This
prevents potential slowloris attacks and resource exhaustion.

Changes:
- Add ReadTimeout, WriteTimeout, IdleTimeout (5s each) to HTTP servers
- Use srv.Shutdown(ctx) for graceful shutdown instead of ln.Close()
- Follow existing pattern from plugin/metrics

Fixes part of #7793

Signed-off-by: Azeez Syed <syedazeez337@gmail.com>
2026-01-01 11:25:37 +02:00

1.7 KiB