Skip to content

Conversation

@PillaiManish
Copy link
Contributor

Description of the change:

Based on the analysis from GHSA-557j-xg8c-q2mm, the vulnerability in operator-sdk is found in the code path leveraging the downloader.Manager.Build() method from Helm SDK. The fix for the CVE is adopted in the recent Helm SDK version 3.18.4. The same helm version is not adopted in the present release-4.15, hence, the PR adds update in the operator-sdk layer to mitigate the vulnerability.

Manual backport of PR: #434 for openshift-4.15.

@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 Aug 19, 2025
@openshift-ci-robot
Copy link
Contributor

@PillaiManish: This pull request references Jira Issue OCPBUGS-59070, which is invalid:

  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.
  • expected Jira Issue OCPBUGS-59070 to depend on a bug targeting a version in 4.16.0, 4.16.z and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

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.

In response to this:

Description of the change:

Based on the analysis from GHSA-557j-xg8c-q2mm, the vulnerability in operator-sdk is found in the code path leveraging the downloader.Manager.Build() method from Helm SDK. The fix for the CVE is adopted in the recent Helm SDK version 3.18.4. The same helm version is not adopted in the present release-4.15, hence, the PR adds update in the operator-sdk layer to mitigate the vulnerability.

Manual backport of PR: #434 for openshift-4.15.

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

openshift-ci bot commented Aug 19, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

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

@PillaiManish
Copy link
Contributor Author

/retest

Signed-off-by: Trilok Geer <[email protected]>
Co-authored-by: Manish Pillai <[email protected]>
@coderabbitai
Copy link

coderabbitai bot commented Sep 8, 2025

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.

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

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@PillaiManish
Copy link
Contributor Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Sep 8, 2025
@openshift-ci-robot
Copy link
Contributor

@PillaiManish: This pull request references Jira Issue OCPBUGS-59070, 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.15.z) matches configured target version for branch (4.15.z)
  • bug is in the state ASSIGNED, 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-59086 is in the state Verified, which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-59086 targets the "4.16.z" version, which is one of the valid target versions: 4.16.0, 4.16.z
  • bug has dependents

Requesting review from QA contact:
/cc @xiaojiey

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-robot openshift-ci-robot removed the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Sep 8, 2025
@openshift-ci openshift-ci bot requested a review from xiaojiey September 8, 2025 11:37
@chiragkyal
Copy link
Member

@PillaiManish, I think there was some issue with the UTs. Did we modify the UTs to make the CI pass? If yes, what were the changes?

@PillaiManish
Copy link
Contributor Author

PillaiManish commented Sep 8, 2025

@PillaiManish, I think there was some issue with the UTs. Did we modify the UTs to make the CI pass? If yes, what were the changes?

Yes, there was some nil pointer for the dependencies --> while i try to download the dependencies, so I just removed one of the test case, testing with normal chart.lock one.

@chiragkyal
Copy link
Member

@PillaiManish, I think there was some issue with the UTs. Did we modify the UTs to make the CI pass? If yes, what were the changes?

Yes, there was some nil pointer for the dependencies --> while i try to download the dependencies, so I just removed one of the test case, testing with normal chart.lock one.

Why it's so for 4.15.z and we don't see this happening for later versions?

@PillaiManish
Copy link
Contributor Author

PillaiManish commented Sep 8, 2025

Why it's so for 4.15.z and we don't see this happening for later versions?

In the newer code: https://github.com/openshift/ocp-release-operator-sdk/blob/main/vendor/helm.sh/helm/v3/pkg/getter/ocigetter.go#L52-L57
there is handling for registryClient

But in the older version: https://github.com/openshift/ocp-release-operator-sdk/blob/release-4.15/vendor/helm.sh/helm/v3/pkg/getter/ocigetter.go#L40-L43
there is no such handling. So, it throws a nil pointer error.

@mytreya-rh
Copy link

/lgtm
/label backport-risk-assessed

@openshift-ci openshift-ci bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Sep 8, 2025
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 8, 2025
@PillaiManish
Copy link
Contributor Author

PillaiManish commented Sep 9, 2025

Why it's so for 4.15.z and we don't see this happening for later versions?

In the newer code: https://github.com/openshift/ocp-release-operator-sdk/blob/main/vendor/helm.sh/helm/v3/pkg/getter/ocigetter.go#L52-L57 there is handling for registryClient

But in the older version: https://github.com/openshift/ocp-release-operator-sdk/blob/release-4.15/vendor/helm.sh/helm/v3/pkg/getter/ocigetter.go#L40-L43 there is no such handling. So, it throws a nil pointer error.

@chiragkyal FYI
helm/helm#9267
helm/helm#9409
https://github.com/helm/helm/blob/release-3.11/pkg/getter/ocigetter.go#L40

Copy link
Member

@chiragkyal chiragkyal left a comment

Choose a reason for hiding this comment

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

Thanks @PillaiManish for the explanation about the issue.

/cc @mytreya-rh

@openshift-ci openshift-ci bot requested a review from mytreya-rh September 9, 2025 10:56
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 9, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 9, 2025

New changes are detected. LGTM label has been removed.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 9, 2025

@PillaiManish: all tests passed!

Full PR test history. Your PR dashboard.

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.

@chiragkyal
Copy link
Member

/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 Sep 12, 2025
@PillaiManish
Copy link
Contributor Author

@cursor review

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

Labels

backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/severity-important Referenced Jira bug's severity is important 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.

8 participants