Skip to content

fix(DCP-2903): upgrade Go to 1.26.3 for std/net CVE fixes#431

Merged
script-this merged 3 commits into
mainfrom
DCP-2903-upgrade-go-to-1.26.3
May 12, 2026
Merged

fix(DCP-2903): upgrade Go to 1.26.3 for std/net CVE fixes#431
script-this merged 3 commits into
mainfrom
DCP-2903-upgrade-go-to-1.26.3

Conversation

@script-this
Copy link
Copy Markdown
Contributor

@script-this script-this commented May 12, 2026

Summary

Upgrades Go toolchain 1.26.1 → 1.26.3 to remediate two Snyk-reported high-severity stdlib vulnerabilities. Includes two small unrelated unblockers needed for CI to go green (see "Scope creep" below).

Jira: DCP-2903 (parent: DCP-914)

CVEs fixed

Snyk ID CVE CVSS CWE Component
SNYK-GOLANG-STDNET-16535159 CVE-2026-33811 8.7 CWE-415 (Double Free) net.LookupCNAME via cgo resolver
SNYK-GOLANG-STDNETHTTP-16535158 CVE-2026-33814 8.7 CWE-835 (Infinite Loop) HTTP/2 transport on SETTINGS_MAX_FRAME_SIZE=0

Both fixes ship in Go 1.26.3 (2026-05-07).

This binary builds with CGO_ENABLED=1, so the cgo-resolver path in CVE-2026-33811 is reachable — the upgrade fixes a materially vulnerable code path, not just a Snyk score.

Commits

Commit Change
fix(DCP-2903): upgrade Go to 1.26.3 for std/net CVE fixes go.mod: go 1.26.1go 1.26.3; Dockerfile: golang:1.26.1-alpinegolang:1.26.3-alpine. CI workflows already use 1.26.x glob — no change.
ci(DCP-2903): pin golangci-lint to v2.11.2 in CI and local install See "Scope creep"
test(DCP-2903): sync contract test with updated openapi spec See "Scope creep"

Scope creep (why two extra commits)

1. golangci-lint version pin (v2.11.2)

.github/workflows/go.yml was using version: latest for golangci-lint-action. golangci-lint 2.12 (released 2026-05-06) introduced new analyzers (govet inline, stricter goconst) that flag pre-existing code throughout the repo (slices.Contains calls, repeated test-string literals). Every PR opened against main today fails the lint job for the same reason — main itself would also be red on re-run.

Pinning both CI (.github/workflows/go.yml) and local install (Makefile) to v2.11.2 (the last known-green version) restores deterministic lint behaviour. A follow-up ticket should be filed to address the underlying lint debt and re-evaluate the pin.

2. Contract test sync

make test runs contract_test/, which downloads https://docs.prolific.com/openapi.yaml fresh each run and validates client calls against it. The Prolific public API spec has changed since 047d6af (when the contract test was added): get-submission-demographics operation was removed, and external_study_url is now required on create-study. The test correctly flagged this drift — but main hasn't been re-run, so it's currently broken on main too. Synced the test fixtures to match today's spec.

Test plan

  • make build succeeds (Go auto-downloaded 1.26.3 toolchain)
  • make test — all packages pass including contract_test/
  • make lint — 0 issues (with pinned v2.11.2)
  • go version ./prolific reports go1.26.3
  • go version -m ./prolific confirms CGO_ENABLED=1 (vulnerable path exists, now patched)
  • CI green

@script-this script-this requested review from a team as code owners May 12, 2026 11:21
@prolific-snyk
Copy link
Copy Markdown

prolific-snyk commented May 12, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@script-this script-this force-pushed the DCP-2903-upgrade-go-to-1.26.3 branch from cd42180 to 30b22c0 Compare May 12, 2026 11:23
benmatselby
benmatselby previously approved these changes May 12, 2026
@script-this script-this added team-dct dct-ready-for-review Triggers Slack notification when PR is ready for review labels May 12, 2026
@script-this script-this merged commit dfc45a2 into main May 12, 2026
7 of 8 checks passed
@script-this script-this deleted the DCP-2903-upgrade-go-to-1.26.3 branch May 12, 2026 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dct-ready-for-review Triggers Slack notification when PR is ready for review team-dct

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants