Skip to content

fix(deps): bump golang.org/x/crypto to v0.52.0 to close OSV advisories - #3019

Merged
myasnikovdaniil merged 1 commit into
mainfrom
fix/go-vuln-xcrypto
Jun 24, 2026
Merged

myasnikovdaniil merged 1 commit into
mainfrom
fix/go-vuln-xcrypto

Conversation

@myasnikovdaniil

@myasnikovdaniil myasnikovdaniil commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

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

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

Summary by CodeRabbit

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

Restores the OpenSSF Scorecard Vulnerabilities check to green. It
regressed to 0/10 after #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]>
@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 a security regression in the project's dependency tree by bumping the golang.org/x/crypto package. The update ensures that the project remains compliant with security standards by mitigating multiple known vulnerabilities, verified through automated scanning and build checks.

Highlights

  • Dependency Update: Updated golang.org/x/crypto from v0.51.0 to v0.52.0 to resolve 13 identified OSV security advisories.
  • Security Compliance: Restored the OpenSSF Scorecard Vulnerabilities check to a passing state (10/10) following verification with osv-scanner.
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. ↩

@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/XS This PR changes 0-9 lines, ignoring generated files labels Jun 23, 2026
@dosubot dosubot Bot added security Security-related issues and features security/fixed Fix released labels Jun 23, 2026
@coderabbitai

coderabbitai Bot commented Jun 23, 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: 061d997c-3e83-4b64-b566-6ed4d72c1b4c

📥 Commits

Reviewing files that changed from the base of the PR and between 0e2e6e1 and 7ee54d9.

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

📝 Walkthrough

Walkthrough

Updates the indirect dependency golang.org/x/crypto in go.mod from v0.51.0 to v0.52.0. No other dependencies, directives, or module constraints are changed.

Changes

golang.org/x/crypto Bump

Layer / File(s) Summary
golang.org/x/crypto v0.51.0 → v0.52.0
go.mod
Single indirect dependency line updated from v0.51.0 to v0.52.0.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • cozystack/cozystack#2852: Also modifies go.mod to bump golang.org/x/crypto, changing it from v0.50.0 to v0.51.0, directly preceding the version bump in this PR.

Suggested labels

kind/bug, size/S, area/uncategorized

Suggested reviewers

  • kvaps
  • lllamnyp
  • androndo
  • IvanHunters
  • sircthulhu

Poem

🐇 A tiny hop in go.mod today,
crypto jumps from fifty-one to two,
No fanfare needed, just one line to change,
The rabbit stamps it: patch approved, adieu!
✨ Small updates keep the burrow safe!

🚥 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 accurately summarizes the main change: bumping golang.org/x/crypto to v0.52.0 to resolve security advisories, which aligns with the PR's primary objective.
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-xcrypto

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.

@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 golang.org/x/crypto dependency from version v0.51.0 to v0.52.0 in go.mod and go.sum. There are no review comments, and I have no feedback to provide.

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.

@myasnikovdaniil
myasnikovdaniil merged commit 374cac1 into main Jun 24, 2026
17 checks passed
@myasnikovdaniil
myasnikovdaniil deleted the fix/go-vuln-xcrypto branch June 24, 2026 06:48
myasnikovdaniil added a commit that referenced this pull request Jun 25, 2026
Renovate skips indirect gomod deps by default, so transitive modules
(golang.org/x/crypto, x/net, x/sys) that carry OSV advisories never get
a PR — leaving the OpenSSF Scorecard Vulnerabilities check pinned at 0
even after #3019 bumped x/crypto in the root module only.

- enable indirect gomod updates, grouped into one rolling PR
- turn on osvVulnerabilityAlerts so vulnerable deps get dedicated,
  mergeable security PRs (labeled `security`, not `do-not-merge/hold`)

Does not address GO-2025-3512 (kubevirt.io/csi-driver): no fixed version
exists upstream and Renovate cannot resolve the module, so the
Vulnerabilities check stays at 0 until that advisory is suppressed or
patched separately.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: Myasnikov Daniil <[email protected]>
myasnikovdaniil added a commit that referenced this pull request Jun 27, 2026
## What

Makes Renovate open the dependency PRs that close the OpenSSF Scorecard
`Vulnerabilities` advisories, instead of doing them by hand (as in
#3019).

- Enable **indirect** gomod updates (grouped into one rolling "indirect
go modules" PR). Renovate skips indirect Go deps by default, which is
why `golang.org/x/crypto`, `x/net`, and `x/sys` — the transitive deps
carrying the 20 OSV advisories — never got a PR.
- Enable **`osvVulnerabilityAlerts`** so vulnerable deps get dedicated,
mergeable security PRs (labeled `security`, not the global
`do-not-merge/hold`).

## Why #3019 wasn't enough

#3019 bumped `x/crypto` in the **root** module only. The repo has 5
`go.mod` modules; the same advisories live in `token-proxy` (x/crypto
v0.50.0), `kubevirt-csi-driver`, and `kubeovn-webhook` (x/net / x/sys).
The Scorecard `Vulnerabilities` check scans repo-wide and is
all-or-nothing, so the count never dropped (still 0/10, 21 advisories).

## Known gap

This does **not** fix `GO-2025-3512` (`kubevirt.io/csi-driver`): no
fixed version exists upstream and Renovate can't even resolve the module
(`no-result` in the Dependency Dashboard #2996). Until that one advisory
is suppressed via `.osv-scanner.toml` or patched upstream, the
Vulnerabilities check stays at 0/10. Tracked separately as a follow-up.

## Validation

- `renovate-config-validator`: **Config validated successfully**.

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

* **New Features**
  * Added support for automated handling of vulnerability alerts.
* Enabled updates for indirect Go module dependencies and grouped them
together for easier review.
* **Chores**
* Updated automation settings to label security-related update pull
requests appropriately.
<!-- 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 security/fixed Fix released security Security-related issues and features size/XS This PR changes 0-9 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants