Skip to content

fix(deps): build with Go 1.27.4 for its security fixes - #254

Merged
bketelsen merged 4 commits into
mainfrom
duncan/go-1.27.4
Nov 11, 2026
Merged

bketelsen merged 4 commits into
mainfrom
duncan/go-1.27.4

Conversation

@frostyard-machines

@frostyard-machines frostyard-machines commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Why

Go 1.27.3's net/http has GO-2026-6859. Go 1.27.4 fixes it, and govulncheck fails on 1.27.3.

What

  • Move every Go 1.27.3 pin to 1.27.4: go.mod (go line; no toolchain line, no sub-modules), Makefile GO_VERSION and a comment, the 6 go-version inputs in .github/workflows/ci.yml, .github/workflows/nightly-compliance.yml, .devcontainer/Dockerfile, .docker/Dockerfile, mise.lock (version, URLs and the official checksums from https://go.dev/dl/?mode=json), and docs/design/agent-workflows.md. git grep 1.27.3 is now empty. The stable inputs in the release, snapshot, packaging and image-tier workflows are unchanged.
  • internal/auth/pam/pam.go: Go 1.27.4 rejects the soname form -l:libpam.so.0 in #cgo LDFLAGS (invalid flag in #cgo LDFLAGS: -l:libpam.so.0, see https://go.dev/s/invalidflag; a minimal probe builds on 1.27.3 and fails on 1.27.4). It now links with -lpam. This needs the libpam.so development link from libpam0g-dev; every build workflow (ci.yml, packaging.yml, release.yml, snapshot.yml, image-tier.yml, nightly-compliance.yml, including the arm64 cross builds) and both development images already install it. readelf -d on a built pilothoused still shows NEEDED libpam.so.0, which the packages declare through libpam0g. Without this change, the stable release and snapshot workflows also fail once stable resolves to 1.27.4.
  • docs/design/overview.md: the native build dependency note names the -lpam link.
  • CI on this PR found a second, unrelated break: ubuntu-latest runners now run Ubuntu 26.04 (resolute), but the arm64 source from ports.ubuntu.com was pinned to noble. apt mixed amd64 resolute and arm64 noble packages and failed (libpam0g:amd64=1.7.0-5ubuntu3.2 Breaks libpam0g:arm64 (!= 1.7.0-5ubuntu3.2), E: Unable to satisfy dependencies) in "Build (linux, arm64)" and "Build and verify packages". ci.yml, packaging.yml, release.yml and snapshot.yml now read the suite from /etc/os-release (VERSION_CODENAME) with an unquoted heredoc. The same break would fail the next release and snapshot.
  • With the resolute suite, apt on the 26.04 image then wanted to downgrade the runner's installed toolchain (E: Packages were downgraded and -y was used without --allow-downgrades; the installed amd64 packages are newer than the resolute archive). A cgo binary built there would also link against a newer glibc than on 24.04, where these jobs passed until 2026-11-09. So the 4 cross-build jobs (ci.yml build, packaging.yml packages, release.yml goreleaser, snapshot.yml snapshot) now pin runs-on: ubuntu-24.04; on it the codename resolves to noble, as before. Other jobs keep ubuntu-latest.
  • On the 26.04 image, the 4 INT/... subtests of TestUCoreOrchestratorForwardsSignalsAndWaits time out in Unit Tests and Race Detection (the TERM/... subtests pass). The test passes on 24.04 and locally with Go 1.27.4, so the cause is the image, not this bump; test: TestUCoreOrchestratorForwardsSignalsAndWaits INT cases time out on the Ubuntu 26.04 runner #255 tracks it. ci.yml unit-test and race-test pin runs-on: ubuntu-24.04 until test: TestUCoreOrchestratorForwardsSignalsAndWaits INT cases time out on the Ubuntu 26.04 runner #255 is resolved.
  • Guard: internal/workflowcheck/arm64_ports_test.go. TestArm64PortsSuiteFollowsRunnerRelease decodes the 4 workflows, finds the 1 step that writes the ports source, and checks its run text only (an executable codename line before the heredoc, an unquoted heredoc, no literal suite) and that its job runs on ubuntu-24.04. TestCheckArm64PortsRun covers the checker with negative cases: a commented-out, missing or late assignment, a quoted heredoc, a literal noble suite, no source file. .memory/corrections.jsonl gets 1 line for the review finding that the first guard matched text anywhere in the file.

Risk paths

Matched against the base's .github/risk-paths.json from git diff --name-only origin/main...HEAD:

  • .github/workflows/ci.yml, .github/workflows/nightly-compliance.yml (L2): the go-version input changes from 1.27.3 to 1.27.4.
  • .github/workflows/ci.yml, .github/workflows/packaging.yml, .github/workflows/release.yml, .github/workflows/snapshot.yml (L2): the arm64 ports source takes its suite from the runner's /etc/os-release instead of the literal noble, and the cross-build job pins runs-on: ubuntu-24.04 instead of ubuntu-latest. In ci.yml, unit-test and race-test also pin ubuntu-24.04 (test: TestUCoreOrchestratorForwardsSignalsAndWaits INT cases time out on the Ubuntu 26.04 runner #255); their steps and permissions are unchanged. The URI, components, architecture and keyring are unchanged. No permission, secret, trigger or job changes.
  • Makefile (L2): only GO_VERSION and a comment change. No gate changes.
  • mise.lock (L1): only the Go entry changes, to the official go.dev SHA-256 values for 1.27.4.
  • internal/auth/pam/pam.go (L1): only the #cgo link flag and its comment change. The PAM code, the conversation function and the authentication flow are unchanged; the linked library and its runtime soname are the same.

Checks

  • Revert test for the ports guard: with the origin/main copies of the 4 workflows, go test ./internal/workflowcheck/ -run TestArm64PortsSuiteFollowsRunnerRelease fails (ci.yml: no executable line assigns codename from VERSION_CODENAME, job "build" runs on "ubuntu-latest", want the pinned "ubuntu-24.04", literal suite noble); a commented-out assignment in ci.yml alone also fails it; with this PR it passes. The Go bump and the -lpam flag are exempt (a toolchain bump; the build itself fails without the flag change).
  • Local, Go 1.27.4: tidy, vet, format, lint, the template gate and govulncheck (No vulnerabilities found) pass. This host has no libpam0g-dev or libsystemd-dev, so the PAM link used a temporary -L shim directory with a libpam.so link, and the -tags sdjournal journal tests and the pilothoused sdjournal build run only in CI.

Go 1.27.3's net/http has GO-2026-6859, and govulncheck fails on it.
Go 1.27.4 fixes it (https://pkg.go.dev/vuln/GO-2026-6859). Move every
1.27.3 pin to 1.27.4: go.mod's go line, the Makefile GO_VERSION, the CI
and nightly-compliance go-version inputs, both development Dockerfiles,
mise.lock (official go.dev checksums) and the docs that name the pin.

Go 1.27.4 rejects the soname form -l:libpam.so.0 in #cgo LDFLAGS
(https://go.dev/s/invalidflag), so internal/auth/pam now links with
-lpam. Every build workflow and both development images already install
libpam0g-dev, and the binary still records NEEDED libpam.so.0.
@github-actions github-actions Bot added level:L1 Read every line risk:high Touches a high-risk path (ADR-0068) labels Nov 11, 2026
ubuntu-latest runners now run Ubuntu 26.04 (resolute), but the arm64
source from ports.ubuntu.com was pinned to noble. apt then mixed amd64
resolute and arm64 noble packages and failed with "libpam0g:amd64
Breaks libpam0g:arm64", which broke the arm64 build in ci.yml,
packaging.yml, release.yml and snapshot.yml. Read the suite from
/etc/os-release instead. TestArm64PortsSuiteFollowsRunnerRelease fails
on a hard-coded suite or a quoted heredoc.
On the ubuntu-latest image (Ubuntu 26.04), the cross-arch install from
the resolute ports archive wants to downgrade the runner's installed
toolchain (E: Packages were downgraded and -y was used without
--allow-downgrades), and a cgo binary built there links against a newer
glibc than on 24.04, where these jobs passed. Pin the build jobs of
ci.yml, packaging.yml, release.yml and snapshot.yml to ubuntu-24.04.

The guard now decodes each workflow, checks only the run text of the
one step that writes the ports source (an executable codename line
before the heredoc, an unquoted heredoc, no literal suite) and the
pinned runner of its job, with negative cases for a commented-out,
missing or late assignment
(docs/design/engineering-lessons.md#scope-guard-assertions-to-the-exact-region-under-test).
On the ubuntu-latest image (Ubuntu 26.04), the 4 INT subtests of
TestUCoreOrchestratorForwardsSignalsAndWaits time out, while the TERM
subtests pass; the test passes on 24.04 and locally with Go 1.27.4.
Pin both jobs to ubuntu-24.04 until #255 finds the cause.
@frostyard-machines frostyard-machines added the ready-for-human Reviewed, CI green: ready for Brian to review and merge label Nov 11, 2026
@github-actions

Copy link
Copy Markdown

ready-for-human came off: CI at 8a20532745df was not green when the label came. Add the label again when every check passes at this head.

@github-actions github-actions Bot removed the ready-for-human Reviewed, CI green: ready for Brian to review and merge label Nov 11, 2026
@codecov

codecov Bot commented Nov 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@bketelsen
bketelsen merged commit 20ad5db into main Nov 11, 2026
21 of 22 checks passed
@bketelsen
bketelsen deleted the duncan/go-1.27.4 branch November 11, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

level:L1 Read every line risk:high Touches a high-risk path (ADR-0068)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants