Skip to content

Build the agent with Go 1.26.11 to pick up a linker security fix - #5

Merged
akramhussein merged 1 commit into
developfrom
fix/go-cve-2026-97040
Nov 18, 2026
Merged

akramhussein merged 1 commit into
developfrom
fix/go-cve-2026-97040

Conversation

@akramhussein

@akramhussein akramhussein commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

What and why

The agent's Docker image was still built with Go 1.25 (golang:1.25-bookworm). Go published a critical security fix (CVE-2026-97040, GO-2026-6851): a dependency that ships a crafted .syso file can slip extra flags into the linker while the agent is being built. The fix is only in Go 1.26.11 and 1.27.4, and Go 1.25 is not getting one, so this moves the agent build to Go 1.26.11.

Files changed:

  • agent/Dockerfile: build stage now uses golang:1.26.11-bookworm instead of golang:1.25-bookworm.
  • agent/release.sh: pins the build to Go 1.26.11, the same way agent/build.sh already does, so release binaries built on a machine with an older Go still use the patched version.
  • agent/README.md: build instructions now ask for Go 1.26.11 or newer, matching the main README and the self-hosting guide.

Already on 1.26.11, no change needed: CI (.github/workflows/ci.yml), the release workflow (.github/workflows/release.yml) and agent/build.sh. There is no checked-in go.mod; the builder generates it, and the generated go line stays below 1.26.11.

How it was tested

  • pnpm run format:check, typechecks and unit tests pass (not applicable: no TypeScript changes)
  • scripts/e2e.sh passes (for intake, query or storage changes) (not applicable)
  • Docs and the configuration reference are updated (for new settings or behavior)

Verification (run locally on the PR head):

  • docker build -f agent/Dockerfile . succeeds on golang:1.26.11-bookworm. Inside the build, build.sh ran the agent tests (ok datacat.local/agent). go version on the binary from the image reports go1.26.11, and the image starts and prints DataCat Agent 0.1.0 (OpenTelemetry Collector 0.165.0).
  • TARGETS=linux/amd64 bash agent/release.sh succeeds on a machine with Go 1.26.8 installed. Go switched itself to 1.26.11 because of the new pin, the tests passed, go vet is clean, and the release binary reports go1.26.11.
  • The generated go.mod has go 1.26.9 and toolchain go1.26.11, so it does not ask for a newer Go than the build image provides.

~ written by ⠕ Replit

Go 1.25 has no release that fixes CVE-2026-97040 (GO-2026-6851), where a
crafted .syso file in a dependency can inject linker flags during a build.
Move the agent Docker image to golang:1.26.11-bookworm, pin the same
patched toolchain in release.sh as build.sh already does, and update the
agent README.

Assisted-by: Replit
@akramhussein akramhussein self-assigned this Nov 18, 2026
@akramhussein
akramhussein marked this pull request as ready for review November 18, 2026 19:56
@akramhussein
akramhussein merged commit f08fb63 into develop Nov 18, 2026
13 checks passed
@akramhussein
akramhussein deleted the fix/go-cve-2026-97040 branch November 18, 2026 20:42
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