Resolve runtime dependency platform digests

This commit is contained in:
2026-08-03 19:04:06 +02:00
parent cb45251c59
commit af27b9fbdf
5 changed files with 49 additions and 7 deletions
+6
View File
@@ -21,6 +21,12 @@ def resolve_platforms(
) -> dict[str, object]:
if not repository or "@" in repository or any(value.isspace() for value in repository):
raise ValueError("repository must be an unpinned OCI repository name")
last_slash = repository.rfind("/")
last_colon = repository.rfind(":")
if last_colon > last_slash:
repository = repository[:last_colon]
if not repository:
raise ValueError("repository must be an unpinned OCI repository name")
if DIGEST.fullmatch(index_digest) is None:
raise ValueError("index digest must be sha256:<hex>")
if not isinstance(payload, dict) or not isinstance(payload.get("manifests"), list):