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

Security Patching - Dependency Updates #357

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM golang:1.18-alpine as builder
MAINTAINER FullStory Engineering
FROM golang:1.19-alpine as builder
LABEL MAINTAINER="FullStory Engineering"

# create non-privileged group and user
RUN addgroup -S grpcurl && adduser -S grpcurl -G grpcurl
Expand Down
4 changes: 2 additions & 2 deletions desc_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"os"
"sync"

"github.com/golang/protobuf/proto" //lint:ignore SA1019 we have to import this because it appears in exported API
Expand Down Expand Up @@ -41,7 +41,7 @@ type DescriptorSource interface {
func DescriptorSourceFromProtoSets(fileNames ...string) (DescriptorSource, error) {
files := &descriptorpb.FileDescriptorSet{}
for _, fileName := range fileNames {
b, err := ioutil.ReadFile(fileName)
b, err := os.ReadFile(fileName)
if err != nil {
return nil, fmt.Errorf("could not load protoset file %q: %v", fileName, err)
}
Expand Down
4 changes: 2 additions & 2 deletions desc_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package grpcurl

import (
"bytes"
"io/ioutil"
"os"
"testing"

"github.com/golang/protobuf/proto" //lint:ignore SA1019 we have to import this because it appears in exported API
Expand Down Expand Up @@ -34,7 +34,7 @@ func TestWriteProtoset(t *testing.T) {
}

func loadProtoset(path string) (*descriptorpb.FileDescriptorSet, error) {
b, err := ioutil.ReadFile(path)
b, err := os.ReadFile(path)
if err != nil {
return nil, err
}
Expand Down
21 changes: 18 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
module github.com/fullstorydev/grpcurl

go 1.15
go 1.19

require (
cloud.google.com/go v0.56.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/golang/protobuf v1.5.2
github.com/jhump/protoreflect v1.14.0
google.golang.org/grpc v1.51.0
google.golang.org/protobuf v1.28.1
)

require (
cloud.google.com/go/compute v1.14.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe // indirect
github.com/cncf/xds/go v0.0.0-20221128185840-c261a164b73d // indirect
github.com/envoyproxy/go-control-plane v0.10.3 // indirect
github.com/envoyproxy/protoc-gen-validate v0.9.1 // indirect
golang.org/x/net v0.4.0 // indirect
golang.org/x/oauth2 v0.3.0 // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/text v0.5.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37 // indirect
)
183 changes: 143 additions & 40 deletions go.sum

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions grpcurl.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"encoding/base64"
"errors"
"fmt"
"io/ioutil"
"net"
"os"
"regexp"
Expand Down Expand Up @@ -544,7 +543,7 @@ func ClientTLSConfig(insecureSkipVerify bool, cacertFile, clientCertFile, client
} else if cacertFile != "" {
// Create a certificate pool from the certificate authority
certPool := x509.NewCertPool()
ca, err := ioutil.ReadFile(cacertFile)
ca, err := os.ReadFile(cacertFile)
if err != nil {
return nil, fmt.Errorf("could not read ca certificate: %v", err)
}
Expand Down Expand Up @@ -581,7 +580,7 @@ func ServerTransportCredentials(cacertFile, serverCertFile, serverKeyFile string
if cacertFile != "" {
// Create a certificate pool from the certificate authority
certPool := x509.NewCertPool()
ca, err := ioutil.ReadFile(cacertFile)
ca, err := os.ReadFile(cacertFile)
if err != nil {
return nil, fmt.Errorf("could not read ca certificate: %v", err)
}
Expand Down
5 changes: 2 additions & 3 deletions internal/testing/cmd/bankdemo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"net"
"os"
"os/signal"
Expand Down Expand Up @@ -130,7 +129,7 @@ type svr struct {
}

func (s *svr) load() error {
accts, err := ioutil.ReadFile(s.datafile)
accts, err := os.ReadFile(s.datafile)
if err != nil && !os.IsNotExist(err) {
return err
}
Expand Down Expand Up @@ -162,7 +161,7 @@ func (s *svr) flush() {

if b, err := json.Marshal(accounts); err != nil {
grpclog.Errorf("failed to save data to %q", s.datafile)
} else if err := ioutil.WriteFile(s.datafile, b, 0666); err != nil {
} else if err := os.WriteFile(s.datafile, b, 0666); err != nil {
grpclog.Errorf("failed to save data to %q", s.datafile)
}
}