Repository navigation
Count only ranked bids in the arbitration message; drop unused curl from the EIF builder setup - #60
Merged
Conversation
The success message counted every bid in the request, including bids whose IDs failed to parse and were moved to ExcludedBids. Count the bids that were ranked and attested instead.
ValidateKeyAttestation calls validateCommonAttestation as well as the arbitration validator, so the checks are shared by every attestation validation, not only arbitration.
Nothing on the builder instance runs curl. The only curl call in eif-build.yml (the ORAS download) runs on the GitHub-hosted runner.
There was a problem hiding this comment.
🟢 Approval recommended
The focused changes have no identified blocking issues; tests were not executed during review.
0 open findings
What changed in this PR
Corrects the arbitration success message and removes an unused EIF builder dependency, continuing the cleanup in #58.
Changes:
- Counts ranked bids rather than all submitted bids, with a regression test.
- Clarifies that common attestation checks cover arbitration and key validation.
- Removes curl from builder dependency installation.
| File | Description |
|---|---|
| validation/attestation.go | Clarifies the shared validation doc comment. |
| enclave/handlers.go | Reports the ranked bid count. |
| enclave/handlers_test.go | Tests that malformed bid IDs are excluded from the count. |
| enclave-image/scripts/setup-nitro-instance.sh | Removes the unused curl dependency. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
6 of 7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
HandleArbitrationRequestnow reportsarbitrated N bidswith N = the bids that were ranked and attested (len(coreBids)). It usedlen(req.Bids), which also counted bids whose IDs failed to parse;wireBidsToCoreBidsmoves those toExcludedBids, so a request with onenot-a-uuidbid and one valid bid reported "arbitrated 2 bids" while ranking one. The message is informational and is not part of the attestation; the client reads it only on failure. New test:TestHandleArbitrationRequest_MessageCountsRankedBids.validateCommonAttestationdoc comment now says the checks are shared by every attestation validation (arbitration and key).ValidateKeyAttestation(validation/key.go) calls it as well as the arbitration validator.enclave-image/scripts/setup-nitro-instance.shno longer checks for or installs curl. Nothing on the builder instance runs curl:eif-build.ymlruns this script andbuild-eif-ci.shthere over ssh, and neither calls curl. The workflow's only curl call (the ORAS download in "Install ORAS") runs on the GitHub-hosted runner. curl is preinstalled on the builder AMI (Build EIF run 38773132657 logs✓ curl already installed), so no install step goes away. This follows the jq removal in ci: drop the unused jq dependency from the EIF builder setup script #58.update-pcrsjob pushes a PCR update commit tomain. The comment and setup-script changes are not EIF inputs.Pre-merge checklist
go build ./...,go vet ./...andmise run //:lint(golangci-lint, 0 issues).go test -count=1 ./...(CItestjob, run 38907902751).TestHandleArbitrationRequest_MessageCountsRankedBidsfails withlen(req.Bids)(expected: "arbitrated 1 bids",actual: "arbitrated 2 bids") and passes withlen(coreBids).shellcheckreports only the existing SC1091 note for the runtime-sourced/etc/os-release;shfmt -i 4 -sr -dreports nothing on the changed line.install_dependenciesrun with stub commands under bash 3.2 and 5.3 logs no curl line and returns 0; it logs✓ aws already installedwhenawsis onPATHand runsdnf install -y awscliwhen it is missing.git grep -n -w curlmatches only the "Install ORAS" step ineif-build.yml, onubuntu-latest.Post-deploy/apply verification
mainafter merge passes, includingupdate-pcrs, which pushes the PCR update commit for this change; its "Setup Nitro instance" step logs no curl line and ends with✓ Setup complete!. (Build EIF run 38912047704 on 3fd0c6b: Build EIF on Nitro EC2 and Update PCR validation file both succeeded, and update-pcrs pushed 5d76856 with the new PCRs. Setup ended✓ Setup complete!at 14:02:32 UTC with no curl line; the only later curl is the runner-side download step.)skipped, not failed. (Build EIF run 38913381773 for 5d76856: completed, skipped.)