Skip to content

feat: nitro attest --expected-from-ami auto-loads golden PCRs (provabl#13) - #9

Merged
scttfrdmn merged 1 commit into
mainfrom
feat/expected-from-ami
Jun 11, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
feat/expected-from-ami

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Closes the runtime-binding loop's last manual seam. On the live instance, --expected-from-ami reads the source AMI id from IMDS (ami-id) and pulls its attest:pcr<N> golden tags (written by vet ami-reference) via ec2:DescribeImages, feeding them to the expected_pcr<N> appraiser check — no operator hand-copying hex into --expected-pcrN.

  • internal/goldenpcr: IMDS + DescribeImages behind interfaces; fake-driven tests (ami-id trim/validate, tag filtering, empty/malformed/not-found errors, Resolve).
  • cmd/nitro: --expected-from-ami; explicit --expected-pcrN overrides; a source AMI with no attest:pcr* tags is an error (fail-closed, not an unenforced check).
  • adds aws-sdk-go-v2/service/ec2.

The golden tags are locked to the vetter by ground's lockdown SCP (provabl/ground#21), so an instance can't rewrite its own reference. The one new live seam — the IMDS ami-id read on a real instance — is documented; the DescribeImages tag-read path was already proven live during ami-reference validation.

Refs: #13

Closes the runtime-binding loop's last manual seam. On the live instance,
--expected-from-ami reads the source AMI id from IMDS (ami-id) and pulls its
attest:pcr<N> golden tags (the ones vet ami-reference writes) via
ec2:DescribeImages, feeding them to the expected_pcr<N> appraiser check — no
operator hand-copying hex into --expected-pcrN.

- internal/goldenpcr: IMDS + DescribeImages behind interfaces; fake-driven tests
  (ami-id trim/validate, tag filtering, empty/malformed/not-found errors, Resolve).
- cmd/nitro: --expected-from-ami flag; explicit --expected-pcrN overrides; a source
  AMI with no attest:pcr* tags is an error (fail-closed, not an unenforced check).
- adds aws-sdk-go-v2/service/ec2.

Refs: #13
@scttfrdmn
scttfrdmn merged commit 2c1a530 into main Jun 11, 2026
3 checks passed
@scttfrdmn
scttfrdmn deleted the feat/expected-from-ami branch June 11, 2026 21:45
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.

1 participant