fix(deps): bump golang.org/x/net from 0.57.0 to 0.62.0 #3341
<!-- coderabbit-ai-generated:v1 -->
<!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- review_stack_entry_start -->
<a href="https://app.coderabbit.ai/change-stack/kubeflow/spark-operator/pull/3341?scope=ghh_OusAJGA4HG8ljoOV0wJvVx8NmnZIjc2DdjmxOu0xZWA&cs_source=review_comment"><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-buttons-v1/explain-change-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-buttons-v1/explain-change.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-buttons-v1/explain-change.svg" alt="Explain Change →" height="32"></picture></a>
<!-- review_stack_entry_end -->
<!-- recent_review_status_start -->
No actionable comments were generated in the recent review.
<!-- recent_review_status_end -->
<!-- walkthrough_start -->
<details>
<summary><strong>Summary</strong></summary>
<dl>
<dd>
<br>
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
Chores
Updated underlying components; no user-facing changes are included in this release.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
The go.mod file upgrades golang.org/x/mod and six indirect dependencies. The golang.org/x/oauth2 version remains unchanged.
Changes: Go dependency updates
|Layer / File(s)|Summary|
|:---|:---|
|Update Go dependency versions <br> go.mod|golang.org/x/mod and six indirect dependencies are upgraded. golang.org/x/oauth2 remains at v0.36.0.|
<!-- change_assessment_start -->
Estimated code review effort: 1 (Trivial) | ~5 minutes
<!-- change_assessment_commit:"2814e9fa89b23d826936a020430372f8be3f6065" -->
<!-- change_assessment_priority:{"version":1,"urgency":"p2","manual":false} -->
Change: Other
<!-- change_assessment_end -->
Possibly related PRs
Suggested labels: dependencies, go
Suggested reviewers: yindia, vjanelle
</dd>
</dl>
</details>
<!-- walkthrough_end -->
<details>
<summary><strong>Merge Risk:</strong> <strong><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/risk-unassessed-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Minimal</strong> · up to <code>2814e</code> · assessed changes only</summary>
<dl>
<dd>
<br>
<!-- final_review_risk_start -->
<!-- final_review_risk_label
Merge Risk: ⚪ Minimal · up to 2814e
-->
<!-- final_review_risk_coverage:{"sourceCommitId":"2814e9fa89b23d826936a020430372f8be3f6065","coveredCommitId":"2814e9fa89b23d826936a020430372f8be3f6065","kind":"reviewed","pathFiltersExcludedFiles":true} -->
Path filters excluded changed files. This rating applies only to the assessed changes.
<!-- final_review_risk_end -->
</dd>
</dl>
</details>
<details>
<summary><strong>Architecture risk:</strong> <strong><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/risk-low-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Low</strong> · up to <code>2814e</code></summary>
<dl>
<dd>
<br>
<!-- architecture_review_start -->
<!-- architecture_review_label
Architecture Summary
Architecture risk: 🔵 Low · up to 2814e
-->
The change affects 1 source area.
Changed areas: go.mod
<details>
<summary><strong>Review details</strong></summary>
<dl>
<dd>
<br>
Systems and components
Before / after behavior
golang.org/x/mod dependency from v0.37.0 to v0.41.0.golang.org/x/net, x/sync, x/sys, x/term, x/text, and x/tools dependencies. golang.org/x/oauth2 remains at v0.36.0.</dd>
</dl>
</details>
<!-- architecture_review_end -->
</dd>
</dl>
</details>
<!-- pre_merge_checks_walkthrough_start -->
<details>
<summary><strong>Pre-merge checks: <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-passed-14-v2.svg" width="14" height="14" align="middle" alt="Passed" title="Passed"></picture></sup> 4</strong></summary>
<dl>
<dd>
<br>
| Check name | Status | Explanation |
| :------------------------ | :--------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Title check | !Passed | The title names the main change: bumping golang.org/x/net from 0.57.0 to 0.62.0. The raw summary confirms go.mod now carries x/net v0.62.0 and related indirect bumps. The title does not mention the tr… |
| 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. |
| Description check | !Passed | The description states that the PR bumps the indirect golang.org/x/net requirement from v0.57.0 to v0.62.0 to fix govulncheck-reported vulnerabilities. It also lists the transitive updates to x/mod, x… |
<details>
<summary><strong>Full details: Title check</strong></summary>
<dl>
<dd>
<br>
Explanation
The title names the main change: bumping golang.org/x/net from 0.57.0 to 0.62.0. The raw summary confirms go.mod now carries x/net v0.62.0 and related indirect bumps. The title does not mention the transitive upgrades, which is acceptable.
</dd>
</dl>
</details>
<details>
<summary><strong>Full details: Description check</strong></summary>
<dl>
<dd>
<br>
Explanation
The description states that the PR bumps the indirect golang.org/x/net requirement from v0.57.0 to v0.62.0 to fix govulncheck-reported vulnerabilities. It also lists the transitive updates to x/mod, x/sync, x/sys, x/term, x/tools and x/text, and the local checks that were run. This directly describes the go.mod changes in the changeset, so it is related and specific.
</dd>
</dl>
</details>
</dd>
</dl>
</details>
<!-- pre_merge_checks_walkthrough_end -->
<!-- finishing_touch_checkbox_start -->
<details>
<summary><strong>Finishing Touches</strong></summary>
<dl>
<dd>
<br>
<details open>
<summary><strong>Generate unit tests (beta)</strong></summary>
<dl>
<dd>
<br>
</dd>
</dl>
</details>
</dd>
</dl>
</details>
<!-- finishing_touch_checkbox_end -->
<!-- autopilot:start -->
<!-- autopilot:end -->
<!-- recent_review_start -->
<h6>
<details>
<summary><strong><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/info.svg" width="12" height="12" align="absmiddle" alt=""></picture> Recent review info</strong></summary>
<dl>
<dd>
<br>
<!-- review_info_content -->
<details>
<summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog.svg" width="16" height="16" align="absmiddle" alt=""></picture> Run configuration</strong></summary>
<dl>
<dd>
<br>
05ee3aff-84e9-4130-837b-f65c930d8a19</dd>
</dl>
</details>
<details>
<summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal.svg" width="16" height="16" align="absmiddle" alt=""></picture> Commits</strong></summary>
<dl>
<dd>
<br>
Reviewing files that changed from the base of the PR and between 1fc78e27bf3ee3a19e23564a9851ed53614816d0 and 2814e9fa89b23d826936a020430372f8be3f6065.
</dd>
</dl>
</details>
<details>
<summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-minus-corner-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-minus-corner.svg" width="16" height="16" align="absmiddle" alt=""></picture> Files ignored due to path filters: 1</strong></summary>
<dl>
<dd>
<br>
go.sum is excluded by !/.sum, !*/go.sum
</dd>
</dl>
</details>
<details>
<summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner.svg" width="16" height="16" align="absmiddle" alt=""></picture> Files selected for processing: 1</strong></summary>
<dl>
<dd>
<br>
go.mod
</dd>
</dl>
</details>
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
</dd>
</dl>
</details>
</h6>
<!-- recent_review_end -->
LGTM
/lgtm
/ok-to-test
/approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: <a href="https://github.com/kubeflow/spark-operator/pull/3341#pullrequestreview-6120830251" title="Approved">nabuskey</a>
The full list of commands accepted by this bot can be found here.
The pull request process is described 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
</details>
<!-- META={"approvers":[]} -->
nabuskey
atiasadir
Purpose of this PR
govulncheck reports five vulnerabilities in
golang.org/x/netv0.57.0 whose vulnerable functions are called from this module. v0.62.0 fixes them:It also clears GO-2026-6860 and GO-2026-6866 (x/net html), GO-2026-6629 (x/text), and GO-2026-6179 and GO-2026-6180 (x/mod), which govulncheck reports at module level.
golang.org/x/netis an// indirectrequirement in go.mod. Dependabot's version updates skip indirect Go requirements by default, and none of these CVEs has a reviewed GitHub advisory, so no open Dependabot PR covers x/net.Proposed changes:
golang.org/x/netfrom v0.57.0 to v0.62.0 in the root module (go get golang.org/x/net@v0.62.0, thengo mod tidy).golang.org/x/textv0.43.0 it requires also raisegolang.org/x/mod(v0.37.0 to v0.41.0, a direct requirement),x/sync,x/sys,x/termandx/tools.go 1.26.0andtoolchain go1.26.10lines don't change.test/e2ealready requires x/net v0.62.0 and stays tidy.Change Category
Rationale
v0.60.0 is the lowest version that fixes the five called vulnerabilities. v0.62.0 also fixes GO-2026-6860 and GO-2026-6866, keeps the same go line, and matches the version
test/e2ealready uses.Checklist
Additional Notes
Checked locally with Go 1.26.10:
go build ./...,make go-fmt go-vet,make unit-test,make go-lintand the code-check tidy step (go mod tidy,go -C test/e2e mod tidy,git diff --quiet) all pass.govulncheck v1.10.0 on the root module, before and after:
| ID | Before | After |
| --- | --- | --- |
| GO-2026-6603, GO-2026-6610, GO-2026-6611, GO-2026-6612, GO-2026-6617 (x/net) | called | fixed |
| GO-2026-6860, GO-2026-6866 (x/net) | required | fixed |
| GO-2026-6629 (x/text) | required | fixed |
| GO-2026-6179, GO-2026-6180 (x/mod) | required | fixed |
| GO-2026-6974 (otel/trace) | imported | imported, addressed by #3306 |
| GO-2026-6975 (otel) | required | required, addressed by #3306 |
| GO-2026-6859 (standard library) | called | called, needs Go 1.26.11 or 1.27.4 |
Called means a vulnerable function is reachable, imported means only the package is imported, and required means only the module is required.
test/e2e(govulncheck -test ./...) reports the same before and after: GO-2026-6859 (standard library) and GO-2026-5932 (x/crypto/openpgp, required only).The x/mod bump is the same version #3327 proposes, so whichever merges second may need a rebase.
AI use: I used GitHub Copilot to help prepare this change and run the checks above.