Skip to content

chore(deps): Bump go directive to 1.25.11#3114

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 5 commits into
mainfrom
CVE-2025-68121/wassim.dhif/bump-go-directives-1.25.11
Jun 11, 2026
Merged

chore(deps): Bump go directive to 1.25.11#3114
gh-worker-dd-mergequeue-cf854d[bot] merged 5 commits into
mainfrom
CVE-2025-68121/wassim.dhif/bump-go-directives-1.25.11

Conversation

@wdhif

@wdhif wdhif commented Jun 9, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Two related changes

  1. hack/update-golang.sh split logic: writes the full Go patch version ($GOVERSION) to go.mod and test/e2e/go.mod, but keeps api/go.mod at the minor-only form ($new_minor_version). This eliminates spurious patch-level CVE findings on non-api modules without forcing a stricter go directive on the public api/ submodule.
  2. Resulting bumps from running the updated script: go.mod go 1.25.71.25.11 and test/e2e/go.mod go 1.25.81.25.11. api/go.mod stays at go 1.25.0.

Motivation

The SCA scanner flagged the operator repo for CVE-2025-68121 / GO-2026-4337 (a crypto/tls session-resumption bug in stdlib < go1.25.7). Looking at it:

  • The toolchain directive was already pinned to go1.25.11 repo-wide, so built binaries are clean (go version -m ./managergo1.25.11). The runtime was never exposed.
  • Static scanners read the go directive literally as "minimum stdlib version" and flag every patch CVE fixed between that value and the running toolchain, even though the actual build is unaffected.
  • The existing update-golang.sh convention of writing minor-only (go 1.X) to all go.mod files made this worse: every script run normalized e.g. go 1.25.0 for api/go.mod, keeping the scanner noise alive across patch versions.

The fix is to split the convention along module-purpose lines:

  • go.mod and test/e2e/go.mod are internal to this repo (not imported by external projects), so writing the full patch version is safe and silences SCA noise without breaking anyone.
  • api/go.mod is a types-only CRD module imported by other projects (Agent, EDS, dd-source autoscaling, ...). A stricter go directive would force consumers off Go n-1 for no real benefit: the module ships no runtime code, so stdlib CVEs cannot trigger from it. Keeping it minor-only preserves Go's standard n-1/n compatibility guarantee for consumers. The api/-specific scanner finding will be handled via SCA suppression separately.

Additional Notes

  • No behavior change at build/runtime — toolchain was already go1.25.11.
  • Future make update-golang runs produce the same asymmetric output deterministically, so CI's check-golang-version job stays green.

Minimum Agent Versions

  • Agent: N/A
  • Cluster Agent: N/A

Describe your test plan

  • make managergobuild — clean build
  • make lintgo vet + golangci-lint both clean (0 issues)
  • make verify-licenses — pass
  • make update-golang && git diff --exit-code — reproduces clean (this is what the check-golang-version CI job runs)
  • api/go.mod confirmed at go 1.25.0 matching main; go.mod and test/e2e/go.mod at go 1.25.11

Checklist

  • PR has at least one valid label — apply dependencies and tooling
  • PR has a milestone or the qa/skip-qa label — recommend qa/skip-qa (no runtime change)
  • All commits are signed (see: signing commits)

@wdhif wdhif added this to the v1.28.0 milestone Jun 9, 2026
@wdhif wdhif added the dependencies Pull requests that update a dependency file label Jun 9, 2026
@datadog-prod-us1-5

datadog-prod-us1-5 Bot commented Jun 9, 2026

Copy link
Copy Markdown

Code Coverage

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 43.17% (-0.61%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: edd1c8c | Docs | Datadog PR Page | Give us feedback!

@codecov-commenter

codecov-commenter commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 42.94%. Comparing base (68287b2) to head (edd1c8c).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3114      +/-   ##
==========================================
- Coverage   43.49%   42.94%   -0.55%     
==========================================
  Files         352      354       +2     
  Lines       30025    30545     +520     
==========================================
+ Hits        13058    13117      +59     
- Misses      16095    16555     +460     
- Partials      872      873       +1     
Flag Coverage Δ
unittests 42.94% <ø> (-0.55%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 7 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 68287b2...edd1c8c. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@wdhif
wdhif force-pushed the CVE-2025-68121/wassim.dhif/bump-go-directives-1.25.11 branch from eb649ca to 459b504 Compare June 9, 2026 12:12
@wdhif
wdhif marked this pull request as ready for review June 9, 2026 12:21
@wdhif
wdhif requested review from a team and Copilot June 9, 2026 12:22

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 459b5041f0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread hack/update-golang.sh Outdated

Copilot AI 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.

Pull request overview

This PR aligns the repository’s Go version declarations by updating the go directives in all modules to the full patch version (1.25.11) and adjusting the Go update automation script so future bumps don’t drift between files.

Changes:

  • Update hack/update-golang.sh to write the full $GOVERSION (patch included) into each module’s go directive.
  • Bump go directives in go.mod, api/go.mod, and test/e2e/go.mod to 1.25.11.
  • Remove toolchain go... directives from the module go.mod files as part of the version alignment/tidy outcome.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
hack/update-golang.sh Updates Go version propagation logic for module go directives (now patch-inclusive).
go.mod Bumps module go directive to 1.25.11 and drops toolchain directive.
api/go.mod Bumps module go directive to 1.25.11 and drops toolchain directive.
test/e2e/go.mod Bumps module go directive to 1.25.11 and drops toolchain directive.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread hack/update-golang.sh Outdated
@wdhif
wdhif force-pushed the CVE-2025-68121/wassim.dhif/bump-go-directives-1.25.11 branch from 459b504 to ad4953f Compare June 9, 2026 15:38
Comment thread hack/update-golang.sh
Comment thread hack/update-golang.sh Outdated
@khewonc khewonc removed this from the v1.28.0 milestone Jun 10, 2026
Co-authored-by: Timothée Bavelier <[email protected]>
@wdhif
wdhif requested a review from tbavelier June 11, 2026 12:39
Comment thread hack/update-golang.sh Outdated
Co-authored-by: Timothée Bavelier <[email protected]>
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 08348c6 into main Jun 11, 2026
54 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the CVE-2025-68121/wassim.dhif/bump-go-directives-1.25.11 branch June 11, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants