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 8, 2022
1 parent d289215 commit fb4ac00
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 @@ -224,7 +224,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 @@ -20,7 +20,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 fb4ac00

Please sign in to comment.