Skip to content

[Project Darkstar] ROSAENG-63302: Remediate 2 Go stdlib CVEs in managed-cluster-validating-webhooks - #611

Draft
kseiter-rh wants to merge 1 commit into
openshift:masterfrom
kseiter-rh:cve-fix/managed-cluster-validating-webhooks-darkstar-2026-08-06
Draft

[Project Darkstar] ROSAENG-63302: Remediate 2 Go stdlib CVEs in managed-cluster-validating-webhooks#611
kseiter-rh wants to merge 1 commit into
openshift:masterfrom
kseiter-rh:cve-fix/managed-cluster-validating-webhooks-darkstar-2026-08-06

Conversation

@kseiter-rh

@kseiter-rh kseiter-rh commented Aug 6, 2026

Copy link
Copy Markdown

[Project Darkstar] ROSAENG-63302: Remediate CVEs in managed-cluster-validating-webhooks

Changes

  • Add toolchain go1.26.5 to go.mod (fixes Go stdlib CVEs)

Fixed — Go stdlib (2 CVEs)

No Fix Available

  • 58 RPM-level CVEs (curl-minimal, glib2, libarchive, libxml2, coreutils-single) — no upstream fix
  • 5 additional CVEs fixable via base image rebuild at build pipeline level

Note: Prior Darkstar PR #601 was closed unmerged — this PR supersedes it.

FedRAMP SLA: Critical/Important CVEs must be remediated within 30 days of detection.

About Project Darkstar

Summary by CodeRabbit

  • Chores
    • Updated the required Go toolchain version to 1.26.5 while retaining compatibility with Go 1.26.0.

…chain go1.26.5

Addresses CVE-2026-39822 (CVSS 7.5) and CVE-2026-42505 (CVSS 5.3).
Adds Go toolchain directive go1.26.5 to go.mod.

Ref: ROSAENG-63302
Project Darkstar — automated CVE remediation (contact: Kevin Seiter)
@openshift-ci-robot

openshift-ci-robot commented Aug 6, 2026

Copy link
Copy Markdown

@kseiter-rh: This pull request references ROSAENG-63302 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 vulnerability to target the "5.0.0" version, but no target version was set.

Details

In response to this:

[Project Darkstar] ROSAENG-63302: Remediate CVEs in managed-cluster-validating-webhooks

Changes

  • Add toolchain go1.26.5 to go.mod (fixes Go stdlib CVEs)

Fixed — Go stdlib (2 CVEs)

  • CVE-2026-39822 (stdlib, CVSS 7.5) — fix: Go 1.26.5+
  • CVE-2026-42505 (stdlib, CVSS 5.3) — fix: Go 1.26.5+

No Fix Available

  • 58 RPM-level CVEs (curl-minimal, glib2, libarchive, libxml2, coreutils-single) — no upstream fix
  • 5 additional CVEs fixable via base image rebuild at build pipeline level

Note: Prior Darkstar PR #601 was closed unmerged — this PR supersedes it.

FedRAMP SLA: Critical/Important CVEs must be remediated within 30 days of detection.

About Project Darkstar

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 Aug 6, 2026
@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 6, 2026
@openshift-ci

openshift-ci Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Walkthrough

The module configuration adds a Go 1.26.5 toolchain requirement while retaining the Go 1.26.0 module version.

Changes

Go toolchain configuration

Layer / File(s) Summary
Add Go 1.26.5 toolchain directive
go.mod
The module now requires the Go 1.26.5 toolchain. The module Go version remains 1.26.0.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs


Important

Pre-merge checks failed

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

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Ote Binary Stdout Contract ❌ Error The OTE binary writes logs to stdout via klog.SetOutput(os.Stdout) in cmd/main.go:48 and fmt.Println in the process-level fips init at cmd/fips.go:15. Redirect klog to os.Stderr (or use klog.LogToStderr(true)) and replace the FIPS init stdout print with stderr or GinkgoWriter-safe output.
✅ Passed checks (14 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 project, issue, and remediation of the two Go standard-library CVEs addressed by the toolchain update.
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 The PR changes only go.mod; no Ginkgo test declarations changed. Existing titles are static literals and contain no run-dependent names, timestamps, UUIDs, nodes, namespaces, or IPs.
Test Structure And Quality ✅ Passed The patch changes only go.mod; no Ginkgo test files or test constructs were added or modified, so the listed test-quality requirements are not applicable.
Microshift Test Compatibility ✅ Passed The commit changes only go.mod; it adds no Go test files or Ginkgo constructs, so the MicroShift test compatibility check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The PR changes only go.mod by adding toolchain go1.26.5; it adds no Ginkgo e2e tests, so SNO compatibility checks do not apply.
Topology-Aware Scheduling Compatibility ✅ Passed The PR changes only go.mod by adding toolchain go1.26.5; it adds or modifies no deployment manifests, operator code, controllers, or scheduling constraints.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The PR changes only go.mod by adding toolchain go1.26.5; no Ginkgo e2e tests or networking code were added, so this check is not applicable.
No-Weak-Crypto ✅ Passed The PR changes only go.mod by adding toolchain go1.26.5; searches found no MD5, SHA1, DES, RC4, Blowfish, ECB, custom crypto, or secret comparisons.
Container-Privileges ✅ Passed The PR changes only go.mod. No prohibited privilege setting appears in the patch; the deployment uses runAsNonRoot and allowPrivilegeEscalation: false.
No-Sensitive-Data-In-Logs ✅ Passed The patch changes only go.mod by adding toolchain go1.26.5; it adds no logging code or sensitive-data content.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@openshift-ci

openshift-ci Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

🤖 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 `@go.mod`:
- Around line 5-6: Enforce Go 1.26.5 in the release and build scripts rather
than relying only on the go.mod toolchain suggestion. Add an explicit version
check that fails with a clear message when the active toolchain differs, and
ensure any production builder container uses golang:1.26.5.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

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

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f5ab928c-98ce-4cd8-924c-5719ce6aafa1

📥 Commits

Reviewing files that changed from the base of the PR and between 838afc9 and 4aa2a0f.

📒 Files selected for processing (1)
  • go.mod

Comment thread go.mod
Comment on lines +5 to +6
toolchain go1.26.5

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 | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

fd -HI -t f . | while IFS= read -r file; do
  case "$file" in
    */go.mod|*/go.work|*/Dockerfile*|*/Makefile|*/.github/workflows/*|*.yaml|*.yml|*.sh)
      rg -n -H -C 2 \
        'GOTOOLCHAIN|go1\.26\.5|go version|setup-go|golang:|GOSUMDB|cosign|provenance|attest|sbom' \
        "$file" || true
      ;;
  esac
done

Repository: openshift/managed-cluster-validating-webhooks

Length of output: 6175


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf 'Repository files of interest:\n'
git ls-files | rg '(^go\.mod$|Dockerfile|\.github/workflows/|.*\.sh$|.*\.yaml$|hack/|build/)' | sed -n '1,200p'

printf '\nModule file:\n'
cat -n go.mod

printf '\nBuild/CI scripts mentioning go/build/tools:\n'
rg -n -H -C 2 'go( |\/)|build|test|make|GOTOOLCHAIN|go1\.|setup-go|golang:|Go:' \
  go.mod hack build .github 2>/dev/null || true

printf '\nTekton SBOM/signing references:\n'
for f in .tekton/*.yaml; do
  echo "--- $f"
  rg -n -C 3 'show-sbom|sign|signing|cosign|attest|provenance|sbom|release|push' "$f" || true
done

Repository: openshift/managed-cluster-validating-webhooks

Length of output: 30952


🌐 Web query:

Go toolchain directive recommended minimum toolchain GOTOOLCHAIN local module file suggested

💡 Result:

In Go, the toolchain directive in a go.mod file and the GOTOOLCHAIN environment variable serve complementary roles in managing which Go toolchain version is used for a project [1][2]. Toolchain Directive in go.mod The toolchain directive is used to declare a suggested minimum Go toolchain version for a module or workspace [1][3]. It is distinct from the go directive, which specifies the minimum Go language version required for the code [2][4]. Syntax: toolchain go1.21.4 Usage: 1. When you run a Go command, the toolchain directive acts as a suggestion [3][5]. If your currently installed (default) Go toolchain is older than the version specified in the toolchain directive, the Go command will automatically download and use the suggested version [1][6]. 2. If the toolchain directive is omitted, the Go command treats the version specified in the go directive as the default suggested toolchain [1][6]. 3. The toolchain directive does not impose requirements on other modules; it primarily ensures that anyone working within that specific module uses at least the specified version [2]. GOTOOLCHAIN Environment Variable The GOTOOLCHAIN environment variable provides a way to override or control how the Go command selects a toolchain at runtime [1][4]. Common Settings: - GOTOOLCHAIN=auto (Default): Allows the Go command to automatically switch toolchains based on the go or toolchain directives in your go.mod file [1][6]. - GOTOOLCHAIN=local: Disables automatic downloads. The Go command will only use the bundled toolchain installed on your system [6]. - GOTOOLCHAIN= (e.g., GOTOOLCHAIN=go1.21.3): Forces the Go command to use the specified version, downloading it if it is not already available [6][7]. - GOTOOLCHAIN=+auto: Uses the specified version by default but still allows upgrading to newer versions if requested by the go.mod file [1][2]. Summary for Best Practice For most projects, you do not need to set GOTOOLCHAIN manually; leaving it at the default (auto) is recommended [1][6]. Use the toolchain directive in your go.mod file to ensure that all contributors are using a consistent, minimum version of the Go toolchain, which improves reproducibility and prevents issues caused by using outdated toolchains [2][5].

Citations:


🌐 Web query:

Go vulnerability database CVE-2026-39822 Go version fixed 1.26.5

💡 Result:

CVE-2026-39822 is a security vulnerability in the Go standard library (specifically the os package) that allows for a "Root escape" via symbolic links when a trailing slash is present in the path [1][2][3]. On Unix systems, the os.Root functionality improperly followed symlinks to locations outside of the intended root directory if the final path component was a symbolic link and the path included a trailing slash (e.g., root.Open("symlink/")) [1][2][4]. This allowed potential unauthorized access to files outside of the defined root [1][2]. This vulnerability was addressed and fixed in Go version 1.26.5, which was released on July 7, 2026 [5][6][7]. Affected versions include: - Versions prior to 1.25.12 [3][4] - Versions from 1.26.0-0 up to (but not including) 1.26.5 [3][4] - Versions from 1.27.0-0 up to (but not including) 1.27.0-rc.2 [3][4] Users are advised to upgrade to the latest patch release in their respective Go version lines (such as 1.26.5 or 1.25.12) to mitigate this issue [5].

Citations:


🌐 Web query:

Go vulnerability database CVE-2026-42505 Go version fixed 1.26.5

💡 Result:

CVE-2026-42505 is a security vulnerability in the Go standard library's crypto/tls package, where the implementation of Encrypted Client Hello (ECH) would leak pre-shared key (PSK) identities during a handshake [1][2][3]. This information disclosure allowed a passive network observer to de-anonymize the server's hostname, even when ECH was intended to protect it [4][3]. This vulnerability was addressed in the Go 1.26.5 and Go 1.25.12 releases, which were published on July 7, 2026 [5][6][3]. Affected versions include: - All versions prior to 1.25.12 [2][7] - Go 1.26.0 through 1.26.4 [2][7] - Go 1.27.0-0 through 1.27.0-rc.1 [2][7] To remediate this vulnerability, users should upgrade to Go 1.26.5 (or 1.25.12 if using the 1.25 series) [5][3]. Detailed information regarding the fix can be found in the Go issue tracker (issue #79282) and the official Go release notes [4][5][6].

Citations:


Make the remediation pin enforce the patched toolchain.

toolchain go1.26.5 is a suggested toolchain and will not run in every build path. CI/scripts can disable automatic switching with GOTOOLCHAIN=local, and existing local/test paths do not enforce or log the Go version. Add that check to the release/build scripts, and keep the container golang: version at 1.26.5 if it is a production builder.

🤖 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` around lines 5 - 6, Enforce Go 1.26.5 in the release and build
scripts rather than relying only on the go.mod toolchain suggestion. Add an
explicit version check that fails with a clear message when the active toolchain
differs, and ensure any production builder container uses golang:1.26.5.

Source: Path instructions

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

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. 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