Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCPBUGS-8646: bump openshift/library-go to drop mongo-driver references #462

Merged
merged 1 commit into from
Apr 25, 2023

Conversation

alebedev87
Copy link
Contributor

@alebedev87 alebedev87 commented Mar 21, 2023

Bump new version of github.com/openshift/library-go to more recent version. This helps to get rid of some stale dependencies including mongo-driver (note go.sum removals).

@gcs278
Copy link
Contributor

gcs278 commented Mar 21, 2023

/test images

@alebedev87
Copy link
Contributor Author

/retest-required

@alebedev87
Copy link
Contributor Author

Changed commit message to reference the bug.

@alebedev87 alebedev87 changed the title CVE-2021-20329: update openshift/library-go to get rid of mongo-driver OCPBUGS-8646: update openshift/library-go to fix CVE-2021-20329 Mar 21, 2023
@openshift-ci-robot openshift-ci-robot added 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 Mar 21, 2023
@openshift-ci-robot
Copy link
Contributor

@alebedev87: This pull request references Jira Issue OCPBUGS-8646, which is invalid:

  • expected the bug to target the "4.14.0" version, but it targets "4.13.0" 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.

In response to this:

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/test-infra repository.

@alebedev87
Copy link
Contributor 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. bugzilla/valid-bug Indicates that a referenced Bugzilla 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 Mar 21, 2023
@openshift-ci-robot
Copy link
Contributor

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

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @ShudiLi

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 kubernetes/test-infra repository.

@gcs278
Copy link
Contributor

gcs278 commented Mar 21, 2023

/test images

@gcs278
Copy link
Contributor

gcs278 commented Mar 21, 2023

/retest-required
Looks like RPM is mirrored again

@ShudiLi
Copy link
Member

ShudiLi commented Mar 22, 2023

From QE side, checked it with 4.13.0-0.ci.test-2023-03-22-055438-ci-ln-ifgc7qb-latest
1.
% oc get clusterversion
NAME VERSION AVAILABLE PROGRESSING SINCE STATUS
version 4.13.0-0.ci.test-2023-03-22-055438-ci-ln-ifgc7qb-latest True False 15m Cluster version is 4.13.0-0.ci.test-2023-03-22-055438-ci-ln-ifgc7qb-latest
%

% oc rsync -n openshift-ingress $(oc get pods -n openshift-ingress --no-headers | grep "^router-default" | grep Running | head -1 | awk '{print $1}'):/usr/bin/openshift-router .
receiving file list ... done
openshift-router

% go version -m openshift-router | grep github.com/openshift/client-go
dep github.com/openshift/client-go v0.0.0-20230120202327-72f107311084
% go version -m openshift-router | grep github.com/openshift/library-go
dep github.com/openshift/library-go v0.0.0-20230120202744-256994f916c4
% go version -m openshift-router | grep github.com/google/gofuzz
dep github.com/google/gofuzz v1.2.0
% go version -m openshift-router | grep olang.org/x/oauth2
dep golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5
%
% go version -m openshift-router | grep github.com/certifi/gocertifi
% go version -m openshift-router | grep github.com/getsentry/raven-go
%

/label qe-approved
thanks

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Mar 22, 2023
@alebedev87
Copy link
Contributor Author

/retest-required

@alebedev87
Copy link
Contributor Author

alebedev87 commented Mar 22, 2023

/test e2e-metal-ipi-ovn-ipv6

Mirroring problem, should be fixed by now.

@alebedev87
Copy link
Contributor Author

/test e2e-upgrade

2 similar comments
@alebedev87
Copy link
Contributor Author

/test e2e-upgrade

@alebedev87
Copy link
Contributor Author

/test e2e-upgrade

@openshift-ci-robot
Copy link
Contributor

@alebedev87: This pull request references Jira Issue OCPBUGS-8646, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @ShudiLi

In response to this:

Updated github.com/openshift/library-go to the same version as github.com/openshift/api to get rid of mongo-driver dependency. Note go.sum got updated with mongo-driver dependency removed.

Why github.com/openshift/library-go?
You cannot update the indirect dependency by doing go get <dep>@<version> because it doesn't have a direct dependency on the current code, so go mod tidy will wipe it out.
You can only explicitly replace it in go.mod, which is an option but this may have some side effects as it may be incompatible new code.
So, to make it the compatible way, I had to walk up the dependency tree and update the direct dependency.
The dependency tree:

go.mongodb.org/mongo-driver@v1.1.2 ->                                                                                                 
github.com/go-openapi/validate@v0.19.5 ->
k8s.io/apiextensions-apiserver@v0.18.0-beta.2 ->
sigs.k8s.io/kube-storage-version-migrator@v0.0.3 ->
github.com/openshift/library-go@v0.0.0-20201223214116-830765adf874 ->
router

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/test-infra repository.

@gcs278
Copy link
Contributor

gcs278 commented Mar 24, 2023

Thanks for the description update.
/lgtm

@frobware
Copy link
Contributor

Anyway given that this PR just bumps the new version of openshift/library-go and removing this annoying mongo-driver as a side effect, I can just rename the commit and PR to remove CVE.

Yes, for me that would be appropriate.

/lgtm
/hold

Added hold in case somebody else on the team wants to leave the title as is.

@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 Mar 31, 2023
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 31, 2023
@alebedev87 alebedev87 changed the title OCPBUGS-8646: update openshift/library-go to fix CVE-2021-20329 OCPBUGS-8646: bump openshift/library-go Mar 31, 2023
@openshift-ci-robot
Copy link
Contributor

@alebedev87: This pull request references Jira Issue OCPBUGS-8646, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @ShudiLi

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

In response to this:

Bump new version of github.com/openshift/library-go to more recent version. This helps to get rid of some stale dependencies including mongo-driver (note go.sum removals).

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/test-infra repository.

@alebedev87
Copy link
Contributor Author

The latest change is just a commit message update.

@alebedev87
Copy link
Contributor Author

/test e2e-aws-serial

@alebedev87
Copy link
Contributor Author

/retest-required

@Miciah
Copy link
Contributor

Miciah commented Apr 1, 2023

Anyway given that this PR just bumps the new version of openshift/library-go and removing this annoying mongo-driver as a side effect, I can just rename the commit and PR to remove CVE.

Yes, for me that would be appropriate.

/lgtm /hold

Added hold in case somebody else on the team wants to leave the title as is.

I agree that the title doesn't need to mention the CVE.

The latest change is just a commit message update.

Looking through the Git history, is it obvious why the change was made? It makes sense to me to explain the reason for the bump in the commit message.

@gcs278
Copy link
Contributor

gcs278 commented Apr 4, 2023

Looking through the Git history, is it obvious why the change was made? It makes sense to me to explain the reason for the bump in the commit message.

I think I agree with this. Would a better commit message be OCPBUGS-8646: bump openshift/library-go to clean up mongo-driver reference in go.sum or something? Is that what Miciah is getting at?

The referenced version of go.mongodb.org/mongo-driver is affected by CVE-2021-20329.
Which may provoke false positives from the vulnerability scanners despite
the fact that no files from go.mongodb.org/mongo-driver were actually
vendored in this repository.
@alebedev87 alebedev87 changed the title OCPBUGS-8646: bump openshift/library-go OCPBUGS-8646: bump openshift/library-go to drop mongo-driver references Apr 4, 2023
@alebedev87
Copy link
Contributor Author

Updated the commit to give more details on why the PR and why this way.

@gcs278
Copy link
Contributor

gcs278 commented Apr 4, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 4, 2023
@alebedev87
Copy link
Contributor Author

/retest

1 similar comment
@alebedev87
Copy link
Contributor Author

/retest

@alebedev87
Copy link
Contributor Author

Cluster installation failed.

/test e2e-aws-serial

@alebedev87
Copy link
Contributor Author

/test e2e-aws-serial

@frobware
Copy link
Contributor

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 25, 2023
@frobware
Copy link
Contributor

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 25, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: frobware

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

The pull request process is described 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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 25, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 25, 2023

@alebedev87: 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/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit 40b2cbd into openshift:master Apr 25, 2023
@openshift-ci-robot
Copy link
Contributor

@alebedev87: Jira Issue OCPBUGS-8646: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-8646 has been moved to the MODIFIED state.

In response to this:

Bump new version of github.com/openshift/library-go to more recent version. This helps to get rid of some stale dependencies including mongo-driver (note go.sum removals).

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/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid 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. lgtm Indicates that a PR is ready to be merged. qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants