Skip to content

Update Go version and dependencies#291

Closed
micahhausler wants to merge 2 commits intokubernetes-csi:masterfrom
micahhausler:go-update
Closed

Update Go version and dependencies#291
micahhausler wants to merge 2 commits intokubernetes-csi:masterfrom
micahhausler:go-update

Conversation

@micahhausler
Copy link

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Prior to this change, building csi-proxy included known vulnerabilities in golang.org/x/net, net/http, and go runtime.

I updated the Go runtime to 1.20, and package dependencies to non-vulnerable versions.

original govulncheck findings
Using govulncheck@v1.0.0 with vulnerability data from https://vuln.go.dev (last modified 2023-07-24 16:24:24 +0000 UTC).

Scanning your binary for known vulnerabilities...

Vulnerability #1: GO-2023-1878
    Insufficient sanitization of Host header in net/http
  More info: https://pkg.go.dev/vuln/GO-2023-1878
  Standard library
    Found in: net/http@go1.20.4
    Fixed in: net/http@go1.20.6
    Example traces found:
      #1: http.Request.Write
      #2: http.Request.WriteProxy

Vulnerability #2: GO-2023-1840
    Unsafe behavior in setuid/setgid binaries in runtime
  More info: https://pkg.go.dev/vuln/GO-2023-1840
  Standard library
    Found in: runtime@go1.20.4
    Fixed in: runtime@go1.20.5
    Example traces found:
      #1: runtime.Caller
      #2: runtime.Callers
      #3: runtime.CallersFrames
      #4: runtime.Frames.Next
      #5: runtime.Func.Entry
      #6: runtime.Func.FileLine
      #7: runtime.Func.Name
      #8: runtime.FuncForPC
      #9: runtime.GC
      #10: runtime.GOMAXPROCS
      #11: runtime.Gosched
      #12: runtime.LockOSThread
      #13: runtime.SetFinalizer
      #14: runtime.Stack
      #15: runtime.TypeAssertionError.Error
      #16: runtime.TypeAssertionError.RuntimeError
      #17: runtime.UnlockOSThread
      #18: runtime.atomicMSpanPointer.Load
      #19: runtime.atomicMSpanPointer.StoreNoWB
      #20: runtime.atomicOffAddr.Clear
      #21: runtime.atomicOffAddr.Load
      #22: runtime.atomicOffAddr.StoreMarked
      #23: runtime.atomicOffAddr.StoreMin
      #24: runtime.atomicOffAddr.StoreUnmark
      #25: runtime.atomicSpanSetSpinePointer.Load
      #26: runtime.atomicSpanSetSpinePointer.StoreNoWB
      #27: runtime.boundsError.Error
      #28: runtime.boundsError.RuntimeError
      #29: runtime.errorAddressString.Addr
      #30: runtime.errorAddressString.Error
      #31: runtime.errorAddressString.RuntimeError
      #32: runtime.errorString.Error
      #33: runtime.errorString.RuntimeError
      #34: runtime.goroutineProfileStateHolder.CompareAndSwap
      #35: runtime.goroutineProfileStateHolder.Load
      #36: runtime.goroutineProfileStateHolder.Store
      #37: runtime.lockRank.String
      #38: runtime.plainError.Error
      #39: runtime.plainError.RuntimeError
      #40: runtime.waitReason.String

Vulnerability #3: GO-2023-1571
    Denial of service via crafted HTTP/2 stream in net/http and golang.org/x/net
  More info: https://pkg.go.dev/vuln/GO-2023-1571
  Module: golang.org/x/net
    Found in: golang.org/x/net@v0.0.0-20200202094626-16171245cfb2
    Fixed in: golang.org/x/net@v0.7.0
    Example traces found:
      #1: http2.ConnectionError.Error
      #2: http2.ErrCode.String
      #3: http2.FrameHeader.String
      #4: http2.FrameType.String
      #5: http2.Framer.ReadFrame
      #6: http2.Framer.WriteContinuation
      #7: http2.Framer.WriteData
      #8: http2.Framer.WriteDataPadded
      #9: http2.Framer.WriteGoAway
      #10: http2.Framer.WriteHeaders
      #11: http2.Framer.WritePing
      #12: http2.Framer.WritePriority
      #13: http2.Framer.WritePushPromise
      #14: http2.Framer.WriteRSTStream
      #15: http2.Framer.WriteRawFrame
      #16: http2.Framer.WriteSettings
      #17: http2.Framer.WriteSettingsAck
      #18: http2.Framer.WriteWindowUpdate
      #19: http2.Setting.String
      #20: http2.SettingID.String
      #21: http2.SettingsFrame.ForeachSetting
      #22: http2.StreamError.Error
      #23: http2.connError.Error
      #24: http2.duplicatePseudoHeaderError.Error
      #25: http2.headerFieldNameError.Error
      #26: http2.headerFieldValueError.Error
      #27: http2.pseudoHeaderError.Error
      #28: hpack.Decoder.DecodeFull
      #29: hpack.Decoder.Write

Your code is affected by 3 vulnerabilities from 1 module and the Go standard library.

Share feedback at https://go.dev/s/govulncheck-feedback.

After this change, govulncheck reports no issues

make build
govulncheck -mode=binary ./bin/csi-proxy.exe
govulncheck output
Using govulncheck@v1.0.0 with vulnerability data from https://vuln.go.dev (last modified 2023-07-24 16:24:24 +0000 UTC).

Scanning your binary for known vulnerabilities...

No vulnerabilities found.

Share feedback at https://go.dev/s/govulncheck-feedback.

Which issue(s) this PR fixes:
N/A

Special notes for your reviewer:

I made one commit with updates to go.mod, go.sum and release-tools/prow.sh. The second commit is after running go mod vendor to update vendored dependencies.

Does this PR introduce a user-facing change?:

NONE

Signed-off-by: Micah Hausler <mhausler@amazon.com>
Signed-off-by: Micah Hausler <mhausler@amazon.com>
@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. release-note-none Denotes a PR that doesn't merit a release note. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 25, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: micahhausler
Once this PR has been reviewed and has the lgtm label, please assign patricklang for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
Copy link
Contributor

Welcome @micahhausler!

It looks like this is your first PR to kubernetes-csi/csi-proxy 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-csi/csi-proxy has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 25, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @micahhausler. Thanks for your PR.

I'm waiting for a kubernetes-csi member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jul 25, 2023
@micahhausler
Copy link
Author

Closing in favor of #289

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants