Skip to content

Add version verifier: extract cloud-api commit from attestation#18

Open
Evrard-Nil wants to merge 1 commit intomainfrom
feat/version-verifier
Open

Add version verifier: extract cloud-api commit from attestation#18
Evrard-Nil wants to merge 1 commit intomainfrom
feat/version-verifier

Conversation

@Evrard-Nil
Copy link
Contributor

Summary

  • Adds version_verifier.py that fetches the TDX attestation from cloud-api.near.ai, extracts the deployed Docker image digest from the attested compose file, then queries GitHub's attestations API (via gh) to resolve the exact git commit and CI build run
  • Zero external dependencies — uses only Python stdlib + gh CLI

Example output

Image:   nearaidev/cloud-api@sha256:5e0f71977b3dead55a8cf1bd47b6e15ea5860f623a7d1029863b50a68fbeeb3a
Commit:  05e9ea4ae46580e89135ea1a33565462735d39a2
Build:   https://github.com/nearai/cloud-api/actions/runs/22679808730/attempts/1
GitHub:  https://github.com/nearai/cloud-api/commit/05e9ea4ae46580e89135ea1a33565462735d39a2

Test plan

  • Run python3 version_verifier.py and verify output shows image, commit, build URL

🤖 Generated with Claude Code

Fetches the attestation report from cloud-api.near.ai, extracts the
Docker image digest from the attested compose file, then queries
GitHub's attestations API to find the exact git commit and build run.
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