resolve govulncheck CVE with golang update #2383
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Install same version of go that is used by dockerfile. (1.22.2)
within d2 top folder run
govulncheck ./...
You'll see vulnerabilities like
Vulnerability #2: GO-2025-3420
Sensitive headers incorrectly sent after cross-domain redirect in net/http
More info: https://pkg.go.dev/vuln/GO-2025-3420
Standard library
Found in: net/http@go1.23.4
Fixed in: net/http@go1.23.5
Example traces found:
#1: lib/imgbundler/imgbundler.go:213:28: imgbundler.httpGet calls http.Client.Do
#2: lib/png/png.go:66:27: png.InitPlaywright calls playwright.Install, which eventually calls http.Get
Vulnerability #3: GO-2025-3373
Usage of IPv6 zone IDs can bypass URI name constraints in crypto/x509
More info: https://pkg.go.dev/vuln/GO-2025-3373
Standard library
Found in: crypto/x509@go1.23.4
Fixed in: crypto/x509@go1.23.5
Example traces found:
#1: lib/urlenc/urlenc.go:45:22: urlenc.Decode calls io.Copy, which eventually calls x509.Certificate.Verify
#2: lib/urlenc/urlenc.go:45:22: urlenc.Decode calls io.Copy, which eventually calls x509.Certificate.VerifyHostname
#3: cmd/d2plugin-dagre/main.go:12:12: d2plugin.main calls xmain.Main, which eventually calls x509.HostnameError.Error
#4: lib/urlenc/urlenc.go:45:22: urlenc.Decode calls io.Copy, which eventually calls x509.ParseCertificate