Repository navigation
feat: AMI vetting — write attest:vetted on a passing gate (provabl#13) - #22
Merged
Merged
Conversation
vet becomes the producer for ground's AMI-launch-gating SCP (slice 1, provabl/ground#18): `vet gate ami-… --tag-vetted` writes attest:vetted=true to the AMI via the EC2 API when the gate passes. That tag is exactly what ground's SCP requires to permit ec2:RunInstances; the companion lockdown SCP restricts who may set it, so the principal running this is the designated vetter. Fail-closed: a failing gate writes no tag. - internal/amitag: an injectable Tagger seam (AWS EC2 CreateTags in prod, a fake in tests), mirroring nitro's IAMTagger. Adds aws-sdk-go-v2 + service/ec2. - cmd/vet gate: ami- target branch + --tag-vetted/--region; tagIfVetted is a small pure seam so the pass→tag / fail→no-tag decision is unit-tested without driving the os.Exit path. - Tests: pass writes the tag, fail writes nothing (fail-closed, guard-verified), nil tagger never tags, tagger error propagates, ami- detection. Validated end-to-end on real AWS: vet gate --tag-vetted wrote attest:vetted=true to a real AMI (confirmed via describe-images); all resources torn down. v1 asserts provenance/verdict + an authenticated vetter marking — not a deep image-content guarantee. Deep AMI scanning (Inspector / snapshot+syft) and the runtime golden-PCR0 binding are deferred (README + #13). Refs: #13
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.
Makes vet the producer for ground's AMI-launch-gating SCP (slice 1, provabl/ground#18):
vet gate ami-… --tag-vettedwritesattest:vetted=trueto the AMI via the EC2 API when the gate passes — exactly the tag ground's SCP requires to permitec2:RunInstances. The companion lockdown SCP restricts who may set it, so the principal running this is the designated vetter (vet's CI). The producer→SCP loop now closes.What's here
internal/amitag— an injectableTaggerseam (AWS EC2CreateTagsin prod, a fake in tests), mirroring nitro'sIAMTagger. Addsaws-sdk-go-v2+service/ec2.cmd/vet gate—ami-target branch +--tag-vetted/--region. Fail-closed: a failing gate writes no tag.tagIfVettedis a small pure seam so the pass→tag / fail→no-tag decision is unit-tested without theos.Exitpath.ami-detection.Validated on real AWS
Ran
vet gate ami-… --tag-vettedfrom an SSM-driven instance (the vetter principal) against a throwaway AMI;describe-imagesconfirmedattest:vetted=truelanded. All resources torn down (<~$1).Scope (honest, v1)
Asserts the AMI's provenance/verdict + an authenticated vetter marking — not a deep image-content guarantee. Deep AMI scanning (Inspector / EBS-snapshot→syft) is a pluggable source recorded via the existing
--check-cves/SBOM path; the runtime golden-PCR0 binding is separate, later work (measured-boot PCRs aren't computable offline from an AMI). See README + #13.Refs: #13