Skip to content

bug(vex): Trivy doesn't support auth for OCI images from private registries #8916

@DmitriyLewen

Description

@DmitriyLewen

Description

When trying to get VEX documents from the OCI image we get an authentication error:

failed to probe the package URL:
github.com/aquasecurity/trivy/pkg/vex.RetrieveVEXAttestation
/home/runner/work/trivy/trivy/pkg/vex/oci.go:42
fetching documents: looking for documents: resolving image reference: GET https://xxx.azurecr.io/oauth2/token?scope=repository%3Aaaa-bbb%3Apull&service=xxx.azurecr.io: UNAUTHORIZED: authentication required, visit https://aka.ms/acr/authorization for more information. CorrelationId: xxxx-xxx-xx-xx-xxxxx

Unfortunately, github.com/openvex/discovery doesn't support auth.
I created openvex/discovery#82 about adding remote options for ProbePurl.

Discussed in #8911

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions