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

Upgrade to go 1.18 #1975

Closed
wants to merge 4 commits into from
Closed

Conversation

mbroshi-stripe
Copy link
Contributor

@mbroshi-stripe mbroshi-stripe commented Jan 24, 2025

Why?

We are currently pinned to a very old version of golang.org/x/net which contains a number of vulnerabilities, of which govulncheck reports two. The minimal version that address the vulnerabilities is golang.org/x/[email protected]. In order to upgrade to golang.org/x/[email protected], we must upgrade the Go version in go.mod to 1.18 (found by binary search).

What?

  • Upgrades Go runtime to 1.18
  • Upgrades golang.org/x/net to v0.23.0
  • Only runs CI checks back to go 1.18.
  • Removes special case code around running http.Client on older versions of Go
  • Adds govulncheck CI test to beta branch

See Also

Output from govulncheck before change:

$ govulncheck ./...
=== Symbol Results ===

Vulnerability #1: GO-2024-2687
    HTTP/2 CONTINUATION flood in net/http
  More info: https://pkg.go.dev/vuln/GO-2024-2687
  Module: golang.org/x/net
    Found in: golang.org/x/[email protected]
    Fixed in: golang.org/x/[email protected]
    Example traces found:
    ...

Vulnerability #2: 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/[email protected]
    Fixed in: golang.org/x/[email protected]
    ....

after change:

$ govulncheck ./...
=== Symbol Results ===

No vulnerabilities found.

@mbroshi-stripe mbroshi-stripe marked this pull request as ready for review January 25, 2025 00:35
@ramya-stripe ramya-stripe requested review from ramya-stripe and removed request for pakrym-stripe January 26, 2025 00:42
@ramya-stripe
Copy link
Contributor

Can you update the requirements section at https://github.com/stripe/stripe-go/blob/master/README.md#requirements as well?

@mbroshi-stripe
Copy link
Contributor Author

Closing in favor of #1977

@mbroshi-stripe mbroshi-stripe deleted the mbroshi/remove-vulnerabilities branch January 29, 2025 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants