Skip to content

fix(deps): bump Go to 1.26.4 and x/net to v0.55.0 to close OSV advisories - #2852

Merged
Aleksei Sviridkin (lexfrei) merged 2 commits into
mainfrom
fix/go-vuln-bumps
Jun 17, 2026
Merged

Aleksei Sviridkin (lexfrei) merged 2 commits into
mainfrom
fix/go-vuln-bumps

Conversation

@myasnikovdaniil

@myasnikovdaniil myasnikovdaniil commented Jun 8, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does

Clears the OpenSSF Scorecard Vulnerabilities check (was 0/10). Scorecard queries OSV against the dependency graph, so reproducing it with osv-scanner over both go.mod files surfaced 12 advisories:

Advisory Package Fixed in
GO-2026-4918, 4971, 4977, 4980, 4982, 4986 stdlib (Go toolchain) 1.26.3
GO-2026-5037, 5038, 5039 stdlib (Go toolchain) 1.26.4
GO-2026-4918, GO-2026-5026 golang.org/x/net 0.55.0

10 of 12 are stdlib advisories against the Go toolchain pinned at 1.26.2 — so the dominant fix is raising the Go directive, not churning dependencies.

Changes

  • Go directive 1.26.2 → 1.26.4 in the root module and the api/apps/v1alpha1 submodule (closes all 10 stdlib advisories; 1.26.4 is required for GO-2026-5037/5038/5039).
  • golang.org/x/net 0.52.0 → 0.55.0 (closes GO-2026-4918, GO-2026-5026). go mod tidy carried the matching minor bumps to x/crypto, x/sys, x/term, x/text, x/tools via MVS.

All version changes were made with go mod edit / go get / go mod tidy — the generated go.mod was not hand-edited.

Verification

  • osv-scanner after the bump: Total 0 packages affected by 0 known vulnerabilities.
  • go build ./... passes on both modules (toolchain auto-upgraded to go1.26.4).
  • make generate produces no drift — codegen-drift CI stays green.

Maintenance note: the Renovate config (separate PR) deliberately does not auto-bump the Go toolchain directive, so future stdlib advisories (1.26.5+) will need a manual bump like this one. If you'd prefer Renovate to keep the Go patch version current automatically, that rule can be enabled — flagged for a decision.

Release note

fix(deps): bump Go to 1.26.4 and golang.org/x/net to v0.55.0, closing 12 known OSV advisories (10 stdlib, 2 in x/net)

Summary by CodeRabbit

  • Chores
    • Updated the Go toolchain to the latest 1.26.x release for improved build reliability and runtime compatibility.
    • Bumped several indirect Go module dependencies (networking, crypto, system, terminal, text, and tooling libraries) to newer stable versions to enhance stability and security.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses 12 security advisories identified by the OpenSSF Scorecard and OSV scanner. By upgrading the Go toolchain and updating specific networking dependencies, the project has successfully cleared its vulnerability scan results while maintaining build and generation integrity.

Highlights

  • Go Toolchain Upgrade: Updated the Go version directive from 1.26.2 to 1.26.4 in both the root and api/apps/v1alpha1 modules to resolve 10 standard library security advisories.
  • Dependency Updates: Bumped golang.org/x/net from 0.52.0 to 0.55.0 and performed a go mod tidy to update related sub-dependencies, addressing 2 known vulnerabilities.
  • Security Verification: Confirmed that the changes result in zero vulnerabilities according to osv-scanner and verified that the project remains stable with no drift in generated code.
New Features

🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment Gemini (@gemini-code-assist) Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on Gemini (@gemini-code-assist) comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@coderabbitai

coderabbitai Bot commented Jun 8, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d54d489f-3fea-459a-b062-98aa210a4281

📥 Commits

Reviewing files that changed from the base of the PR and between c337915 and d739663.

⛔ Files ignored due to path filters (2)
  • api/apps/v1alpha1/go.sum is excluded by !**/*.sum
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • api/apps/v1alpha1/go.mod
  • go.mod
✅ Files skipped from review due to trivial changes (1)
  • go.mod
🚧 Files skipped from review as they are similar to previous changes (1)
  • api/apps/v1alpha1/go.mod

📝 Walkthrough

Walkthrough

Go toolchain directives bumped from 1.26.2 to 1.26.4 in go.mod and api/apps/v1alpha1/go.mod. The main go.mod also updates several indirect golang.org/x/* dependency versions (crypto, net, sys, term, text, tools).

Changes

Go Toolchain and Dependency Maintenance

Layer / File(s) Summary
Go toolchain and indirect dependency updates
api/apps/v1alpha1/go.mod, go.mod
Go go directive bumped to 1.26.4 in both module files. Main go.mod indirect pins updated: golang.org/x/crypto, golang.org/x/net, golang.org/x/sys, golang.org/x/term, golang.org/x/text, and golang.org/x/tools moved to newer versions.

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs:

  • cozystack/cozystack#2850: Renovate-related PR that intersects with Go toolchain and golang.org/x/* dependency updates.

Suggested reviewers:

  • androndo
  • sircthulhu
  • kvaps
  • lllamnyp
  • IvanHunters

"A rabbit hops through the module tree,
Tweaking pins with nimble feet,
1.26.4 now lights the way,
golang/x/* refreshed today,
Happy builds and tidy deps! 🐰"

🚥 Pre-merge checks | ✅ 5
✅ 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 and specifically summarizes the main changes: bumping Go to 1.26.4 and golang.org/x/net to v0.55.0 to address OSV security advisories, which directly matches the changeset.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/go-vuln-bumps

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 and usage tips.

@github-actions github-actions Bot added area/uncategorized PR auto-labeler could not map title scope to a known area/*; please review kind/bug Categorizes issue or PR as related to a bug size/S This PR changes 10-29 lines, ignoring generated files labels Jun 8, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request updates the Go version from 1.26.2 to 1.26.4 and bumps several golang.org/x dependencies in the main module. A security-related review comment points out that the api/apps/v1alpha1 submodule still uses a vulnerable version of golang.org/x/net (v0.53.0) as an indirect dependency, and recommends upgrading it to v0.55.0 to address known vulnerabilities.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread api/apps/v1alpha1/go.mod
module github.com/cozystack/cozystack/api/apps/v1alpha1

go 1.26.2
go 1.26.4

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.

security-high high

The api/apps/v1alpha1 submodule still uses golang.org/x/net v0.53.0 as an indirect dependency, which is vulnerable to GO-2026-4918 and GO-2026-5026. To fully resolve these advisories across the repository, update golang.org/x/net to v0.55.0 in api/apps/v1alpha1/go.mod as well by running go get golang.org/x/[email protected] and go mod tidy inside the api/apps/v1alpha1 directory.

@myasnikovdaniil myasnikovdaniil self-assigned this Jun 9, 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.

NOT LGTM — the api/apps/v1alpha1 submodule still ships golang.org/x/net v0.53.0, which remains affected by GO-2026-5026, so the PR does not fully close the OSV set it targets.

Business context: clear the OpenSSF Scorecard Vulnerabilities check by closing the OSV advisories that osv-scanner surfaces over both go.mod files (10 stdlib via the Go toolchain bump, 2 in golang.org/x/net).

Blockers

B1: submodule api/apps/v1alpha1 left on vulnerable x/net v0.53.0

File: api/apps/v1alpha1/go.mod

Issue: the PR bumps the go directive to 1.26.4 in the submodule but leaves golang.org/x/net at v0.53.0; only the root module is raised to v0.55.0.

Evidence: osv.dev reports GO-2026-5026 (golang.org/x/net/idna, failure to reject ASCII-only Punycode-encoded labels) with range introduced: 0, fixed: 0.55.0, so v0.53.0 is affected. The submodule's import graph includes golang.org/x/net/idna (go list -deps ./...) — the exact package the advisory names. There is no go.work, and the root module does not require the submodule, so MVS does not lift it to v0.55.0; it is scanned and built as an independent module at v0.53.0. The "osv-scanner: 0 vulnerabilities" verification therefore does not hold for the submodule. GO-2026-4918, the other x/net advisory, is fixed in 0.53.0 and is correctly closed.

Impact: Scorecard's Vulnerabilities check scans every go.mod in the repo, so GO-2026-5026 stays open against the submodule and the check will not reach 10/10 — the PR's stated goal is not met.

Fix: bump x/net in the submodule as well — cd api/apps/v1alpha1 && go get golang.org/x/[email protected] && go mod tidy — then re-run osv-scanner over both modules to confirm 0 advisories.

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.

LGTM — the api/apps/v1alpha1 submodule is now on golang.org/x/net v0.55.0, closing GO-2026-5026, so the OSV set is fully cleared across both modules.

Business context: clear the OpenSSF Scorecard Vulnerabilities check by closing the OSV advisories that osv-scanner surfaces over both go.mod files (10 stdlib via the Go toolchain bump, 2 in golang.org/x/net).

Resolved: the submodule moved from x/net v0.53.0 to v0.55.0, which closes GO-2026-5026 (golang.org/x/net/idna, the package the submodule imports); the root module was already on v0.55.0, and both modules build clean. With the Go directive at 1.26.4 in both modules (the 10 stdlib advisories) and x/net at v0.55.0 in both (GO-2026-4918, fixed in 0.53.0, and GO-2026-5026, fixed in 0.55.0), no OSV advisory remains across the dependency graph.

myasnikovdaniil and others added 2 commits June 10, 2026 20:23
…ries

Clears the OpenSSF Scorecard Vulnerabilities check (was 0/10). An
osv-scanner pass over both go.mod files reported 12 advisories:

- 10 stdlib advisories against the Go toolchain pinned at 1.26.2
  (GO-2026-4918/4971/4977/4980/4982/4986 fixed in 1.26.3;
  GO-2026-5037/5038/5039 fixed in 1.26.4) — closed by raising the go
  directive to 1.26.4 in both the root module and api/apps/v1alpha1.
- golang.org/x/net 0.52.0 (GO-2026-4918, GO-2026-5026) — bumped to
  v0.55.0; go mod tidy carried the matching x/crypto, x/sys, x/term,
  x/text and x/tools minor bumps via MVS.

After the bump osv-scanner reports 0 advisories. Both modules build,
and 'make generate' produces no drift (codegen-drift stays green).
Versions were changed with 'go mod edit'/'go get'/'go mod tidy', not by
hand-editing the generated go.mod.

Signed-off-by: Myasnikov Daniil <[email protected]>
Assisted-By: Claude <[email protected]>
…odule

The submodule still pulled golang.org/x/net v0.53.0, affected by GO-2026-5026
(failure to reject ASCII-only Punycode-encoded labels in golang.org/x/net/idna,
which the submodule imports). The root module was already on v0.55.0; align the
submodule so the advisory is closed across both go.mod files.

Assisted-By: Claude <[email protected]>
Signed-off-by: Aleksei Sviridkin <[email protected]>
@lexfrei
Aleksei Sviridkin (lexfrei) merged commit 8c411d8 into main Jun 17, 2026
12 of 19 checks passed
@lexfrei
Aleksei Sviridkin (lexfrei) deleted the fix/go-vuln-bumps branch June 17, 2026 08:59
myasnikovdaniil added a commit that referenced this pull request Jun 24, 2026
#3019)

## What this PR does

Restores the OpenSSF Scorecard **Vulnerabilities** check to green. It
regressed to **0/10** after #2852: in the weeks since,
`golang.org/x/crypto v0.51.0` accrued **13 new advisories**
(`GO-2026-5005`, `5006`, `5013`–`5021`, `5023`, `5033`). An
`osv-scanner` pass over `main` confirmed all 13 trace to that single
package.

### Change

- **`golang.org/x/crypto 0.51.0 → 0.52.0`** (the fixed version for all
13). No transitive cascade — `go mod tidy` changed only this line plus
its two `go.sum` hashes.

Bumped with `go get` / `go mod tidy`, not by hand-editing the generated
`go.mod`.

### Verification

- `osv-scanner` after the bump: **No issues found** (0 advisories across
both modules).
- `go build ./...` passes.
- `make generate` produces **no drift** — `codegen-drift` stays green.

> Scorecard's report mentioned advisory IDs as low as `GO-2025-3512`
(kubevirt-csi, CVE-2024-1725). That package is **not** in `go.mod` or
`go.sum` — it isn't a cozystack dependency, so nothing to bump there.
The real cluster is the 13 x/crypto advisories this PR closes.

### Why this keeps happening (and the durable fix)

`x/crypto` is an **indirect** dependency, and the Renovate app isn't
actually opening PRs on this repo yet (no `renovate[bot]` PRs, no
Dependency Dashboard) — the org Renovate install needs
`cozystack/cozystack` added to its repo list. Until then, indirect-dep
and Go-toolchain advisories will keep knocking this check back to 0 and
need manual bumps like this one. Recommended follow-ups: enable Renovate
on the repo, and allow it to bump indirect deps (and optionally the Go
patch version).

### Release note

```release-note
fix(deps): bump golang.org/x/crypto to v0.52.0, closing 13 known OSV advisories (GO-2026-5005…5033)
```


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Updated cryptographic dependency to the latest patch version for
enhanced security and stability.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
pull Bot pushed a commit to medampudi/cozystack that referenced this pull request Jun 24, 2026
Restores the OpenSSF Scorecard Vulnerabilities check to green. It
regressed to 0/10 after cozystack#2852 because golang.org/x/crypto v0.51.0 accrued
13 new advisories (GO-2026-5005, 5006, 5013-5021, 5023, 5033). osv-scanner
confirms all 13 trace to that one indirect package; v0.52.0 is the fixed
version. go mod tidy changed only this line and its two go.sum hashes.

After the bump osv-scanner reports no issues, both modules build, and
'make generate' produces no drift. Versions were changed with go get /
go mod tidy, not by hand-editing the generated go.mod.

Signed-off-by: Myasnikov Daniil <[email protected]>
Assisted-By: Claude <[email protected]>
Aleksei Sviridkin (lexfrei) added a commit that referenced this pull request Jun 25, 2026
…#2941)

## What this PR does

Completes the Go-toolchain modernization for first-party images — the
build-time counterpart to #2852, which raised the root and `api/`
modules to Go 1.26.4.

1. **First-party image Go modules → go 1.26.4** (`token-proxy`,
`kube-ovn-webhook`, `kubevirt-csi-driver`): raise the `go` directive and
refresh dependencies. `kube-ovn-webhook` moves `k8s.io/*` 0.26 → 0.36.2
(only long-stable admission/core API is used); `kubevirt-csi-driver`
keeps its existing replace-based k8s alignment at 0.36.0 (main's
refactor owns that module's pin) and raises the `go` directive, with the
`golang.org/x/net` 0.56.0 security bump — which clears the reachable
GO-2026-5026 — reapplied. Adds two `.gitignore` files so the
locally-built binaries can't be committed.
2. **Go builder images → `golang:1.26`** across 8 images still on
EOL/behind toolchains (golang 1.20, 1.20.6, 1.23.4, 1.24, 1.25):
`cluster-autoscaler`, `kubevirt-cloud-provider`, `redis-operator`,
`multus-cni`, `keycloak-operator`, `objectstorage`, `kilo`,
`linstor-csi`. The builder image tag — not the go.mod minimum — sets the
standard-library version baked into the binary, so these still shipped
unpatched stdlib on a plain rebuild.

Verified: `GOOS=linux go build`/`go vet` pass for all three modules and
`go mod tidy` is a no-op; the three biggest builder jumps
(redis-operator, kubevirt-cloud-provider, cluster-autoscaler — all
formerly Go 1.20.x/1.23.x) were verified with a local `docker build`;
the remaining five (1.24/1.25 → 1.26) are covered by CI image builds.

### Release note

```release-note
chore(platform): raise the Go toolchain to 1.26 across first-party images to clear standard-library security advisories
```


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
* Updated several container build environments to a newer Go release for
consistency across Kubernetes-related components.
* Refreshed module and dependency versions in a few services to keep
builds current.
* Expanded ignore rules for generated image artifacts so build outputs
aren’t tracked.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/uncategorized PR auto-labeler could not map title scope to a known area/*; please review kind/bug Categorizes issue or PR as related to a bug size/S This PR changes 10-29 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants