Skip to content

Support content integrity detection #1791

Open
1 of 3 issues completed
Open

Description

@FeynmanZhou

What is the version of your ORAS CLI

oras v1.3.0-beta.3

What would you like to be added?

Introduce a new oras check command that verifies the integrity of an artifact in a repository. This command would help users detect missing, corrupted, or tampered content, improving trust and reliability when distributing an artifact across filesystem and registries.

$ oras check docker.io/library/busybox:latest

▶ Checking image: docker.io/library/busybox:latest

Manifests:
✓ sha256:ec153840d1e635ac434fab5e377081f17e0e15afab27beb3f726c3265039cfff
✓ sha256:03b62250a3cb1abd125271d393fc08bf0cc713391eda6b57c02d1ef85efcc25c
✗ sha256:28d150a085778a307404359779e0b9b3c670597b4286cba4c66f052edbb1ecaa — error: not found
✓ sha256:817fa52143d152895d63824cb3be81294fb204b042d1b3706a393b7a0b6e5fb6

Blobs:
✓ sha256:74cc54e27dc41bb10dc4b2226072d469509f2f22f1a3ce74f4a59661a1d44602
✗ sha256:e6590344b1a5dc518829d6ea1524fc12f8bcd14ee9a02aa6ad8360cce3a9a9e9 — error: size mismatch (expected: 32, got: 42)
✗ sha256:04d15ddc0f179fa826db9218594a0f646c56f6e2432cb2aac0f5627fc596b904 — error: digest mismatch

❌ Integrity check failed (2 blobs, 1 manifest corrupted)
⏱️ Elapsed: 42s

Similar feature request is tracked in oras-go SDK oras-project/oras-go#986

Why is this needed for ORAS?

While ORAS provides robust capabilities to push, pull, copy, backup, and restore artifacts, there is currently no built-in mechanism to validate the integrity of artifacts by detecting their manifests and blobs. This is particularly important for:

  • Air-gapped or disaster recovery workflows where artifact completeness must be guaranteed
  • Debugging and remediation of corrupted image layers in registries
  • Ensuring content has not been tampered with post-push
  • CI/CD pipelines that need to validate content before deployment

Are you willing to submit PRs to contribute to this feature?

  • Yes, I am willing to implement it.

Sub-issues

Sub-issues

1 of 3 Issues completed
Loading 3 sub-issues

Metadata

Metadata

Labels

enhancement

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions