Skip to content

Can pull referrer with oras pull without knowing the digest #834

Closed as duplicate

Description

@SamirPS

What is the version of your ORAS CLI

Version: 1.0.0-rc.1+unreleased Go version: go1.20 Git commit: 8bda262 Git tree state: clean

What would you like to be added?

For example, if I take this multi-arch image and copy it to azure

docker.io/library/ubuntu:lunar -> xxx.azurecr.io/test:lunar

I now have an artefact named one.json. I attach it to the amd64 platform with this command, for example:

oras attach xxx.azurecr.io/test:lunar --platform linux/amd64 one.json

Now if I do

oras discover xxx.azurecr.io/test:lunar

I will have 0 artefacts discovered, but if I do

oras discover xxx.azurecr.io/test:lunar  --platform linux/amd64

Oras will find the one.json artefact with this digest sha256:digestofsbom. These two outputs are excepted.

Now if I do:

oras pull xxx.azurecr.io/test:lunar  --platform linux/amd64

It will say downloaded empty artefacts. But if I do

oras pull xxx.azurecr.io/test:lunar@sha256:digestofsbom

It downloads the one.json artefact.

What @SteveLasker and I proposed is to add this command, for example, to pull the artefacts:

oras pull xxx.azurecr.io/test:lunar --platform linux/amd64 --artifactType application/spdx+json --top 1 --orderby desc

Why is this needed for ORAS?

Some people will use Oras without knowing anything about digest or manifest. It will permit to have for them a great user experience. Also, if I attached multiple files to the amd64 ( sbom, license,...), it's great to be able to download all files with a single command and not need to get the digest for each file.

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

  • Yes, I am willing to implement it.

Activity

  1. added
    enhancement
    on Feb 24, 2023
  2. added this to the future milestone on Feb 25, 2023
  3. qweeah commented on Feb 25, 2023

    @qweeah
    Contributor

    👍 Sounds like a counterpart of --include-subject to me.

  4. added
    experimental
    on Mar 22, 2023
  5. github-actions commented on Jul 23, 2023

    @github-actions

    This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

  6. added
    stale
    on Jul 23, 2023
  7. SamirPS commented on Jul 30, 2023

    @SamirPS
    Author

    Any news about this issue?

  8. removed
    stale
    on Jul 31, 2023
  9. qweeah commented on Jul 31, 2023

    @qweeah
    Contributor

    Any news about this issue?

    @shizhMSFT @FeynmanZhou @sajayantony for planning

  10. shizhMSFT commented on Jul 31, 2023

    @shizhMSFT
    Contributor

    The subject field is introduced for the OCI Index manifest in image-spec v1.0.0-rc4. We can continue the discussion from there.

  11. shizhMSFT commented on Jul 31, 2023

    @shizhMSFT
    Contributor

    @SamirPS You might be interested in opencontainers/image-spec#1020, especially the following diagram:

    graph TD;
    
    sboms-->lsbom;
    sboms-.->index;
    sboms-->wsbom;
    
    lsbom[sbom]-.->linux;
    
    index-->linux;
    index-->windows;
    
    wsbom[sbom]-.->windows;
    
    Loading
  12. shizhMSFT commented on Jul 31, 2023

    @shizhMSFT
    Contributor

    @sajayantony Currently, we don't have a standard to create the sboms in the above diagram. Will that be in the corresponding OCI spec? or it is purely up to the client implementation? If it is the latter, we probably can propose one solution for oras.

  13. TerryHowe commented on Oct 22, 2026

    @TerryHowe
    Member

    Duplicate of #1308. Both ask for pulling referrers (e.g. SBOMs or attached files) without pulling the subject image or knowing the referrer digest. Closing to track it in one place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementexperimental

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions