Skip to content

Fix dependabot security vulnerabilities - #152

Merged
ajfloeder merged 1 commit into
masterfrom
security-updates
Mar 10, 2026
Merged

Fix dependabot security vulnerabilities#152
ajfloeder merged 1 commit into
masterfrom
security-updates

Conversation

@ajfloeder

Copy link
Copy Markdown
Contributor

Summary

Fix all resolvable dependency vulnerabilities identified by govulncheck.

Dependency Updates

Package Old Version New Version Vulnerability
github.com/golang/glog v1.0.0 v1.2.4 GO-2025-3372 (log file creation)
github.com/sirupsen/logrus v1.9.0 v1.9.3 GO-2025-4188
k8s.io/mount-utils v0.26.1 v0.26.8 GO-2023-2170
golang.org/x/net v0.33.0 v0.45.0 GO-2026-4441, GO-2026-4440, GO-2025-3595, GO-2025-3503
golang.org/x/sys v0.28.0 v0.36.0 transitive
golang.org/x/text v0.21.0 v0.29.0 transitive
golang.org/x/tools v0.28.0 v0.36.0 transitive

Other Changes

  • Dockerfile: Updated base image from golang:1.23 to golang:1.25.7
  • go.mod: Updated Go version directive to go 1.25.7
  • pkg/manager-nvme/nvme_cli.go: Fixed two fmt.Errorf calls with non-constant format strings (Go vet compliance)
  • internal/switchtec/cmd/config/config.go: Fixed debugPrintf call missing the devID argument for %d verb

Remaining Stdlib Vulnerabilities (require go1.25.8)

These cannot be fixed without upgrading the Go toolchain:

Vuln Package CVE Fixed in
GO-2026-4603 html/template CVE-2026-27142 go1.25.8
GO-2026-4602 os CVE-2026-27139 go1.25.8
GO-2026-4601 net/url CVE-2026-25679 go1.25.8

Signed-off-by: Anthony Floeder <anthony.floeder@hpe.com>

if !strings.HasPrefix(rsp, "success") {
return fmt.Errorf(strings.TrimRight(rsp, "\n"))
return fmt.Errorf("%s", strings.TrimRight(rsp, "\n"))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return fmt.Errorf("%s", strings.TrimRight(rsp, "\n"))
return errors.New(strings.TrimRight(rsp, "\n")

eh?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are suggesting returning to the version that go vet rejected. Going with the new version.

@roehrich-hpe roehrich-hpe Mar 10, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version you have is fine.

But, let me clarify my intent.

Vet was probably complaining about fmt.Errorf() because it didn't include the "%s". Because Errorf has f.

The errors.New() would let you use the strings.TrimRight(rsp, "\n") without needing the "%s". Because errors.New() doesn't have the f.

@ajfloeder
ajfloeder merged commit 7797cd5 into master Mar 10, 2026
2 checks passed
@ajfloeder
ajfloeder deleted the security-updates branch March 10, 2026 16:20
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