Skip to content

Comments

OCPBUGS-72407: change allow-all allowedregistries to deny-all#608

Open
dusk125 wants to merge 1 commit intoopenshift:mainfrom
dusk125:imagestreamimport-4.21
Open

OCPBUGS-72407: change allow-all allowedregistries to deny-all#608
dusk125 wants to merge 1 commit intoopenshift:mainfrom
dusk125:imagestreamimport-4.21

Conversation

@dusk125
Copy link

@dusk125 dusk125 commented Feb 20, 2026

Change the default behavior of an empty/unspecified AllowRegistriesForImport from allow-all to deny-all.

Summary by CodeRabbit

  • Refactor
    • Modified registry import whitelisting logic to remove default initialization behavior. Registry whitelisting now requires explicit configuration rather than providing automatic default permissions.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 20, 2026
@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important 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 Feb 20, 2026
@openshift-ci-robot
Copy link

@dusk125: This pull request references Jira Issue OCPBUGS-72407, which is invalid:

  • expected the vulnerability to target either version "4.22." or "openshift-4.22.", but it targets "4.21.z" instead

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:

Change the default behavior of an empty/unspecified AllowRegistriesForImport from allow-all to deny-all.

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
Copy link

coderabbitai bot commented Feb 20, 2026

Walkthrough

The change removes a default whitelister initialization that was previously created when AllowedRegistriesForImport is empty. After this modification, the whitelister field will remain nil in such cases, shifting the responsibility to callers to handle this state.

Changes

Cohort / File(s) Summary
Whitelister Initialization
pkg/image/apiserver/apiserver.go
Removed default initialization of whitelister when AllowedRegistriesForImport is empty, eliminating the call to whitelist.WhitelistAllRegistries(context.TODO()) and removing the context import. The whitelister field may now be nil.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Stable And Deterministic Test Names ✅ Passed This pull request only modifies production code in pkg/image/apiserver/apiserver.go and does not add, remove, or modify any test files. No test names with unstable content are introduced.
Test Structure And Quality ✅ Passed The pull request does not modify any test files. Only pkg/image/apiserver/apiserver.go was modified with 3 lines removed. Since the custom check focuses on test code quality and this PR contains no test file modifications, the check is not applicable and passes by default.
Title check ✅ Passed The title mentions changing allow-all to deny-all behavior, which aligns with the PR objective to change default AllowedRegistriesForImport behavior from allow-all to deny-all. However, the actual code change only removes the initialization of a default whitelister when the list is empty, leaving it as nil rather than implementing explicit deny-all logic. The title is partially related to the changeset's intent but overstates what the code change accomplishes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 20, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dusk125
Once this PR has been reviewed and has the lgtm label, please assign ricardomaraschini 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

@dusk125
Copy link
Author

dusk125 commented Feb 20, 2026

In order to not break clusters, openshift/cluster-openshift-apiserver-operator#652 needs to merge first

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 20, 2026
@dusk125 dusk125 changed the title WIP: OCPBUGS-72407: change allow-all allowedregistries to deny-all OCPBUGS-72407: change allow-all allowedregistries to deny-all Feb 20, 2026
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 20, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 21, 2026

@dusk125: The following test 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/e2e-aws-ovn e4d0d32 link true /test e2e-aws-ovn

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

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. jira/severity-important Referenced Jira bug's severity is important 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