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

Bug 1855577: Updating the golang.org/x/text version to v0.3.3 #408

Merged
merged 1 commit into from Jul 15, 2020

Conversation

LalatenduMohanty
Copy link
Member

Signed-off-by: Lalatendu Mohanty lmohanty@redhat.com

@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. label Jul 15, 2020
@openshift-ci-robot
Copy link
Contributor

@LalatenduMohanty: This pull request references Bugzilla bug 1855577, which is valid. The bug has been updated to refer to the pull request using the external bug tracker.

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

In response to this:

Bug 1855577: Updating the golang.org/x/text version to v0.3.3

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.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Jul 15, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 15, 2020
@LalatenduMohanty
Copy link
Member Author

With this change

@LalatenduMohanty
Copy link
Member Author

LalatenduMohanty commented Jul 15, 2020

There are indirect dependency on golang.org/x/text , so I am not sure how to resolve this elegantly.
for example

$ git grep 'golang.org/x/text'

go.mod: golang.org/x/text v0.3.3 // indirect
go.sum:golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
go.sum:golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
go.sum:golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
go.sum:golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
go.sum:golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
go.sum:golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
go.sum:golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
vendor/github.com/spf13/cobra/go.sum:golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
vendor/github.com/spf13/cobra/go.sum:golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
vendor/golang.org/x/net/idna/idna10.0.0.go:// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
vendor/golang.org/x/net/idna/idna10.0.0.go:     "golang.org/x/text/secure/bidirule"
vendor/golang.org/x/net/idna/idna10.0.0.go:     "golang.org/x/text/unicode/bidi"
vendor/golang.org/x/net/idna/idna10.0.0.go:     "golang.org/x/text/unicode/norm"
vendor/golang.org/x/net/idna/idna9.0.0.go:// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
vendor/golang.org/x/net/idna/idna9.0.0.go:      "golang.org/x/text/secure/bidirule"
vendor/golang.org/x/net/idna/idna9.0.0.go:      "golang.org/x/text/unicode/norm"
vendor/golang.org/x/net/idna/punycode.go:// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
vendor/golang.org/x/net/idna/tables10.0.0.go:// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
vendor/golang.org/x/net/idna/tables11.0.0.go:// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
vendor/golang.org/x/net/idna/tables12.00.go:// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
vendor/golang.org/x/net/idna/tables9.0.0.go:// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
vendor/golang.org/x/net/idna/trie.go:// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
vendor/golang.org/x/net/idna/trieval.go:// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
vendor/golang.org/x/oauth2/go.sum:golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
vendor/golang.org/x/text/secure/bidirule/bidirule.go:   "golang.org/x/text/transform"
vendor/golang.org/x/text/secure/bidirule/bidirule.go:   "golang.org/x/text/unicode/bidi"
vendor/golang.org/x/text/transform/transform.go:package transform // import "golang.org/x/text/transform"
vendor/golang.org/x/text/unicode/bidi/bidi.go:package bidi // import "golang.org/x/text/unicode/bidi"
vendor/golang.org/x/text/unicode/bidi/tables10.0.0.go:// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
vendor/golang.org/x/text/unicode/bidi/tables11.0.0.go:// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
vendor/golang.org/x/text/unicode/bidi/tables9.0.0.go:// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
vendor/golang.org/x/text/unicode/bidi/trieval.go:// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
vendor/golang.org/x/text/unicode/norm/normalize.go:package norm // import "golang.org/x/text/unicode/norm"
vendor/golang.org/x/text/unicode/norm/normalize.go:     "golang.org/x/text/transform"
vendor/golang.org/x/text/unicode/norm/tables10.0.0.go:// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
vendor/golang.org/x/text/unicode/norm/tables11.0.0.go:// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
vendor/golang.org/x/text/unicode/norm/tables9.0.0.go:// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
vendor/golang.org/x/text/unicode/norm/transform.go:     "golang.org/x/text/transform"

However with this PR go module is getting the right version

$ go list -m all | grep 'golang.org/x/text'
golang.org/x/text v0.3.3

@LalatenduMohanty
Copy link
Member Author

Another approach #406. However we need to merge the fix asap.

go.mod Outdated
@@ -25,6 +25,7 @@ require (
github.com/spf13/cobra v0.0.5
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
golang.org/x/sys v0.0.0-20191003212358-c178f38b412c // indirect
golang.org/x/text v0.3.3 // indirect
Copy link
Member

Choose a reason for hiding this comment

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

replace would ensure other packages won't overwrite that

Using replace directive to force the 0.3.3 version

Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
Copy link
Member

@vrutkovs vrutkovs left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 15, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: LalatenduMohanty, vrutkovs

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:
  • OWNERS [LalatenduMohanty,vrutkovs]

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

@vrutkovs
Copy link
Member

/cherry-pick release-4.5

@openshift-cherrypick-robot

@vrutkovs: once the present PR merges, I will cherry-pick it on top of release-4.5 in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.5

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.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@LalatenduMohanty
Copy link
Member Author

/test e2e

@openshift-merge-robot openshift-merge-robot merged commit 6969a27 into openshift:master Jul 15, 2020
@openshift-ci-robot
Copy link
Contributor

@LalatenduMohanty: All pull requests linked via external trackers have merged: openshift/cluster-version-operator#408. Bugzilla bug 1855577 has been moved to the MODIFIED state.

In response to this:

Bug 1855577: Updating the golang.org/x/text version to v0.3.3

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.

@openshift-cherrypick-robot

@vrutkovs: new pull request created: #409

In response to this:

/cherry-pick release-4.5

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.

wking added a commit to wking/cluster-version-operator that referenced this pull request Jul 22, 2020
Generated with:

  $ go mod vendor

using:

  $ go version
  go version go1.14.4 linux/amd64

addressing [1]:

  Building github.com/openshift/cluster-version-operator (v1.0.0-302-g13e97af4-dirty)
  # golang.org/x/text/unicode/norm
  vendor/golang.org/x/text/unicode/norm/composition.go:466:2: undefined: recompMapOnce
  ...

I'd guessed these slipped through in 2021b86 (Bug 1855577: Updating
the golang.org/x/text version to v0.3.3, 2020-07-15, openshift#408).

  $ go1.13.5 mod vendor

pulls them in too, so I'm not entirely clear on how they slipped
through.  But they seem to be fatal for 1.14 builds and non-fatal for
1.13 builds.

[1]: https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_cluster-version-operator/414/pull-ci-openshift-cluster-version-operator-master-images/1286049697189859328
wking added a commit to wking/cluster-version-operator that referenced this pull request Jul 22, 2020
Generated with:

  $ go mod vendor

using:

  $ go version
  go version go1.14.4 linux/amd64

addressing [1]:

  Building github.com/openshift/cluster-version-operator (v1.0.0-302-g13e97af4-dirty)
  # golang.org/x/text/unicode/norm
  vendor/golang.org/x/text/unicode/norm/composition.go:466:2: undefined: recompMapOnce
  ...

I'd guessed these slipped through in 2021b86 (Bug 1855577: Updating
the golang.org/x/text version to v0.3.3, 2020-07-15, openshift#408).

  $ go1.13.5 mod vendor

pulls them in too, so I'm not entirely clear on how they slipped
through.  But they seem to be fatal for 1.14 builds and non-fatal for
1.13 builds.

[1]: https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_cluster-version-operator/414/pull-ci-openshift-cluster-version-operator-master-images/1286049697189859328
wking added a commit to wking/cluster-version-operator that referenced this pull request Jul 24, 2020
Pulling in [1,2].  Generated with:

  $ emacs go.mod  # removing the golang.org/x/text replace
  $ go get -u github.com/openshift/client-go@83993cebb5aee533bf2f2dded2d87b9e32835f4a
  go: github.com/openshift/client-go 83993cebb5aee533bf2f2dded2d87b9e32835f4a => v0.0.0-20200623090625-83993cebb5ae
  $ go get -u github.com/openshift/library-go@cc498c355c99983057e9e01f3abcceb40ca5c298
  go: github.com/openshift/library-go cc498c355c99983057e9e01f3abcceb40ca5c298 => v0.0.0-20200709151624-cc498c355c99
  $ go mod tidy
  $ go mod vendor
  $ git add -A go.* vendor

using:

  $ go version
  go version go1.14.4 linux/amd64

This pulls in the client-go bump which in turn addresses the
golang.org/x/text v0.3.3 to address CVE-2020-14040 [3].

  $ grep '# golang.org/x/text' vendor/modules.txt
  # golang.org/x/text v0.3.3

We'd previously addressed the CVE with the explicit 'replace' from
2021b86 (Bug 1855577: Updating the golang.org/x/text version to
v0.3.3, 2020-07-15, openshift#408), but it's more elegant to not have to have
explicit overrides for our indirect dependencies.

[1]: openshift/client-go@83993ce
[2]: openshift/library-go@cc498c3
[3]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-14040
wking added a commit to wking/cluster-version-operator that referenced this pull request Jul 25, 2020
Pulling in [1,2].  Generated with:

  $ emacs go.mod  # removing the golang.org/x/text replace
  $ go get -u github.com/openshift/client-go@83993cebb5aee533bf2f2dded2d87b9e32835f4a
  go: github.com/openshift/client-go 83993cebb5aee533bf2f2dded2d87b9e32835f4a => v0.0.0-20200623090625-83993cebb5ae
  $ go get -u github.com/openshift/library-go@cc498c355c99983057e9e01f3abcceb40ca5c298
  go: github.com/openshift/library-go cc498c355c99983057e9e01f3abcceb40ca5c298 => v0.0.0-20200709151624-cc498c355c99
  $ go mod tidy
  $ go mod vendor
  $ git add -A go.* vendor

using:

  $ go version
  go version go1.14.4 linux/amd64

This pulls in the client-go bump which in turn addresses the
golang.org/x/text v0.3.3 to address CVE-2020-14040 [3].

  $ grep '# golang.org/x/text' vendor/modules.txt
  # golang.org/x/text v0.3.3

We'd previously addressed the CVE with the explicit 'replace' from
2021b86 (Bug 1855577: Updating the golang.org/x/text version to
v0.3.3, 2020-07-15, openshift#408), but it's more elegant to not have to have
explicit overrides for our indirect dependencies.

[1]: openshift/client-go@83993ce
[2]: openshift/library-go@cc498c3
[3]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-14040
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/severity-medium Referenced Bugzilla bug's severity is medium 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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants