这是indexloc提供的服务,不要输入任何密码
Skip to content

Bump prometheus/client_golang to v1.11.1 #12653

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

Merged
merged 1 commit into from
Feb 23, 2022

Conversation

qu1queee
Copy link
Contributor

In order to address CVE-2022-21698 , bump the prometheus/client_golang to v1.11.1.

See more information in GHSA-cg3q-j54f-5p7p

Proposed Changes

  • Bump the module direct dependency to v1.11.1

Release Note

Bump prometheus/client_golang to v1.11.1 in order to address CVE-2022-21698 

@knative-prow-robot knative-prow-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Feb 22, 2022
@knative-prow-robot
Copy link
Contributor

Welcome @qu1queee! It looks like this is your first PR to knative/serving 🎉

@knative-prow-robot knative-prow-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Feb 22, 2022
@knative-prow-robot
Copy link
Contributor

Hi @qu1queee. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@dprotaso
Copy link
Member

Hey few things - after bumping the dependency in go.mod you'll want to run our hack/update-deps.sh script

Secondly you'll want to sign the CLA to contribute - https://cla.developers.google.com/clas

Let me know if you're blocked on those things and I can bump this dependency for you.

@evankanderson
Copy link
Member

evankanderson commented Feb 22, 2022

It looks like the string InstrumentHandler appears only in vendor/github.com/prometheus/client_golang/prometheus/promhttp, not in any other code in Knative -- we use raw prometheus.Gauge in queue-proxy.

(I was misled by VSCode in my initial search)

In order to address CVE CVE-2022-21698

See more information in
GHSA-cg3q-j54f-5p7p
@qu1queee qu1queee force-pushed the qu1queeee/CVE-2022-21698 branch from 9b133de to 089ee52 Compare February 22, 2022 19:04
@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 22, 2022
@dprotaso
Copy link
Member

/ok-to-test

@knative-prow-robot knative-prow-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 22, 2022
@qu1queee
Copy link
Contributor Author

qu1queee commented Feb 22, 2022

Thanks for the hint @dprotaso . As a side note, the update-deps.sh uses a go get which is deprecated on go v1.17, so the script didn't work immediately(depending on ur go version). Where could I open an issue for this?

/assign @dprotaso

@qu1queee
Copy link
Contributor Author

@evankanderson thanks for the information. My rational on this PR was that for tooling such as Whitesource(OS security tool), a vulnerability will be raised when using this project as a dependency, due to the indirect one to the prometheus/client_golang. Therefore I thought it would not hurt to propose the bump here.

@codecov
Copy link

codecov bot commented Feb 22, 2022

Codecov Report

Merging #12653 (089ee52) into main (c1aaaf6) will decrease coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #12653      +/-   ##
==========================================
- Coverage   87.52%   87.47%   -0.05%     
==========================================
  Files         195      195              
  Lines        9712     9712              
==========================================
- Hits         8500     8496       -4     
- Misses        929      931       +2     
- Partials      283      285       +2     
Impacted Files Coverage Δ
pkg/reconciler/revision/background.go 90.00% <0.00%> (-1.82%) ⬇️
pkg/reconciler/configuration/configuration.go 84.61% <0.00%> (-1.54%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c1aaaf6...089ee52. Read the comment docs.

@evankanderson
Copy link
Member

I think it's fine to propose the bump. It was flagged as a Knative vulnerability, and I wanted to be clear that it was a false-positive.

@qu1queee
Copy link
Contributor Author

/retest

@dprotaso
Copy link
Member

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 22, 2022
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprotaso, qu1queee

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

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 22, 2022
@dprotaso
Copy link
Member

thanks @qu1queee

re: the warning - yeah I believe it's a known issue

@dprotaso
Copy link
Member

Made an issue about favouring go install knative/test-infra#3113

@dprotaso
Copy link
Member

known flake
/retest

@knative-prow-robot knative-prow-robot merged commit 7e1dd36 into knative:main Feb 23, 2022
@qu1queee qu1queee deleted the qu1queeee/CVE-2022-21698 branch February 23, 2022 07:44
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. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants