-
Notifications
You must be signed in to change notification settings - Fork 796
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
CVE-2024-24790: bump go to 1.22.6 #917
CVE-2024-24790: bump go to 1.22.6 #917
Conversation
021f18e
to
34f784b
Compare
@@ -6,7 +6,7 @@ executors: | |||
# This must match .promu.yml. | |||
golang: | |||
docker: | |||
- image: cimg/go:1.21 | |||
- image: cimg/go:1.22.6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be changed in .promu.yml
as well although there it should just be 1.22
.
See here: https://github.com/prometheus/prometheus/blob/main/.promu.yml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit fe96c8f
go.mod
Outdated
@@ -1,6 +1,6 @@ | |||
module github.com/prometheus-community/elasticsearch_exporter | |||
|
|||
go 1.20 | |||
go 1.22.6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think with a version this new, the toolchain declaration is required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please advise on what's needed for the toolchain declaration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean the following declaration?
go 1.22.6
toolchain go1.22.6
Running go mod tidy
removes the toolchain
line, so I assume it won't be required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it depends on your local go version. After a second thought, we don't need to change this file at all. This is only a minimum go version and we don't need any new language features so we can leave this as 1.20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm go newbie so I had to check, and it appears you're correct. I have go 1.22.5 and when I built the code in master branch and then scan with Syft, it reports that the image contains go standard library 1.22.5.
Should I remove the change in go.mod
and rely on CI files to use the updated go version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, you don't need the change in go.mod and in that case you also don't need the go.sum changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, I removed that commit
Signed-off-by: Janne Kataja <[email protected]>
Signed-off-by: Janne Kataja <[email protected]>
fe96c8f
to
90f6066
Compare
@sysadmind , kindly, when do we expect w release/tag with the fix? |
Fixes vulnerability CVE-2024-24790 by updating Go to 1.22.6
Fixes #913