Skip to content

OCPBUGS-90570: Reject non-empty checksum for OCI images#501

Open
mabulgu wants to merge 1 commit into
openshift:release-4.22from
mabulgu:OCPBUGS-84305/cherry-pick-oci-checksum-4.22
Open

OCPBUGS-90570: Reject non-empty checksum for OCI images#501
mabulgu wants to merge 1 commit into
openshift:release-4.22from
mabulgu:OCPBUGS-84305/cherry-pick-oci-checksum-4.22

Conversation

@mabulgu

@mabulgu mabulgu commented Jun 22, 2026

Copy link
Copy Markdown

OCPBUGS-84305: Reject non-empty checksum for OCI images

Cherry-pick of upstream metal3-io#3186 to release-4.22.

GetChecksum() made checksums optional for OCI images but never rejected a non-empty checksum. This causes the webhook to accept invalid configurations where both oci:// scheme and a checksum are provided, leading to confusing provisioning failures.

This fix:

  • Rejects spec.image.checksum when an oci:// URL is used, returning a clear error message
  • Moves the OCI check before the live-iso early return to prevent bypassing the validation with oci:// + live-iso + non-empty checksum

* Reject non-empty checksum for OCI images

GetChecksum() made checksums optional for OCI images but never
rejected a non-empty checksum. This causes the webhook to accept
invalid configurations where both oci:// scheme and a checksum
are provided, leading to confusing provisioning failures.

Signed-off-by: mabulgu <mabulgu@gmail.com>

* Address review: move OCI check before live-iso and improve error message

Move the OCI checksum validation before the live-iso early return to
prevent bypassing the check with oci:// + live-iso + non-empty checksum.
Include field context in the error message for better user guidance.

Signed-off-by: mabulgu <mabulgu@gmail.com>

---------

Signed-off-by: mabulgu <mabulgu@gmail.com>
@openshift-ci-robot openshift-ci-robot added jira/severity-low Referenced Jira bug's severity is low for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jun 22, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@mabulgu: This pull request references Jira Issue OCPBUGS-90570, which is invalid:

  • expected the bug to target the "4.22.0" version, but no target version was set
  • expected dependent Jira Issue OCPBUGS-84305 to target a version in 5.0.0, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

OCPBUGS-84305: Reject non-empty checksum for OCI images

Cherry-pick of upstream metal3-io#3186 to release-4.22.

GetChecksum() made checksums optional for OCI images but never rejected a non-empty checksum. This causes the webhook to accept invalid configurations where both oci:// scheme and a checksum are provided, leading to confusing provisioning failures.

This fix:

  • Rejects spec.image.checksum when an oci:// URL is used, returning a clear error message
  • Moves the OCI check before the live-iso early return to prevent bypassing the validation with oci:// + live-iso + non-empty checksum

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 152e7c9a-a788-4d3b-ab6c-cfe3273565ce

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@openshift-ci

openshift-ci Bot commented Jun 22, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mabulgu
Once this PR has been reviewed and has the lgtm label, please assign honza for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mabulgu

mabulgu commented Jun 22, 2026

Copy link
Copy Markdown
Author

/jira refresh

@openshift-ci-robot

Copy link
Copy Markdown

@mabulgu: This pull request references Jira Issue OCPBUGS-90570, which is invalid:

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@mabulgu

mabulgu commented Jun 22, 2026

Copy link
Copy Markdown
Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jun 22, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@mabulgu: This pull request references Jira Issue OCPBUGS-90570, which is valid. The bug has been moved to the POST state.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-84305 is in the state ON_QA, which is one of the valid states (MODIFIED, ON_QA, VERIFIED)
  • dependent Jira Issue OCPBUGS-84305 targets the "5.0.0" version, which is one of the valid target versions: 5.0.0
  • bug has dependents

Requesting review from QA contact:
/cc @sgoveas

Details

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot requested a review from sgoveas June 22, 2026 11:13
@mabulgu

mabulgu commented Jun 22, 2026

Copy link
Copy Markdown
Author

/retest

@openshift-ci

openshift-ci Bot commented Jun 22, 2026

Copy link
Copy Markdown

@mabulgu: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/verify-deps b552b74 link true /test verify-deps
ci/prow/vendor b552b74 link true /test vendor

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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

Labels

jira/severity-low Referenced Jira bug's severity is low for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants