Skip to content

Commit 2318123

Browse files
autofix Simple DOS attack possible due to http.server misconfiguration (#66)
Co-authored-by: aikido-autofix[bot] <119856028+aikido-autofix[bot]@users.noreply.github.com> GitOrigin-RevId: 6aba0f0
1 parent 2216c16 commit 2318123

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

cmd/server.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"log"
55
"net/http"
66
"os"
7+
"time"
78

89
"github.com/mark3labs/mcp-go/server"
910
"github.com/render-oss/render-mcp-server/pkg/authn"
@@ -70,8 +71,9 @@ func Serve(transport string) *server.MCPServer {
7071
}
7172

7273
httpServer := &http.Server{
73-
Addr: ":10000",
74-
Handler: mux,
74+
Addr: ":10000",
75+
Handler: mux,
76+
ReadTimeout: 5 * time.Second,
7577
}
7678
err := httpServer.ListenAndServe()
7779
if err != nil {

0 commit comments

Comments
 (0)