Skip to content

Fix CVE-2024-45337: upgrade golang.org/x/crypto to v0.31.0 - #26

Open
n8behavior wants to merge 1 commit into
masterfrom
fix/critical-security-alerts
Open

Fix CVE-2024-45337: upgrade golang.org/x/crypto to v0.31.0#26
n8behavior wants to merge 1 commit into
masterfrom
fix/critical-security-alerts

Conversation

@n8behavior

Copy link
Copy Markdown

Summary

Resolves 1 critical Dependabot security alert with a targeted dependency bump, plus fixes pre-existing go vet warnings.

Critical alert resolved

  • #110CVE-2024-45337: Misuse of ServerConfig.PublicKeyCallback may cause authorization bypass in golang.org/x/crypto. Upgraded from v0.0.0-20180222v0.31.0.

Cascading dependency upgrades

  • golang.org/x/netv0.25.0
  • golang.org/x/syncv0.10.0
  • golang.org/x/sysv0.28.0
  • golang.org/x/textv0.21.0
  • golang.org/x/toolsv0.21.1

Code fixes

Fixed 4 go vet warnings in pkg/controller/arguscontroller_utils.go:

  • 3x fmt.Errorf(fmt.Sprintf(...))fmt.Errorf(...) (redundant wrapping)
  • 1x glog.V(4).Infof(fmt.Sprintf(...) + ...) → single format string

Vendor directory re-synced via go mod vendor.

Test plan

  • go build ./... passes
  • go vet ./... passes (0 warnings)
  • Verify Dependabot alert #110 auto-closes after merge

Resolves critical Dependabot alert #110:
- CVE-2024-45337: Misuse of ServerConfig.PublicKeyCallback may cause
  authorization bypass in golang.org/x/crypto.
  Upgraded golang.org/x/crypto v0.0.0-20180222 -> v0.31.0.

Also fixed 4 pre-existing `go vet` warnings in arguscontroller_utils.go:
- Lines 166, 183, 198: replaced redundant fmt.Errorf(fmt.Sprintf(...))
  with fmt.Errorf(...)
- Line 258: consolidated multiple fmt.Sprintf calls in glog.V(4).Infof
  into a single format string

Cascading dep upgrades: golang.org/x/{net,sync,sys,text,tools}.
Vendor directory re-synced. Verified with `go build ./...` and `go vet ./...`.
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.

1 participant