Skip to content

fix: bump Go toolchain from 1.25.7 to 1.25.8 to fix govulncheck vulnerabilities#296

Open
WentingWu666666 wants to merge 3 commits intodocumentdb:mainfrom
WentingWu666666:wentingwu/fix-govulncheck-go1.25.8
Open

fix: bump Go toolchain from 1.25.7 to 1.25.8 to fix govulncheck vulnerabilities#296
WentingWu666666 wants to merge 3 commits intodocumentdb:mainfrom
WentingWu666666:wentingwu/fix-govulncheck-go1.25.8

Conversation

@WentingWu666666
Copy link
Collaborator

Summary

Bump Go version from 1.25.7 to 1.25.8 in both \operator/src/go.mod\ and \documentdb-kubectl-plugin/go.mod\ to resolve 5 stdlib vulnerabilities detected by govulncheck.

Vulnerabilities Fixed

ID Package Description
GO-2026-4603 \html/template\ Template injection vulnerability
GO-2026-4602 \os\ OS package vulnerability
GO-2026-4601 \
et/url\ Incorrect parsing of IPv6 host literals
GO-2026-4600 \crypto/x509\ Malformed certificates handling
GO-2026-4599 \crypto/x509\ Incorrect enforcement of email constraints

All vulnerabilities are fixed in Go 1.25.8.

Details

Signed-off-by: Wenting Wu wentingwu@microsoft.com

…rabilities

Update Go version in both operator/src/go.mod and
documentdb-kubectl-plugin/go.mod to resolve 5 stdlib vulnerabilities
detected by govulncheck (GO-2026-4599 through GO-2026-4603):

- GO-2026-4603: html/template
- GO-2026-4602: os
- GO-2026-4601: net/url (incorrect parsing of IPv6 host literals)
- GO-2026-4600: crypto/x509 (malformed certificates)
- GO-2026-4599: crypto/x509 (incorrect enforcement of email constraints)

All fixed in go1.25.8.

Signed-off-by: Wenting Wu <wentingwu@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@WentingWu666666 WentingWu666666 requested a review from xgerman as a code owner March 9, 2026 18:14
Copilot AI review requested due to automatic review settings March 9, 2026 18:14
@WentingWu666666
Copy link
Collaborator Author

govulncheck passed on this branch confirmed that bumping Go to 1.25.8 fixes all 5 stdlib vulnerabilities (GO-2026-4599 through GO-2026-4603).

Verification run: https://github.com/WentingWu666666/documentdb-kubernetes-operator/actions/runs/22868104837

The test-unit and test-unit-coverage workflows hardcode GO_VERSION to
1.25.7, causing a version mismatch error when go.mod specifies 1.25.8:

  compile: version "go1.25.8" does not match go tool version "go1.25.7"

Update both workflows to use GO_VERSION: '1.25.8'.

Signed-off-by: Wenting Wu <wentingwu@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Go toolchain patch version in the repo’s two primary Go modules to remediate stdlib vulnerabilities reported by govulncheck.

Changes:

  • Bump operator/src module Go version from 1.25.71.25.8.
  • Bump documentdb-kubectl-plugin module Go version from 1.25.71.25.8.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
operator/src/go.mod Updates module go directive to 1.25.8 for stdlib vuln remediation.
documentdb-kubectl-plugin/go.mod Updates module go directive to 1.25.8 for stdlib vuln remediation.

Also bump operator/cnpg-plugins/sidecar-injector/go.mod from 1.25.7 to
1.25.8 to ensure all Go modules in the repo are patched against the
stdlib vulnerabilities.

Signed-off-by: Wenting Wu <wentingwu@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Collaborator Author

@WentingWu666666 WentingWu666666 left a comment

Choose a reason for hiding this comment

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

Addressed both review comments CI workflow pins bumped to 1.25.8 and sidecar-injector go.mod also updated.

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.

4 participants