Skip to content

ci: install Go from go.mod's toolchain line in Docker Build - #115

Merged
nickpell merged 3 commits into
mainfrom
nick/openauction-docker-go-via-mise
Oct 26, 2026
Merged

nickpell merged 3 commits into
mainfrom
nick/openauction-docker-go-via-mise

Conversation

@nickpell

@nickpell nickpell commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Docker Build installs Go with actions/setup-go from go-version-file: go.mod instead of a go-version: "1.27.3" literal, so no workflow names a Go version. The docker-build PR check in go.yml uses the same step, in place of mise, so the published image's install step runs on every PR.
  • go.mod gains toolchain go1.27.3, which setup-go reads ahead of the go line. The go directive stays 1.27: it is the minimum for every module that imports this one, and the toolchain line of a dependency is ignored, so importers are not held to the patch release.
  • .mise/config.toml's go pin is still the version tests and lint run on. A new check-go-version task, run in the lint job, fails when go.mod's toolchain line or .mise/mise.lock disagrees with it. A Go bump is: edit the pin, MISE_LOCKED=0 mise lock go, go mod edit -toolchain=go<version>.
  • The Go version does not change: 1.27.3 before and after.
  • ci: install Go from go.mod's toolchain line in Docker Build openarbiter#64 makes the same change in openarbiter.

Notes for reviewers

Pre-merge checklist

  • mise run //:check-go-version passes, and fails naming the file when go.mod says toolchain go1.27.2 or the pin says 1.27.4 with the lock and go.mod left at 1.27.3
  • mise run //:lint, //:test, //:tidy (keeps the toolchain line) and //:ratchet:lint pass locally on Go 1.27.3; actionlint reports nothing
  • PR CI green on c6a1a24 (test, lint, docker-build, Ratchet Lint); docker-build's setup-go step logs Setup go version spec 1.27.3 and go version go1.27.3, and lint runs check-go-version
  • Diff contains no unintended changes: docker.yml, go.yml, go.mod and the new task

Post-merge verification

  • On the merge commit the main pipeline is green: Go, then Docker Build, then Build EIF, then the [skip-build] Update PCR measurements commit (07df067: Go and Docker Build 40398820322 success, Build EIF 40399427094 success, PCR commit 8f6c1bb)
  • Docker Build's setup-go step logs Setup go version spec 1.27.3 (run 40398820322 on the merge commit, success; also go version go1.27.3)

🤖 Generated with Claude Code

Docker Build installed Go with actions/setup-go and its own go-version
pin. Use the same jdx/mise-action step as the Go workflow, so the
released enclave binary is built with the Go version pinned in
.mise/config.toml and .mise/mise.lock.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

nickpell and others added 2 commits October 26, 2026 16:37
…er-go-via-mise

# Conflicts:
#	.github/workflows/docker.yml
Docker Build and the docker-build PR check install Go with setup-go from
go.mod's toolchain directive, so no workflow names a Go version. The go
directive stays at 1.27, so importing modules are not held to the patch
release. check-go-version, run in the lint job, fails when the toolchain
line or mise.lock disagrees with the mise go pin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nickpell nickpell changed the title ci: install Go with mise in Docker Build ci: install Go from go.mod's toolchain line in Docker Build Oct 26, 2026
@nickpell
nickpell requested a balanced review from Copilot October 26, 2026 20:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The changes consistently select the existing Go version, and no blocking correctness or integration issues were identified.

No open issues 🎉

Review effort: Balanced

@nickpell
nickpell merged commit 07df067 into main Oct 26, 2026
5 checks passed
@nickpell
nickpell deleted the nick/openauction-docker-go-via-mise branch October 26, 2026 20:47
nickpell added a commit to cloudx-io/openarbiter that referenced this pull request Oct 26, 2026
## Summary

- Docker Build installs Go with `actions/setup-go` from
`go-version-file: go.mod` instead of a `go-version: "1.27.3"` literal,
so no workflow names a Go version. The `docker-build` PR check in
`go.yml` uses the same step, in place of mise, so the published image's
install step runs on every PR.
- `go.mod` gains `toolchain go1.27.3`, which setup-go reads ahead of the
`go` line. The `go` directive stays `1.27`: it is the minimum for every
module that imports this one, and the `toolchain` line of a dependency
is ignored, so importers are not held to the patch release.
- `.mise/config.toml`'s `go` pin is still the version tests and lint run
on. A new `check-go-version` task, run in the `lint` job, fails when
`go.mod`'s toolchain line or `.mise/mise.lock` disagrees with it. A Go
bump is: edit the pin, `MISE_LOCKED=0 mise lock go`, `go mod edit
-toolchain=go<version>`.
- The Go version does not change: 1.27.3 before and after.
- cloudx-io/openauction#115 makes the same change in openauction.

## Notes for reviewers

- #4 moved `go.yml` to mise and left `docker.yml`
on setup-go with pin-only changes; no reason to keep that split is
recorded. Since then each Go bump has edited `docker.yml`'s `go-version`
by hand next to the mise pin (#23,
#54, #66).
- Docker Build runs only from `workflow_run` on `main`, and
`workflow_run` uses the definition on `main`, so this PR cannot run the
changed `docker.yml`. The `docker-build` job runs the identical setup-go
step followed by the same `go build`.

## Pre-merge checklist

- [x] `mise run //:check-go-version` passes, and fails naming the file
when `go.mod` says `toolchain go1.27.2` or the pin says 1.27.4 with the
lock and `go.mod` left at 1.27.3
- [x] `mise run //:lint`, `//:test`, `//:tidy` (keeps the `toolchain`
line) and `//:ratchet:lint` pass locally on Go 1.27.3, as does `//:test`
apart from `TestGetSystemInfo_LiveProcfs`, which reads Linux `/proc` and
fails on macOS; actionlint reports nothing
- [x] PR CI green on e0eee86 (test, lint, docker-build, Ratchet Lint);
`docker-build`'s setup-go step logs `Setup go version spec 1.27.3` and
`go version go1.27.3`, and `lint` runs `check-go-version`
- [x] Diff contains no unintended changes: `docker.yml`, `go.yml`,
`go.mod` and the new task

## Post-merge verification

- [ ] On the merge commit the main pipeline is green: Go, then Docker
Build, then Build EIF, then the `[skip-build] Update PCR measurements`
commit
- [ ] Docker Build's setup-go step logs `Setup go version spec 1.27.3`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
jryio added a commit that referenced this pull request Nov 5, 2026
…hra root (#121)

## Why

- Eight eMudhra intermediate CAs are affected.
- All were issued on 2025-04-30.
- Their private keys recover from the public certs.
- Tracked as CVE-2026-111943.

- main already builds the enclave with Go 1.27.3.
- Go 1.27.3 rejects chains through those keys.
- Landed in #115 and #117.

- The image base is the other half.
- `enclave/Dockerfile` pins an old `amazonlinux:2023` digest.
- That digest predates ALAS2023-2026-3306 / 3337.
- `dnf update` there stays on the image's snapshot.
- Cause: AL2023 deterministic upgrades.
- Enclave still ships `ca-certificates-2025.2.76-1.0.amzn2023.0.3`.
- That package carries emSign ECC Root CA - G3.

## What

```text
before                            after
------                            -----
5b294120… (old)                   bb1c85fe… (new)
  ca-certificates ...0.3            ca-certificates ...0.5
  emSign ECC Root CA - G3 present   root absent (135 certs)
```

- `amazonlinux:2023` digest: `5b294120… -> sha256:bb1c85fe…`.
- New: `ca-certificates-2025.2.76-1.0.amzn2023.0.5`.
- That package ships without the root.
- Same digest as cloudx-io/openarbiter#70.

## Rollout

- Rebuilding the image moves PCR0 and PCR2.
- After merge, Docker Build and Build EIF run.
- Together they publish the arm64 EIF.
- The `update-pcrs` job appends the new set.
- It appends to `validation/pcrs.json`.
- That file is append-only.
- So enclaves built earlier still validate.

## Verify

- Checked on linux/arm64.
- Version from `rpm -q ca-certificates`.
- Root looked up in `/etc/ssl/certs/ca-certificates.crt`.

- Old `5b294120…`: `2025.2.76-1.0.amzn2023.0.3`, root present.
- New `bb1c85fe…`: `2025.2.76-1.0.amzn2023.0.5`, root absent.
- The new bundle holds 135 certs.

- The `docker-build` PR check builds the new base.
- So it runs the `dnf` layers.

## Links

- CVE-2026-111943
- Go 1.27.3 enclave build: #115, #117
- Same base digest: cloudx-io/openarbiter#70
- Advisories: ALAS2023-2026-3306 / 3337

Closes CXD-6988
@nickpell nickpell mentioned this pull request Nov 11, 2026
8 tasks done
nickpell added a commit that referenced this pull request Nov 11, 2026
## Summary

- Update Go from 1.27.3 to 1.27.4 to fix
[GO-2026-6859](https://pkg.go.dev/vuln/GO-2026-6859) (CVE-2026-97054),
an HTTP/1 server crash caused by a `MaxBytesReader` header race in
`net/http`. It affects Go before 1.26.11 and 1.27.0 through 1.27.3.
- The mise `go` pin, `.mise/mise.lock` and go.mod's `toolchain`
directive move together, as `check-go-version` requires. Tests and lint
get Go through mise; the docker-build PR check and Docker Build read the
`toolchain` line through `setup-go` (#115), so the published enclave
binary is built with 1.27.4. The `go` directive stays at `1.27`.

## Notes for reviewers

- go1.27.4 is less than 7 days old. `.mise/config.toml` sets
`minimum_release_age = "7d"` (#39, renamed in #116); that floor filters
version resolution, and an exact pin installs from the lock, so this
bump goes ahead of the floor on purpose for the security fix. The lock's
checksums for all five platforms match https://go.dev/dl/.

## Pre-merge checklist

- [x] `mise run //:check-go-version` passes
- [x] Lint passes (`mise run //:lint`, `mise run //:tidy`)
- [x] Tests pass (`mise run //:test`)
- [x] docker-build PR check builds the enclave image with Go 1.27.4
- [x] `govulncheck ./...` reports no vulnerabilities with Go 1.27.4
- [x] Diff contains no unintended changes

## Post-deploy/apply verification

- [ ] Docker Build on the merge commit ran `setup-go` with Go 1.27.4 and
pushed the enclave image
- [ ] Build EIF completed for the merge commit and the PCR measurements
commit landed on main

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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