fix: pin enclave container image digest in attestation, fail closed#9454
Open
khoaguin wants to merge 2 commits into
Open
fix: pin enclave container image digest in attestation, fail closed#9454khoaguin wants to merge 2 commits into
khoaguin wants to merge 2 commits into
Conversation
The image_digest check previously skipped when EXPECTED_IMAGE_DIGEST was empty (a TODO), so the verifier accepted any container running in a genuine Confidential Space — whoever controls the deployment could swap in a tampered image and attestation still passed. - Pin EXPECTED_IMAGE_DIGEST to the released openminedreleasebot/syft-client-enclave:latest digest - Fail closed: reject on empty pinned digest, missing image_digest claim, or mismatch — no skip path - Tests for all three reject paths + guard that the constant stays a real sha256 digest - docs/security.md: how data owners independently confirm the digest, and the maintainer re-pin step on each image release Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Member
Author
Provenance of the pinned digest
TOKEN=$(curl -s "https://auth.docker.io/token?service=registry.docker.io&scope=repository:openminedreleasebot/syft-client-enclave:pull" | jq -r .token)
curl -sI -H "Authorization: Bearer $TOKEN" \
-H "Accept: application/vnd.oci.image.index.v1+json, application/vnd.docker.distribution.manifest.list.v2+json" \
"https://registry-1.docker.io/v2/openminedreleasebot/syft-client-enclave/manifests/latest" \
| grep -i docker-content-digestEquivalent one-liner: Reviewer checks before marking ready
🤖 Generated with Claude Code |
khoaguin
marked this pull request as ready for review
July 19, 2026 04:53
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
EXPECTED_IMAGE_DIGESTinsyft-enclavewas an empty TODO, and the verifier treated it as "skip the image check." That meant attestation only proved genuine Confidential Space hardware — not that the enclave runs the audited image. Anyone controlling the deployment (operator, CI, compromised SA) could swap the container and still pass attestation.This PR pins the digest and makes the check fail closed:
EXPECTED_IMAGE_DIGESTpinned to the currentdocker.io/openminedreleasebot/syft-client-enclave:latestdigest (sha256:23a06dd0…), with a comment on how to re-pin.image_digestclaim, or digest mismatch. The oldpassed=Noneskip path is gone.sha256:digest (so it can't be silently blanked again).docs/security.mdgains a "Verifying the enclave image digest" section: how a data owner independently fetches the published digest from Docker Hub (docker buildx imagetools inspect) and compares it to the constant at the installed release tag — plus the known gap (no signed release manifest yet; cosign/sigstore is the planned hardening).Before / After
Before
After
AttestationError, named in the failure list like every other check.docs/security.md).Don't regress
client.py— unchanged, flagged as a separate discussion.For maintainers
Releasing a new enclave image now requires re-pinning
EXPECTED_IMAGE_DIGESTin the same release — otherwise clients correctly reject the mismatched enclave. Worth wiring into thejust publishrecipe as a follow-up.Test plan
uv run --with pytest pytest tests/inpackages/syft-enclave— 69 passed.🤖 Generated with Claude Code