Skip to content

Commit

Permalink
fix security issues
Browse files Browse the repository at this point in the history
  • Loading branch information
oilbeater committed Sep 7, 2022
1 parent 493b42d commit a98cffa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ lint:
echo "Code differs from gofmt's style" 1>&2 && exit 1; \
fi
@GOOS=linux go vet ./...
@GOOS=linux gosec -exclude=G204,G601 ./...
@GOOS=linux gosec -exclude=G204,G306,G404,G601,G301 -exclude-dir=test -exclude-dir=pkg/client ./...

.PHONY: scan
scan:
Expand Down
3 changes: 2 additions & 1 deletion pkg/daemon/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ func RunServer(config *Configuration, controller *Controller) {
nodeName = config.NodeName
csh := createCniServerHandler(config, controller)
server := http.Server{
Handler: createHandler(csh),
Handler: createHandler(csh),
ReadHeaderTimeout: 3 * time.Second,
}
unixListener, err := net.Listen("unix", config.BindSocket)
if err != nil {
Expand Down

0 comments on commit a98cffa

Please sign in to comment.