Skip to content

[Bug]: Operator images not using OCI format for attestation #10600

Closed

Description

@sxd

Is there an existing issue already for this bug?

  • I have searched for an existing issue, and could not find anything. I believe this is a new bug.

I have read the troubleshooting guide

  • I have read the troubleshooting guide and I think this is a new bug.

I am running a supported version of CloudNativePG

  • I have read the troubleshooting guide and I think this is a new bug.

Contact Details

No response

Version

1.29 (latest patch)

What version of Kubernetes are you using?

1.35

What is your Kubernetes environment?

Self-managed: kind (evaluation)

How did you install the operator?

YAML manifest

What happened?

The images are currently having the attestation (SBOM basically) without the right artifactType in the manifest making them undetectable by tools like GUAC

Documentation https://docs.docker.com/build/exporters/#oci-media-types

Cluster resource

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added this to the Now milestone on May 3, 2026
  2. self-assigned this
    on May 3, 2026
  3. added theissue type on May 3, 2026
  4. dosubot commented on May 3, 2026

    @dosubot

    This looks like a valid finding. Looking at the current docker-bake.hcl, the output and attestation configuration is:

    output = [
      "type=image,registry.insecure=${insecure}",
    ]
    
    attest = [
      "type=provenance,mode=max",
      "type=sbom"
    ]

    The output uses type=image without explicitly enabling OCI media types. Per the Docker documentation on OCI media types, when attestations are stored without oci-mediatypes=true, they use Docker-specific media types instead of standard OCI artifactType descriptors — which is what makes them invisible to tools like GUAC that look for the OCI referrers API / artifactType field.

    The fix would likely involve adding oci-mediatypes=true to the output configuration:

    output = [
      "type=image,registry.insecure=${insecure},oci-mediatypes=true",
    ]

    This should cause BuildKit to produce attestation manifests with the proper OCI artifactType set, making them discoverable by OCI-native tooling.

    To reply, just mention @dosu.


    Share context across your team and agents. Try Dosu.

    Leave Feedback Learn about cloudnative-pg with Dosu Add Dosu to your team

  5. added a commit that references this issue on May 5, 2026
    984f4f2
  6. mnencia commented on May 5, 2026

    @mnencia
    Member

    Fixed by #10601.

    BuildKit's default image exporter does not set artifactType or an OCI 1.1 Referrers subject on attestation manifests. The PR adds oci-artifact=true, so SBOM and provenance attestations now carry both and are discoverable through the Referrers API.

    GUAC was the example mentioned here, but it has a separate limitation tracked upstream at guacsec/guac#1370: its OCI collector filters Referrers descriptors by an allowlist that does not include the BuildKit attestation manifest type, so it drops them regardless of how the manifest is shaped. That is for the GUAC project to fix; nothing on the cnpg side will help.

  7. gbartolini commented on May 5, 2026

    @gbartolini
    Contributor

    Yes, in general it would be appreciated to have clearer issue descriptions, with ways to detect the current problem and how to determine the success of the PR. This fosters collaboration, facilitates buy-in, and reduces the effort in review and approval.

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

Metadata

Metadata

Assignees

Labels

bug 🐛Something isn't working

Type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions