Skip to content

Add cosigning and provenance attestation to image builds - #333

Open
averevki wants to merge 1 commit into
mainfrom
builds-cosigning-and-provenance
Open

Add cosigning and provenance attestation to image builds#333
averevki wants to merge 1 commit into
mainfrom
builds-cosigning-and-provenance

Conversation

@averevki

Copy link
Copy Markdown
Member

Summary

Part of the work on Kuadrant/kuadrant-operator#2038

Context

This improves the Signed-Releases (https://github.com/ossf/scorecard/blob/main/docs/checks.md#signed-releases) check from the OpenSSF Scorecard (https://scorecard.dev/). Merging this should bring this section score from current 0 to 10.

Verification

Image builds cosigning and attestation was verified with the kuadrant-operator image builds (Kuadrant/kuadrant-operator#2073), the successful run of which can be found here, with the images pushed here.

Signed-off-by: averevki <sandyverevkin@gmail.com>
@averevki averevki self-assigned this Jun 30, 2026
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@averevki, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 40 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0f45a345-667b-4dd8-bb05-db60c1c57be5

📥 Commits

Reviewing files that changed from the base of the PR and between 72111de and 0cdefc8.

📒 Files selected for processing (5)
  • .github/workflows/build-images-base.yaml
  • .github/workflows/build-images-branches.yaml
  • .github/workflows/build-images-for-tag-release.yaml
  • .github/workflows/build-images-main.yaml
  • .github/workflows/build-images-nightly.yaml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch builds-cosigning-and-provenance

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.20%. Comparing base (72111de) to head (0cdefc8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #333   +/-   ##
=======================================
  Coverage   57.20%   57.20%           
=======================================
  Files          13       13           
  Lines        1458     1458           
=======================================
  Hits          834      834           
  Misses        529      529           
  Partials       95       95           
Flag Coverage Δ
unit 57.20% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@guicassolato guicassolato left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the image manifest now has 4 images with "unknown/unknown" os/arch. Is that expected?

Image

@averevki

averevki commented Jul 16, 2026

Copy link
Copy Markdown
Member Author

It is expected, this is how docker buildx (provenance: true) stores the attestations for each architecture, it embeds it directly into the image.

skopeo inspect docker://quay.io/kuadrant/authorino-operator:builds-cosigning-and-provenance --raw | jq
{
  "schemaVersion": 2,
  "mediaType": "application/vnd.oci.image.index.v1+json",
  "manifests": [
    {
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "digest": "sha256:48fafa861600bf99a2a8ea37db13246b1f07e4d7f39a6c34e66bd35e955b7ab1",
      "size": 675,
      "platform": {
        "architecture": "amd64",
        "os": "linux"
      }
    },
    ....
    {
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "digest": "sha256:d765ba4bc27704006d58a8d4803c4a70ec34f07cdd5bc259a45582f280640442",
      "size": 565,
      "annotations": {
        "vnd.docker.reference.digest": "sha256:48fafa861600bf99a2a8ea37db13246b1f07e4d7f39a6c34e66bd35e955b7ab1",
        "vnd.docker.reference.type": "attestation-manifest"
      },
      "platform": {
        "architecture": "unknown",
        "os": "unknown"
      }
    },
    {
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "digest": "sha256:b87517d08bd4e0e1abd942c51d79bc4a581dd1a4166c46ac21bc4154d50c0428",
      "size": 565,
      "annotations": {
        "vnd.docker.reference.digest": "sha256:93475356d6233d4aefda6b40d1c54218c90803d1bd5779ee32915b6a5861bbab",
        "vnd.docker.reference.type": "attestation-manifest"
      },
      "platform": {
        "architecture": "unknown",
        "os": "unknown"
      }
    },
    {
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "digest": "sha256:c6e52b009e38c8b0e7ce2327816c0861d71f88d8491fc62893c61b094396ce69",
      "size": 565,
      "annotations": {
        "vnd.docker.reference.digest": "sha256:7ccb60efcc4f72abcaab99a9bf9feb35d8003024ef1f45f75d86edf50e29cf7f",
        "vnd.docker.reference.type": "attestation-manifest"
      },
      "platform": {
        "architecture": "unknown",
        "os": "unknown"
      }
    },
    {
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "digest": "sha256:63384503fdf70a4f0f8ee1f46592320bca77cf8c5aa7a21f41ca26095da777d1",
      "size": 565,
      "annotations": {
        "vnd.docker.reference.digest": "sha256:c7d538b19d4b1d9765eb5861088ad40d7d76b5dd8d84dd7f69c5a3d364788534",
        "vnd.docker.reference.type": "attestation-manifest"
      },
      "platform": {
        "architecture": "unknown",
        "os": "unknown"
      }
    }
  ]
}

Multi-arch images are built a bit differently in the authorino repo, so in there it uses a dedicated github action to generate the provenance instead, which stores provenance as a separate OCI artifact in the registry.

Both ways achieve the same goal of storing the provenance, question is if we want to have the way the attestations are stored unified between the repos. If yes, it would require changing the process images are build in some projects. Personally, I would prefer attestations to be embedded into the image instead of creating an another artifact, to not trash the image registry.

@guicassolato

Copy link
Copy Markdown
Collaborator

Not a fun of the separate artefacts either.

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

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants