Skip to content

Upgrade Go to 1.27.4 to fix GO-2026-6859 - #854

Merged
wallrj-cyberark merged 1 commit into
masterfrom
go-1.27.4-govulncheck
Nov 26, 2026
Merged

wallrj-cyberark merged 1 commit into
masterfrom
go-1.27.4-govulncheck

Conversation

@wallrj-cyberark

Copy link
Copy Markdown
Contributor

The nightly govulncheck workflow has failed on master every night since at least 21 November (latest run 45518220710). This PR fixes it by upgrading Go to 1.27.4.

Go 1.27.3 is affected by GO-2026-6859 in net/http. govulncheck finds that the agent reaches it from several places, including client.NGTSClient.updateAccessToken and servicediscovery.Client.DiscoverServices. Go 1.27.4 fixes it.

make upgrade-klone picks up Go 1.27.4 from cert-manager/makefile-modules#802. It also brings in:

golangci-lint v2.15.0 reports two loop variables named delete in pkg/datagatherer/k8sdynamic/dynamic_test.go as shadowing the builtin. I renamed them to name.

How I tested it
  • make verify-govulncheck passes: "Your code is affected by 0 vulnerabilities".
  • make verify passes, including golangci-lint and the kyverno policy checks.
  • make test-unit passes: 467 tests, 4 skipped.

Prior art: #851, the upgrade to Go 1.27.3.

[with Claude]

- The nightly govulncheck fails on master: Go 1.27.3 is affected by
  GO-2026-6859 in net/http, which the agent reaches through several
  HTTP client and server paths.
- make upgrade-klone picks up Go 1.27.4 from
  cert-manager/makefile-modules#802, plus new base-static and
  base-static-csi digests, the kyverno ValidatingPolicy change from
  cert-manager/makefile-modules#812 and tool bumps.
- golangci-lint v2.15.0 reports a loop variable named delete as
  shadowing the builtin, so rename it to name in two tests.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Richard Wall <richard.wall@cyberark.com>

@wallrj-cyberark wallrj-cyberark left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything under make/_shared/ and klone.yaml is generated by make upgrade-klone. The only hand-written change is the variable rename in dynamic_test.go.

# https://go.dev/dl/
# renovate: datasource=golang-version packageName=go
VENDORED_GO_VERSION := 1.27.3
VENDORED_GO_VERSION := 1.27.4

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the fix for GO-2026-6859. The workflow reads this value through make print-go-version, so setup-go installs 1.27.4 too.

// a delete event in the informers. Add 1 to wg making "sure" (https://github.com/kubernetes/kubernetes/issues/95372)
// the informers cache are sync
for ns, delete := range tc.deleteObjects {
for ns, name := range tc.deleteObjects {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

golangci-lint v2.15.0 now flags delete here as shadowing the builtin (predeclared). The value is an object name, so name describes it better anyway. Same change at line 1364.

@wallrj-cyberark
wallrj-cyberark requested review from SgtCoDFish and mladen-rusev-cyberark and removed request for SgtCoDFish November 26, 2026 14:12
@wallrj-cyberark
wallrj-cyberark merged commit e5e0968 into master Nov 26, 2026
6 checks passed
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