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

chore: Fix the security issue about sirupsen/logrus #2509

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

kevinwangcn
Copy link
Contributor

There is a security concern using the github.com/sirupsen/logrus with version 1.8.1

Supporting Material/References:
sirupsen/logrus#1370

Impact
This happens if you try to log something that is longer than 64kb without newlines through something like cmd.Stdout = logrus.Writer().
This can cause a denial of service in some cases.

What this PR does / why we need it:
The PR is going to bump up the version for this particular module from 1.8.1 to 1.9.3 which has resolved the security issue.

How does this change affect the cardinality of KSM: (increases, decreases or does not change cardinality)

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Copy link

linux-foundation-easycla bot commented Sep 23, 2024

CLA Signed


The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Sep 23, 2024
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If kube-state-metrics contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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.

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Sep 23, 2024
@k8s-ci-robot
Copy link
Contributor

Welcome @kevinwangcn!

It looks like this is your first PR to kubernetes/kube-state-metrics 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/kube-state-metrics has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 23, 2024
@CatherineF-dev
Copy link
Contributor

Can you use go get github.com/sirupsen/logrus@v1.9.3 instead of replace?

@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 23, 2024
@kevinwangcn
Copy link
Contributor Author

Can you use go get github.com/sirupsen/logrus@v1.9.3 instead of replace?

Updated my PR. thanks for the review.

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 23, 2024
@rexagod
Copy link
Member

rexagod commented Sep 24, 2024

Is there a CVE for this vulnerability? Does golvulncheck validate that the affected symbols are actually being used in the codebase?

@kevinwangcn kevinwangcn changed the title Fix the security issue about sirupsen/logrus chore: Fix the security issue about sirupsen/logrus Sep 24, 2024
@kevinwangcn
Copy link
Contributor Author

Is there a CVE for this vulnerability? Does golvulncheck validate that the affected symbols are actually being used in the codebase?

yes, this is going to solve a CVE issue. Attached is the scan report via Twistlock. Please refer to it for more details.
scan-result.csv

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Sep 24, 2024
@kevinwangcn
Copy link
Contributor Author

@rexagod @CatherineF-dev Could you please review my PR? Thanks a lot.

@CatherineF-dev
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 25, 2024
@mrueg
Copy link
Member

mrueg commented Sep 30, 2024

/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CatherineF-dev, kevinwangcn, mrueg

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 30, 2024
@k8s-ci-robot k8s-ci-robot merged commit 2c5a249 into kubernetes:main Sep 30, 2024
12 checks passed
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants