Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix deepsource: Audit required: Insecure gRPC server #1833

Merged
merged 3 commits into from
Nov 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions internal/net/grpc/pool/pool_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func ListenAndServe(b *testing.B, addr string) func() {
b.Error(err)
}

// skipcq: GO-S0902
s := grpc.NewServer()
discoverer.RegisterDiscovererServer(s, new(server))

Expand Down
1 change: 1 addition & 0 deletions internal/net/grpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ var ErrServerStopped = grpc.ErrServerStopped

// NewServer returns the gRPC server.
func NewServer(opts ...ServerOption) *Server {
// skipcq: GO-S0902
return grpc.NewServer(opts...)
}

Expand Down
2 changes: 2 additions & 0 deletions internal/net/grpc/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ func TestNewServer(t *testing.T) {
opts: nil,
},
want: want{
// skipcq: GO-S0902
want: grpc.NewServer(),
},
},
Expand All @@ -79,6 +80,7 @@ func TestNewServer(t *testing.T) {
opts: []ServerOption{MaxSendMsgSize(100)},
},
want: want{
// skipcq: GO-S0902
want: grpc.NewServer(),
},
},
Expand Down