Skip to content

Fix govulncheck failures with Go 1.26.9 and x/net v0.60.0 - #128

Closed
omkarjoshi0304 wants to merge 1 commit into
openstack-k8s-operators:mainfrom
omkarjoshi0304:fix/govulncheck-go-net
Closed

omkarjoshi0304 wants to merge 1 commit into
openstack-k8s-operators:mainfrom
omkarjoshi0304:fix/govulncheck-go-net

Conversation

@omkarjoshi0304

@omkarjoshi0304 omkarjoshi0304 commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fix the shared govulncheck failure affecting multiple PRs. The current Go and networking dependency versions produce 16 unignored findings: 11 in the Go standard library and five in golang.org/x/net.

  • Raise the minimum Go version from 1.26.3 to 1.26.9. Existing GitHub Actions workflows read the version from go.mod.
  • Upgrade golang.org/x/net from v0.58.0 to v0.60.0, including its required transitive dependency updates and checksums.
  • Enable automatic Go toolchain selection in the Dockerfile build stage. The current UBI builder ships Go 1.26.7 with GOTOOLCHAIN=local; it must be able to select the patched version required by go.mod. This can download the upstream Go toolchain during the build. The runtime base image is unchanged.

No vulnerability exceptions are added or modified. No application behavior or Console/MCP removal changes are included.

Validation

  • make test — passed, including controller and webhook tests.
  • make lint and go build ./... — passed.
  • go mod verify and go mod tidy -diff — passed.
  • Regenerated CRDs, RBAC, and deepcopy code — no changes.
  • make govulncheck with Go 1.26.9, for both local Darwin/arm64 and CI's Linux/amd64 target — zero unignored findings; the existing GO-2025-4125 observability-operator exception remains.
  • Podman build stage compiled successfully; go version -m /workspace/manager confirms Go 1.26.9 and golang.org/x/net v0.60.0 in the resulting Linux/arm64 operator binary.
  • Full runtime image built successfully with Podman; the operator executable's --help smoke test passed.

Related work

This overlaps the networking dependency update in #124. That PR fixes the five x/net findings but still fails on the eleven standard-library findings. This PR provides a self-contained fix for both, including the container build toolchain selection. No changes have been made to #124.

Built directly on upstream main, independently of #127 and #122. Other PRs can rebase after this fix merges.

References: Go 1.26.9 release notes, GO-2026-6603.

Summary by CodeRabbit

  • Chores
    • Updated the build configuration to support the Go version specified by the project, including when the build environment includes an older version.
    • Updated the Go toolchain version and supporting components. No end-user-facing feature changes are included.

Require Go 1.26.9 and golang.org/x/net v0.60.0 with their required dependency updates. Allow the UBI container build stage to select the patched Go toolchain required by go.mod. Keep the existing vulnerability exception policy unchanged.
@openshift-ci
openshift-ci Bot requested review from lpiwowar and umago October 12, 2026 10:06
@openshift-ci

openshift-ci Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: omkarjoshi0304
Once this PR has been reviewed and has the lgtm label, please assign akrog for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: openstack-k8s-operators/lightspeed-operator/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 3a1793f5-3abb-4ca3-b533-78866ce229f9

📥 Commits

Reviewing files that changed from the base of the PR and between 3c38bc1 and 25de523.


⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum

📒 Files selected for processing (2)
  • Dockerfile
  • go.mod

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.



📝 Walkthrough

Walkthrough

The builder stage sets GOTOOLCHAIN=auto. The Go directive changes to 1.26.9, and six indirect dependency versions are updated.

Changes

Go toolchain update

Layer / File(s) Summary
Builder toolchain and module updates
Dockerfile, go.mod
The builder stage sets GOTOOLCHAIN=auto. The Go directive changes from 1.26.3 to 1.26.9. Versions of golang.org/x/mod, x/net, x/sync, x/sys, x/term, and x/text are updated. golang.org/x/oauth2 remains at v0.36.0.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Suggested reviewers: akrog


Merge Risk: ⚪ Minimal · up to 25de5

No actionable merge-blocking risk is evident in the reviewed toolchain and module updates.


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Keep Documentation Current Error The pull request changes the development build workflow but does not update documentation. go.mod raises the required Go version from 1.26.3 to 1.26.9, and Dockerfile adds GOTOOLCHAIN=auto so co… Update docs/development.md (and the README development section if it remains a supported entry point) with the required Go version and the container-build toolchain behavior. State that builds require Go 1.26.9 or an automatic toolchain d…
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the main change: resolving govulncheck failures by updating Go to 1.26.9 and x/net to v0.60.0.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

Full details: Keep Documentation Current

Explanation

The pull request changes the development build workflow but does not update documentation. go.mod raises the required Go version from 1.26.3 to 1.26.9, and Dockerfile adds GOTOOLCHAIN=auto so container builds can download that toolchain. The changed-file inventory contains no README or docs/*.md file. The existing contributor documentation describes development commands but does not state the Go requirement or the Docker toolchain behavior.

Resolution

Update docs/development.md (and the README development section if it remains a supported entry point) with the required Go version and the container-build toolchain behavior. State that builds require Go 1.26.9 or an automatic toolchain download, and document any network access needed for GOTOOLCHAIN=auto.


  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

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