Skip to content

build: move the operator build to Go 1.24 (CVE-2025-68121) - #803

Open
davidcurrie wants to merge 1 commit into
StarRocks:mainfrom
davidcurrie:bump-go-1.24-cve-2025-68121
Open

davidcurrie wants to merge 1 commit into
StarRocks:mainfrom
davidcurrie:bump-go-1.24-cve-2025-68121

Conversation

@davidcurrie

Copy link
Copy Markdown

What

Moves the operator build from Go 1.22 to Go 1.24, clearing CVE-2025-68121 from the published image.

Why

starrocks/operator is built with Go 1.22, which carries CVE-2025-68121 — incorrect certificate validation during TLS session resumption in crypto/tls.

The fix was backported to Go 1.24.13 and 1.25.7 only. Go 1.22 is several majors past end of support and did not receive it, so the current line cannot pick it up by rebuilding — moving the toolchain is the fix.

Upgrading between releases does not help either. v1.11.7 compiles with the same Go as v1.11.6:

$ trivy image --scanners vuln --severity CRITICAL starrocks/operator:v1.11.6
  CVE-2025-68121  stdlib  v1.22.12  fixed in 1.24.13, 1.25.7

$ trivy image --scanners vuln --severity CRITICAL starrocks/operator:v1.11.7
  CVE-2025-68121  stdlib  v1.22.12  fixed in 1.24.13, 1.25.7

Changes

  • Dockerfile: FROM golang:1.22 as build → golang:1.24
  • go.mod: go 1.22 → go 1.24.0
  • .github/workflows/action-make-test.yml: go-version: 1.22 → 1.24

.github/workflows/action-golangci-lint.yml is already on go-version: 1.24 and is unchanged — this brings the build and test paths in line with the linter rather than introducing a new Go version to the project.

The runtime base, starrocks/static-debian11:nonroot, is untouched. The change is confined to the compiled binary.

Verification

Built the image from this branch for linux/amd64 and scanned it:

$ DOCKER_BUILDKIT=1 docker build -t starrocks-operator:pr .
$ trivy image --scanners vuln --severity CRITICAL starrocks-operator:pr
  0 criticals   (stdlib v1.24.13)

The build succeeds with no source changes.

Context

We run the operator on EKS, where it is scanned at runtime by the Trivy Operator. It currently shows as an unfixable critical because no released version resolves it. Since the operator is a long-lived in-cluster process with broad RBAC over StarRocks resources, we would rather not suppress the finding or maintain a private build.

Happy to target Go 1.25 instead if that suits your support window better.

The published operator image is built with Go 1.22, which carries
CVE-2025-68121 (crypto/tls, incorrect certificate validation during TLS
session resumption). The fix was backported to Go 1.24.13 and 1.25.7
only, so 1.22 will not receive it and rebuilding the current line cannot
clear it.

v1.11.7 is affected identically to v1.11.6 — both compile with go1.22.12
— so upgrading between releases does not help either.

The lint workflow already runs on Go 1.24; this brings the Dockerfile,
go.mod and the test workflow to match.

Verified by building the image and scanning the binary: CVE-2025-68121
is gone and the binary reports stdlib v1.24.13. No source changes were
needed.

Signed-off-by: David Currie <david.currie@spartacommodities.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants