Skip to content

eif: skip the EIF build only when the commit subject leads with the marker - #53

Merged
nickpell merged 1 commit into
mainfrom
nick/eif-skip-build-guard
Aug 12, 2026
Merged

nickpell merged 1 commit into
mainfrom
nick/eif-skip-build-guard

Conversation

@nickpell

@nickpell nickpell commented Aug 12, 2026 •

Copy link
Copy Markdown
Member

Summary

  • The build-eif job guard was !contains(github.event.workflow_run.head_commit.message, '[skip-build]') — a substring match over the entire commit message, subject and body. A squash merge puts the whole PR description in the commit body, so any PR that merely mentions the marker in prose silently suppressed its own EIF build. That is not hypothetical: Monthly Go update: dependencies, toolchain 1.26.5, golangci-lint 2.12.2 #52's description explained the PCR automation and used the literal marker, so Build EIF skipped for d5d5632 and neither an EIF nor a PCR set was produced for it, even though Docker Build had succeeded and pushed the image.
  • startsWith restores the original intent. The update-pcrs commits this guard exists to ignore are generated as [skip-build] Update PCR measurements for <sha> and always lead with the marker, so nothing that should be skipped stops being skipped.
  • No existing skip behavior regresses: across this repo's entire history every commit mentioning the marker leads with it, including the one hand-written [skip-build] make validation script match pcrs.json format. The same is true in openarbiter, which carries the identical guard and gets the identical fix in eif: skip the EIF build only when the commit subject leads with the marker openarbiter#15. No ordering dependency between the two — each repo's workflow is self-contained.

The failure mode is quiet, which is what makes it worth fixing rather than working around: the skipped Build EIF reports as a successful-looking run with all jobs skipped, so a merge can silently ship no enclave image while CI looks green.

Pre-merge checklist

  • .github/workflows/eif-build.yml parses as YAML and the build-eif condition is well-formed
  • mise run //:ratchet:lint passes
  • Every historical use of the marker in this repo leads the subject line, so the narrower match cannot regress an intended skip
  • Diff contains no unintended changes — one operator plus the comment explaining why the narrower match is required
  • Go and Ratchet green in CI — test, lint, and Ratchet Lint all pass

Post-deploy/apply verification

  • Build EIF runs rather than skipping after this merge — run 31644208668 for 5192cde0 completed successfully rather than skipping, and this PR's description does mention the marker in prose, so the merge was a genuine test of the fix
  • update-pcrs appends a new PCR set to validation/pcrs.json — entry 21 for 5192cde0, landed as commit 3ef2e9c3
  • That build is also the first EIF for the Go 1.26.5 enclave from Monthly Go update: dependencies, toolchain 1.26.5, golangci-lint 2.12.2 #52, which the suppressed build never produced
  • The guard still skips what it should — the Build EIF triggered by the [skip-build] Update PCR measurements commit 3ef2e9c3 skipped as intended, so narrowing to startsWith did not break the loop-prevention this guard exists for

…arker

A squash merge puts the whole PR description in the commit body, so the
contains() guard also matched PRs that merely mentioned the marker in
prose, suppressing the EIF build and the PCR update for that commit.

Co-authored-by: Cursor <cursoragent@cursor.com>

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.

Pull request overview

Narrows EIF build skipping to commits whose message begins with [skip-build], preventing incidental marker mentions in squash-merge bodies from suppressing builds.

Changes:

  • Replaces contains with startsWith in the build guard.
  • Documents why prefix matching is required.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@nickpell
nickpell merged commit 5192cde into main Aug 12, 2026
4 checks passed
@nickpell
nickpell deleted the nick/eif-skip-build-guard branch August 12, 2026 21:43
nickpell added a commit to cloudx-io/openarbiter that referenced this pull request Aug 12, 2026
…arker (#15)

## Summary

- The `build-eif` job guard was
`!contains(github.event.workflow_run.head_commit.message,
'[skip-build]')` — a substring match over the *entire* commit message,
subject and body. A squash merge puts the whole PR description in the
commit body, so any PR that merely mentions the marker in prose silently
suppresses its own EIF build.
- This already happened in `openauction`, which carries the identical
workflow: a PR whose description explained the PCR automation using the
literal marker skipped its own `Build EIF`, producing neither an EIF nor
a PCR set for that commit even though `Docker Build` had succeeded. This
repo has the same latent bug; it just has not been tripped yet.
- `startsWith` restores the original intent. The `update-pcrs` commits
this guard exists to ignore are generated as `[skip-build] Update PCR
measurements for <sha>` and always lead with the marker. Across this
repo's entire history every commit mentioning the marker leads with it,
so no intended skip regresses.

Fixed identically in cloudx-io/openauction#53. No ordering dependency
between the two — each repo's workflow is self-contained.

The failure mode is quiet, which is what makes it worth fixing rather
than working around: the skipped `Build EIF` reports as a
successful-looking run with all jobs `skipped`, so a merge can silently
ship no enclave image while CI looks green.

## Pre-merge checklist

- [x] `.github/workflows/eif-build.yml` parses as YAML and the
`build-eif` condition is well-formed
- [x] `mise run //:ratchet:lint` passes
- [x] Every historical use of the marker in this repo leads the subject
line, so the narrower match cannot regress an intended skip
- [x] Diff contains no unintended changes — one operator plus the
comment explaining why the narrower match is required
- [x] `Go` and `Ratchet` green in CI — `test`, `lint`, and `Ratchet
Lint` all pass

## Post-deploy/apply verification

- [ ] `Build EIF` runs rather than skipping after this merge — this PR's
own description mentions the marker in prose, so the merge is a live
test of the fix
- [ ] `update-pcrs` appends a new PCR set to `validation/pcrs.json`

Co-authored-by: Cursor <cursoragent@cursor.com>
nickpell pushed a commit to cloudx-io/openarbiter that referenced this pull request Aug 13, 2026
Monthly refresh of Go module dependencies and the Go toolchain. Smaller
than usual: the toolchain move is patch-level (1.26.0 -> 1.26.5) and
golangci-lint is already current, so there are no source changes.

## Summary

- **Dependencies** updated with `go get -u -t ./...` + `go mod tidy`.
Direct: `cloudx-io/openauction` -> `a621e06` (2026-08-12),
`fxamacker/cbor/v2` v2.5.0 -> v2.9.2, `mdlayher/vsock` v1.2.1 -> v1.3.0.
Indirect: `mdlayher/socket` v0.4.1 -> v0.6.1, `golang.org/x/net` v0.9.0
-> v0.58.0, `x/sync` v0.1.0 -> v0.22.0, `x/sys` v0.7.0 -> v0.47.0.
`google/uuid`, `stretchr/testify`, `veraison/go-cose`,
`shopspring/decimal` and `x448/float16` were already current, and no
newer major exists for any dependency (each `/vN` path was probed), so
nothing is being held back and no major is skipped.
- **Go toolchain 1.26.0 -> 1.26.5** in every place that pins it:
`.mise/config.toml`, `.mise/mise.lock` (all five platforms), and the
`setup-go` step in `.github/workflows/docker.yml`. That last one is easy
to miss and it matters — it is the job that compiles the enclave binary
for the released image, so a stale pin there would ship an artifact
built with a different Go than CI tests against. The `go` directive in
`go.mod` stays `go 1.26`: it is pinned at major.minor precision and
1.26.5 is in that same line, so it is already in sync rather than
overlooked. A repo-wide search confirms those are the only pin sites —
`enclave-image/Dockerfile` only copies the prebuilt binary, and `go.yml`
takes its Go from mise rather than pinning separately.
- **golangci-lint stays at 2.12.2**, already the newest release
(2026-05-06). A patch-level Go bump does not raise the module's target
language version, so it does not trip the failure where golangci-lint's
own Go build is older than the target; 2.12.2 is built with go1.26.2,
which satisfies `go 1.26`.
- **One config change:** `.golangci.yml` renames `gomodguard` to
`gomodguard_v2`. 2.12.0 vendored `ryancurrah/gomodguard/v2` under a new
linter name and deprecated the old one, which was emitting a deprecation
warning on every lint run. The repo sets no `gomodguard` options, so the
rename is the whole migration, and `golangci-lint linters` confirms the
new name is enabled and the deprecated one is not.

## Enclave measurements

Recompiling the enclave moves PCR0 and PCR2. That is routine for any
change that reaches the enclave binary — `main` already carries nine
automated PCR-measurement commits, one per enclave build. On merge,
`Docker Build` -> `Build EIF` publishes the new EIF and the
`update-pcrs` job appends the new set to `validation/pcrs.json`. That
file is append-only (nine entries today), so previously built enclaves
keep validating. Nothing outside this repo is known to consume these
measurements: `openauction` does not require this module, and pkg.go.dev
reports no importers of `openarbiter/validation`. PCR1 tracks the
builder kernel rather than our binary (two distinct values across the
nine entries) and moves on the AL2023 AMI's own schedule. PCR8 is not a
factor — the build scripts pass no signing arguments, so the EIFs are
unsigned and there is no signing-certificate measurement.

## Risk

A patch-level toolchain move plus dependency bumps, with no source
changes, so the surface is narrow. What was checked:

- **Go 1.26.1 through 1.26.5 are security and bugfix releases**, and the
reachable part is `crypto/x509`: `validation/cert.go` verifies the Nitro
attestation certificate chain with `x509.ParseCertificate` and
`x509.VerifyOptions`, and x509 fixes ship in 1.26.1, 1.26.2 and 1.26.4.
`syscall` (1.26.3) and `net/url` (1.26.1, 1.26.2) are also compiled in.
The `crypto/tls` fixes in 1.26.2 and 1.26.5 are not reachable — the
enclave speaks vsock and `crypto/tls` is not in the binary — and neither
are the `html/template`, `net/http`, `archive/tar`, `net/mail`,
`net/textproto` or `mime` fixes.
- **Nothing from the 1.25 -> 1.26 language and runtime change applies
here.** This repo already ran 1.26.0, so the Green Tea garbage collector
default and the `crypto/rsa` `GenerateKey` behavior change were already
in effect and are not introduced by this PR.
- **`fxamacker/cbor` is the highest-value review target**, since it sits
under attestation document parsing. Four minor releases of additive
options and hardening, with no breaking changes to
`Marshal`/`Unmarshal`; the deprecated
`RawTag`/`ByteString`/`SimpleValue` unmarshalers are retained for all of
v2 and are not called here. The three hardening changes that could
plausibly bite do not apply: there are no `keyasint` struct tags, no
indefinite-length encoding, and no CBOR time decoding. The real decode
surface is `cbor.Unmarshal` in openauction's `enclaveapi/types.go` and
`validation/cose.go`, reached through `go-cose`; this repo's own use is
`cbor.Marshal` in two test helpers. Stricter decoding of untrusted
attestation bytes is the direction you want.
- **`golang.org/x/net` v0.9.0 -> v0.58.0** is a 49-minor jump that looks
alarming, but only `x/net/bpf` is in the build graph, pulled in via
vsock -> socket. The CVE-heavy `http2`, `proxy` and `html` packages are
not compiled in.
- **`mdlayher/vsock` v1.3.0** switched to `net.ErrClosed` for a closed
listener. `cmd/enclave-server/main.go` logs the error from `Accept()`
and continues, never comparing it with `errors.Is`, so the only
observable difference is log text. The release is otherwise dependency
bumps and CI changes, and `mdlayher/socket` v0.6.0 is explicitly "Update
for Go 1.26".
- **The `openauction` bump** spans four upstream PRs, including a
response-shape change (echoing bidder identity and qualifying
pre-auction rejections) and openauction's own move to Go 1.26.5 and
golangci-lint 2.12.2. Build and tests pass unchanged against it, and the
two repos now sit on the same toolchain.
- **`govulncheck` is clean** on the result, and the bumps clear the
module-level backlog: `origin/main` reports 17 vulnerabilities in
required modules, while the updated tree reports none. Neither state had
anything reachable from our code.
- Unchanged but worth tracking: `edgebitio/nitro-enclaves-sdk-go` and
`hf/nsm` are both pinned to 2022 commits and both are effectively
unmaintained. `hf/nsm` is at its upstream tip and the SDK pin is a
pseudo-version *ahead* of that project's newest tag (v1.0.0), so `-u`
correctly leaves both alone.

## Pre-merge checklist

- [x] `mise run //:test` — passes on Go 1.26.5 (core, enclave,
enclaveapi, validation) on Linux. On macOS
`enclave/TestGetSystemInfo_LiveProcfs` fails with `open /proc/meminfo:
no such file or directory`, which is pre-existing and unrelated to this
PR: the test has no `linux` build constraint or GOOS skip, it fails
identically on commits that predate this branch, and this PR touches no
file under `enclave/`.
- [x] `go test -race -count=1 ./...` — clean; checked locally because PR
CI runs the suite without the race detector
- [x] `mise run //:lint` — 0 issues under golangci-lint 2.12.2, and the
gomodguard deprecation warning is gone
- [x] `mise run //:tidy` — `go.mod` and `go.sum` unchanged
- [x] `mise run //:ratchet:lint` passes and `//:ratchet:pin` leaves no
diff
- [x] `mise install` resolves and checksum-verifies both tools from the
edited lockfile, which is the real test of the lockfile edit given
`locked = true`
- [x] All five Go archive checksums in `mise.lock` taken
programmatically from `go.dev/dl/?mode=json` rather than hand-copied;
the same extraction reproduces the outgoing 1.26.0 checksums byte for
byte
- [x] Enclave static cross-compile with the exact `docker.yml` command —
arm64 (the fleet arch) and amd64 both produce statically linked binaries
stamped `go1.26.5`. PR CI never builds the enclave binary, so this is
the only pre-merge check covering the artifact that actually ships.
- [x] 1.26.0 no longer appears anywhere in the repo, and 1.26.5 appears
in exactly the eight expected lines
- [x] Diff contains no unintended changes and no build artifacts (worth
noting: the repo has no `.gitignore`, so `bin/` is not ignored)
- [x] No cross-repo ordering needed — `openauction` is already on 1.26.5
and does not depend on this module
- [x] `Go` and `Ratchet` green in CI — `test`, `lint` and `Ratchet Lint`
all pass. `Ratchet Lint` needed one rerun: its first attempt died on
`curl: (22) ... 503` fetching tooling, an infrastructure flake unrelated
to the change.
- [x] Every claim above independently re-verified rather than taken on
trust: toolchain and linter versions, both cross-compiles and their
`go1.26.5` stamps, all five lockfile checksums against
`go.dev/dl/?mode=json`, the absence of `1.26.0` and the eight `1.26.5`
lines, `ratchet:pin` producing no diff, `gomodguard_v2` enabled with
`gomodguard` reported deprecated, `govulncheck` reporting no
vulnerabilities on this tree, and no newer major published for any
direct dependency.

A note in an earlier revision of this description warned that the
`build-eif` guard matched the skip-build marker anywhere in the
squash-merge commit message, and asked whoever merges to keep that token
out of the merge commit. That no longer applies: this branch was cut
from `ae5781a`, and the guard was narrowed to a prefix match in #15
(`8410397f`), which is already on `main`. Since `workflow_run` evaluates
the workflow from the default branch, this merge will be judged by the
fixed guard, so the marker in a commit body is harmless now. openauction
got the same fix in cloudx-io/openauction#53.

## Post-deploy verification

- [ ] After merge, `Docker Build` succeeds and reports 1.26.5 in its
setup-go step
- [ ] `Build EIF` succeeds and `update-pcrs` appends a new set to
`validation/pcrs.json`, with PCR0 and PCR2 moved and PCR1 unchanged
unless the builder AMI also rolled

## Commits

Split so each piece is reviewable on its own: dependencies (`go.mod` and
`go.sum` only), the toolchain bump (all pin sites), and the linter
rename.

<div><a
href="https://cursor.com/agents/bc-584742cc-71d5-47bd-94fd-5c338e20879f?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/automations/bbbb3f6b-965d-11f1-ba66-0e7d0216e441"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/view-automation-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/view-automation-light.png"><img
alt="View Automation" width="141" height="28"
src="https://cursor.com/assets/images/view-automation-dark.png"></picture></a>&nbsp;</div>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.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