Skip to content

fix: pin Go toolchain to 1.26.8 and bump vulnerable dependencies - #254

Merged
cspath1 merged 1 commit into
mainfrom
cspath/REL-16023-bump-go-toolchain-and-deps
Sep 23, 2026
Merged

cspath1 merged 1 commit into
mainfrom
cspath/REL-16023-bump-go-toolchain-and-deps

Conversation

@cspath1

@cspath1 cspath1 commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

This Action has the same exposure that ld-find-code-refs 2.18.0 fixed, independently: its own module vendored ld-find-code-refs v2.16.0, which predates that work, alongside x/crypto v0.52.0 and x/text v0.37.0.

govulncheck reported 22 reachable standard library vulnerabilities, plus 8 in imported packages and 10 in required modules. CVE-2025-68121 (crypto/tls) was reachable via internal/ldclient/flag_links.go:73.

Root cause for the standard library findings is the same as upstream: a go directive with no toolchain directive pins nothing, so the build uses whatever Go happens to be present. Here it was compounded by the Dockerfile building FROM golang:alpine -- a floating tag, so since action.yml is a using: docker / image: Dockerfile action that GitHub rebuilds on every run, the toolchain silently changed between runs and an image scan gave different answers at different times.

Changes:
go directive 1.25.0 -> 1.26.0, plus toolchain go1.26.8
ld-find-code-refs/v2 v2.16.0 -> v2.18.1
x/crypto v0.52.0 -> v0.57.0
x/text v0.37.0 -> v0.42.0
x/oauth2 v0.33.0 -> v0.37.0
go-git/v5 v5.19.1 -> v5.19.2
builder image golang:alpine -> golang:1.26.8-alpine
runtime image alpine:3.21 -> alpine:3.24.2

govulncheck after: 0 vulnerabilities.

No lint changes needed. CI builds golangci-lint from source via pre-commit after setup-go, so it picks up the pinned toolchain and the existing v1.62.2 pin still passes; verified by building v1.62.2 with go1.26.8 and running the pre-commit invocation.


Note

Overview
Pins a reproducible Go toolchain and refreshes dependencies so the Docker-based GitHub Action no longer picks up a floating compiler or stale vulnerable modules.

Module / build: go moves to 1.26.0 with toolchain go1.26.8. Direct and indirect bumps include ld-find-code-refs/v2 v2.16.0 → v2.18.1, golang.org/x/crypto, x/text, x/oauth2, and go-git/v5, with matching vendor/ updates (including go-git ReferenceName.IsSafe() and small validation-message fixes in the vendored ld-find-code-refs options).

Docker: builder image golang:alpine → golang:1.26.8-alpine; runtime alpine:3.21 → alpine:3.24.2, so each action rebuild uses the same Go and base OS instead of whatever the floating tag resolved to.

There are no changes to this repo’s own Go source—only toolchain, Dockerfile, go.mod/go.sum, and vendor.

Reviewed by Cursor Bugbot for commit 6c336ea. Bugbot is set up for automated code reviews on this repo. Configure here.

This Action has the same exposure that ld-find-code-refs 2.18.0 fixed,
independently: its own module vendored ld-find-code-refs v2.16.0, which
predates that work, alongside x/crypto v0.52.0 and x/text v0.37.0.

govulncheck reported 22 reachable standard library vulnerabilities, plus
8 in imported packages and 10 in required modules. CVE-2025-68121
(crypto/tls) was reachable via internal/ldclient/flag_links.go:73.

Root cause for the standard library findings is the same as upstream: a
`go` directive with no `toolchain` directive pins nothing, so the build
uses whatever Go happens to be present. Here it was compounded by the
Dockerfile building `FROM golang:alpine` -- a floating tag, so since
`action.yml` is a `using: docker` / `image: Dockerfile` action that
GitHub rebuilds on every run, the toolchain silently changed between
runs and an image scan gave different answers at different times.

Changes:
  go directive  1.25.0  -> 1.26.0, plus `toolchain go1.26.8`
  ld-find-code-refs/v2  v2.16.0 -> v2.18.1
  x/crypto              v0.52.0 -> v0.57.0
  x/text                v0.37.0 -> v0.42.0
  x/oauth2              v0.33.0 -> v0.37.0
  go-git/v5             v5.19.1 -> v5.19.2
  builder image  golang:alpine -> golang:1.26.8-alpine
  runtime image  alpine:3.21   -> alpine:3.24.2

govulncheck after: 0 vulnerabilities.

No lint changes needed. CI builds golangci-lint from source via
pre-commit after setup-go, so it picks up the pinned toolchain and the
existing v1.62.2 pin still passes; verified by building v1.62.2 with
go1.26.8 and running the pre-commit invocation.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@cspath1
cspath1 requested a review from a team as a code owner September 23, 2026 20:56
@ffantl-ld
ffantl-ld self-requested a review September 23, 2026 20:58
@cspath1
cspath1 merged commit 3e1e353 into main Sep 23, 2026
8 checks passed
@cspath1
cspath1 deleted the cspath/REL-16023-bump-go-toolchain-and-deps branch September 23, 2026 21:08
cspath1 added a commit that referenced this pull request Sep 30, 2026
Releases two changes that have been sitting on main:

  #253  retry rate-limited flag requests, and preserve cancellation and
        timeout errors while reading flag responses
  #255  pelletier/go-toml/v2 to v2.4.3 (XRAY-1033007)

Patch rather than minor: #253 is retry and error-propagation behaviour,
which the contributor filed under Fixed, and no inputs or outputs
changed.

Two corrections to repository bookkeeping while here:

The version constant was still 2.3.1. v2.3.2 was tagged directly at the
#254 merge commit without a prepare-release commit, so the constant and
the metadata pins never moved. Both are now at 2.3.3.

The changelog had no 2.3.2 entry for the same reason, even though
v2.3.2 was a real release that Gonfalon pins. Backfilled it from #254.

Also floats the docker/ entry point example on `@v2` to match the two
root Action examples above it, which already used `@v2`. That line no
longer needs rewriting each release, and the "pin to a release that
includes the docker/ entry point" caveat is obsolete now it floats. The
`dockerImage` input keeps an exact tag.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@cspath1 cspath1 mentioned this pull request Sep 30, 2026
cspath1 added a commit that referenced this pull request Sep 30, 2026
Releases two changes that have been sitting on main:

  #253  retry rate-limited flag requests, and preserve cancellation and
        timeout errors while reading flag responses
  #255  pelletier/go-toml/v2 to v2.4.3 (XRAY-1033007)

Patch rather than minor: #253 is retry and error-propagation behaviour,
which the contributor filed under Fixed, and no inputs or outputs
changed.

Two corrections to repository bookkeeping while here:

The version constant was still 2.3.1. v2.3.2 was tagged directly at the
#254 merge commit without a prepare-release commit, so the constant and
the metadata pins never moved. Both are now at 2.3.3.

The changelog had no 2.3.2 entry for the same reason, even though v2.3.2
was a real release that Gonfalon pins. Backfilled it from #254.

Also floats the docker/ entry point example on `@v2` to match the two
root Action examples above it, which already used `@v2`. That line no
longer needs rewriting each release, and the "pin to a release that
includes the docker/ entry point" caveat is obsolete now it floats. The
`dockerImage` input keeps an exact tag.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Overview**
> Prepares the **2.3.3** release by aligning repo metadata with changes
already on `main`, without altering action inputs or outputs in this
diff.
> 
> **`CHANGELOG.md`** adds a **2.3.3** *Fixed* section (rate-limit
retries, preserving cancel/timeout errors on flag reads, `go-toml/v2`
bump for XRAY-1033007) and backfills **2.3.2** (Go 1.26.8 toolchain and
dependency/image pins) after v2.3.2 was tagged without a prepare-release
commit.
> 
> **`internal/version/version.go`** updates the version constant from
`2.3.1` to **`2.3.3`**. **`docker/action.yml`** default and example
`dockerImage` tags move from `2.3.1` to **`2.3.3`**.
> 
> **`README.md`** switches the docker entry-point example from a pinned
`@v2.3.1` to **`@v2`** (matching root action examples) while keeping the
mirrored-image example on tag **`2.3.3`**.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
4fce911. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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