From 67d2c71ea245434be8c3e66f5536515f64fd1bc3 Mon Sep 17 00:00:00 2001 From: Daniel Cleyrat Date: Fri, 19 Apr 2024 10:25:02 -0700 Subject: [PATCH 1/4] fix: update golang.org/x/net, build/publish bin go1.21 --- .github/workflows/go.yml | 2 +- .github/workflows/release.yml | 4 ++-- go.mod | 6 +++--- go.sum | 5 +++++ 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index e92399c..3ea23f9 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -17,7 +17,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: '1.21' - name: Check Licenses run: make licenses-check diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 09bc6ae..78a8b4f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: '1.21' - name: Ginkgo run: | go install github.com/onsi/ginkgo/v2/ginkgo @@ -29,7 +29,7 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: '1.21' - name: Run GoReleaser uses: goreleaser/goreleaser-action@v4 with: diff --git a/go.mod b/go.mod index 8091351..b1d0303 100644 --- a/go.mod +++ b/go.mod @@ -83,11 +83,11 @@ require ( go.starlark.net v0.0.0-20231101134539-556fd59b42f6 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/mod v0.13.0 // indirect - golang.org/x/net v0.17.0 // indirect + golang.org/x/net v0.24.0 // indirect golang.org/x/oauth2 v0.13.0 // indirect golang.org/x/sync v0.4.0 // indirect - golang.org/x/sys v0.17.0 // indirect - golang.org/x/term v0.17.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/term v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.14.0 // indirect diff --git a/go.sum b/go.sum index 85fc389..88b14b1 100644 --- a/go.sum +++ b/go.sum @@ -939,6 +939,7 @@ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= @@ -1171,6 +1172,8 @@ golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1300,6 +1303,7 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= @@ -1308,6 +1312,7 @@ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= From c18010533855543e4556b6147d43b14b46210a45 Mon Sep 17 00:00:00 2001 From: Daniel Cleyrat Date: Fri, 19 Apr 2024 10:38:14 -0700 Subject: [PATCH 2/4] fix: go get, vet fix arg count --- go.sum | 2 ++ pkg/clients/dataservice/dataservice.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.sum b/go.sum index 88b14b1..3a7a400 100644 --- a/go.sum +++ b/go.sum @@ -1303,6 +1303,7 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1312,6 +1313,7 @@ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/pkg/clients/dataservice/dataservice.go b/pkg/clients/dataservice/dataservice.go index e9fc65d..fef4f18 100644 --- a/pkg/clients/dataservice/dataservice.go +++ b/pkg/clients/dataservice/dataservice.go @@ -135,7 +135,7 @@ func (d *dataServiceClient) ListFiles(ctx context.Context, opts ListOptions, fil req.URL.RawQuery = q.Encode() - klog.V(5).Infof("url: %s, rawQuery: %s", req.URL.String(), " ", req.URL.RawQuery) + klog.V(5).Infof("url: %s, rawQuery: %s", req.URL.String(), req.URL.RawQuery) resp, err := d.Do(req) if err != nil { From 14f6bcdf50342fc8471b440cdc03c2ce022885ea Mon Sep 17 00:00:00 2001 From: Daniel Cleyrat Date: Fri, 19 Apr 2024 10:48:46 -0700 Subject: [PATCH 3/4] fix: Log entries created from user input --- pkg/clients/dataservice/dataservice.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/clients/dataservice/dataservice.go b/pkg/clients/dataservice/dataservice.go index fef4f18..a4a880f 100644 --- a/pkg/clients/dataservice/dataservice.go +++ b/pkg/clients/dataservice/dataservice.go @@ -135,7 +135,7 @@ func (d *dataServiceClient) ListFiles(ctx context.Context, opts ListOptions, fil req.URL.RawQuery = q.Encode() - klog.V(5).Infof("url: %s, rawQuery: %s", req.URL.String(), req.URL.RawQuery) + klog.V(5).Infof("url: %v, rawQuery: %v", req.URL.String(), req.URL.RawQuery) resp, err := d.Do(req) if err != nil { From f9c69a79b89cddfc6498f49d40080a51a59217fb Mon Sep 17 00:00:00 2001 From: Daniel Cleyrat Date: Fri, 19 Apr 2024 10:54:56 -0700 Subject: [PATCH 4/4] fix: Log entries created from user input --- pkg/clients/dataservice/dataservice.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/clients/dataservice/dataservice.go b/pkg/clients/dataservice/dataservice.go index a4a880f..8beab8f 100644 --- a/pkg/clients/dataservice/dataservice.go +++ b/pkg/clients/dataservice/dataservice.go @@ -135,7 +135,12 @@ func (d *dataServiceClient) ListFiles(ctx context.Context, opts ListOptions, fil req.URL.RawQuery = q.Encode() - klog.V(5).Infof("url: %v, rawQuery: %v", req.URL.String(), req.URL.RawQuery) + escURL := strings.ReplaceAll(req.URL.String(), "\n", "") + escURL = strings.ReplaceAll(escURL, "\r", "") + escRQ := strings.ReplaceAll(req.URL.RawQuery, "\n", "") + escRQ = strings.ReplaceAll(escRQ, "\r", "") + + klog.V(5).Infof("url: %v, rawQuery: %v", escURL, escRQ) resp, err := d.Do(req) if err != nil {