Skip to content

CORENET-7386: Bump to kube 1.36 and go to 1.26 - #146

Open
miheer wants to merge 1 commit into
openshift:mainfrom
miheer:CORENET-7386
Open

CORENET-7386: Bump to kube 1.36 and go to 1.26#146
miheer wants to merge 1 commit into
openshift:mainfrom
miheer:CORENET-7386

Conversation

@miheer

@miheer miheer commented Jul 27, 2026

Copy link
Copy Markdown

Update Kubernetes dependencies to v0.36.2 and Go to 1.26.

Regenerate go.sum and vendor.

Summary by CodeRabbit

  • Chores
    • Updated the application’s Go build environment to Go 1.26.
    • Refreshed Kubernetes-related libraries to newer versions.
    • Updated related transitive dependencies to align with the refreshed dependency graph for compatibility and maintenance.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉


Walkthrough

The Docker builder and Go module now target Go 1.26. Kubernetes dependencies were upgraded from v0.34.1 to v0.36.2, with corresponding updates to k8s.io/utils and indirect dependencies.

Changes

Toolchain and dependency refresh

Layer / File(s) Summary
Go 1.26 and direct module updates
Dockerfile, go.mod
The Docker builder image and go directive were updated to Go 1.26, while direct Kubernetes modules and k8s.io/utils were refreshed.
Indirect dependency graph refresh
go.mod
Indirect module versions and entries were updated, including Kubernetes, Go, protobuf, and sigs.k8s.io modules.

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

Suggested reviewers: bpickard22, fedepaol

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: Kubernetes and Go version bumps.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Stable And Deterministic Test Names ✅ Passed No _test.go files were changed; the PR is dependency/vendor-only, so no Ginkgo titles were introduced or renamed.
Test Structure And Quality ✅ Passed No Ginkgo test files were added or modified; this PR is limited to Dockerfile/go.mod/vendor dependency updates.
Microshift Test Compatibility ✅ Passed PR only updates Dockerfile, go.mod, go.sum, and vendored deps; no new or edited Ginkgo tests were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR only updates Dockerfile/go.mod/go.sum and vendor deps; no new Ginkgo/e2e tests or SNO-sensitive assumptions were added.
Topology-Aware Scheduling Compatibility ✅ Passed Only Dockerfile/go.mod/go.sum/vendor were changed; no manifests, operator code, or controllers with scheduling constraints were modified.
Ote Binary Stdout Contract ✅ Passed PR only bumps Dockerfile/go.mod/go.sum/vendor; no modified process-level code writes to stdout, and main.go uses klog which defaults to stderr.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new e2e tests were added; the diff is only Dockerfile/go.mod/go.sum plus vendor updates, so this check is not applicable.
No-Weak-Crypto ✅ Passed Diff adds no MD5/SHA1/DES/RC4/etc. usage; only safe SHA-256 PKCE code and non-secret bytes/HTML comparisons appear.
Container-Privileges ✅ Passed PR only bumps Go/Kubernetes deps and the builder base image; no changed manifests add privileged/root/hostNetwork/hostPID/allowPrivilegeEscalation settings.
No-Sensitive-Data-In-Logs ✅ Passed Changed logs are benign env warnings and network metadata; no new log call in the diff exposes secrets, tokens, or PII.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci
openshift-ci Bot requested review from bpickard22 and fedepaol July 27, 2026 04:38
@openshift-ci

openshift-ci Bot commented Jul 27, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: miheer
Once this PR has been reviewed and has the lgtm label, please assign fedepaol 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

@miheer miheer changed the title Bump to kube 1.36 CORENET-7386: Bump to kube 1.36 Jul 27, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

@miheer: This pull request references CORENET-7386 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 27, 2026
@miheer miheer changed the title CORENET-7386: Bump to kube 1.36 CORENET-7386: Bump to kube 1.36 and go to 1.26 Jul 27, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Dockerfile`:
- Line 1: Update the Dockerfile’s builder image reference from the mutable
golang:1.26 tag to the approved immutable digest for the intended Go 1.26 image,
preserving the builder stage name and image version.
- Line 1: Update the Dockerfile’s final runtime stage to create an unprivileged
user, ensure the application files and required paths are accessible to it, and
add a non-root USER declaration before the startup command. Do not leave the
final image running as root; the builder stage can remain unchanged.

In `@go.mod`:
- Line 52: Update the golang.org/x/net dependency declaration from v0.49.0 to
v0.55.0 or later in go.mod, then refresh related module checksums as needed; if
dependency analysis confirms it is unreachable, add the repository’s established
reachability/VEX exception instead.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

Comment thread Dockerfile Outdated
@@ -1,4 +1,4 @@
FROM golang:1.24 AS builder
FROM golang:1.26 AS builder

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Pin the Go builder image by digest.

golang:1.26 is mutable and can change the build inputs without a Dockerfile change. Use the approved immutable digest for the intended Go 1.26 image.

As per path instructions, non-Red Hat images must be pinned by digest.

🧰 Tools
🪛 Trivy (0.72.0)

[error] 1-1: Image user should not be 'root'

Specify at least 1 USER command in Dockerfile with non-root user as argument

Rule: DS-0002

Learn more

(IaC/Dockerfile)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Dockerfile` at line 1, Update the Dockerfile’s builder image reference from
the mutable golang:1.26 tag to the approved immutable digest for the intended Go
1.26 image, preserving the builder stage name and image version.

Source: Path instructions


🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Run the final image as a non-root user.

The Dockerfile has no non-root USER declaration according to Trivy DS-0002, so the runtime container defaults to root. Add an unprivileged user in the final stage and switch to it before startup.

As per path instructions, containers must use USER non-root and never run as root.

🧰 Tools
🪛 Trivy (0.72.0)

[error] 1-1: Image user should not be 'root'

Specify at least 1 USER command in Dockerfile with non-root user as argument

Rule: DS-0002

Learn more

(IaC/Dockerfile)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Dockerfile` at line 1, Update the Dockerfile’s final runtime stage to create
an unprivileged user, ensure the application files and required paths are
accessible to it, and add a non-root USER declaration before the startup
command. Do not leave the final image running as root; the builder stage can
remain unchanged.

Sources: Path instructions, Linters/SAST tools

Comment thread go.mod Outdated
golang.org/x/tools v0.26.0 // indirect
google.golang.org/protobuf v1.36.5 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
golang.org/x/net v0.49.0 // indirect

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the surrounding go.mod context and search for golang.org/x/net references.
sed -n '1,120p' go.mod | cat -n
printf '\n---\n'
rg -n 'golang\.org/x/net|golang\.org/x/' go.mod go.sum

Repository: openshift/network-metrics-daemon

Length of output: 15200


🌐 Web query:

osv.dev CVE-2026-39821 golang.org/x/net v0.49.0 v0.55.0

💡 Result:

CVE-2026-39821 is a critical security vulnerability identified in the golang.org/x/net package, specifically within the idna sub-package [1][2]. The vulnerability is caused by a failure to correctly reject ASCII-only Punycode-encoded labels in the ToASCII and ToUnicode functions [1][2]. This flaw allows the functions to incorrectly accept Punycode-encoded labels that decode to ASCII-only labels (e.g., "xn--example-.com" being treated as "example.com" instead of throwing an error) [1][2]. This behavior can lead to privilege escalation, as programs that perform privilege checks on ASCII hostnames may reject "example.com" but permit "xn--example-.com"; if the hostname is subsequently converted to Unicode, the program might inadvertently permit access to the sensitive Unicode name [1][2]. The vulnerability was addressed in version v0.55.0 of golang.org/x/net [1][2]. Users are advised to upgrade to v0.55.0 or later to remediate this issue [1][2]. The fix implements an updated specification from UTS 46 (revision 33), which resolves the underlying issue where multiple ASCII labels could decode to the same Unicode label [2]. Top results: [1], [2]

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path
p = Path("go.mod")
text = p.read_text()
lines = text.splitlines()
for i,l in enumerate(lines,1):
    if "golang.org/x/net" in l:
        start=max(1,i-5); end=min(len(lines),i+5)
        for j in range(start,end+1):
            print(f"{j:4}: {lines[j-1]}")
        break
PY

Repository: openshift/network-metrics-daemon

Length of output: 684


🌐 Web query:

site:osv.dev/vulnerability golang.org/x/net v0.49.0 CVE-2026-39821 v0.55.0

💡 Result:

CVE-2026-39821 is a security vulnerability in the idna package of golang.org/x/net [1][2]. The issue arises because the ToASCII and ToUnicode functions incorrectly accept Punycode-encoded labels that decode to an ASCII-only label, which can lead to privilege escalation by bypassing hostname-based access restrictions [1][2]. This vulnerability was fixed in version v0.55.0 of golang.org/x/net [1][2]. Users are advised to update their dependency to v0.55.0 or later to mitigate this risk [1][2].

Citations:


Upgrade golang.org/x/net from v0.49.0.
go.mod:52 pins a version affected by CVE-2026-39821; move to v0.55.0 or later, or add a reachability/VEX exception if this dependency is not actually used.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@go.mod` at line 52, Update the golang.org/x/net dependency declaration from
v0.49.0 to v0.55.0 or later in go.mod, then refresh related module checksums as
needed; if dependency analysis confirms it is unreachable, add the repository’s
established reachability/VEX exception instead.

Source: Path instructions

Update Kubernetes dependencies to v0.36.2 and Go to 1.26.

Regenerate go.sum and vendor, including golang.org/x/net v0.55.0 to address CVE-2026-39821.

Pin Dockerfile base images by digest and run the final image as a non-root user.

Signed-off-by: Miheer Salunke <miheer.salunke@gmail.com>
@openshift-ci

openshift-ci Bot commented Aug 12, 2026

Copy link
Copy Markdown

@miheer: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@miheer

miheer commented Aug 17, 2026

Copy link
Copy Markdown
Author

@bpickard22 PTAL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants