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

Update Go dependancies for fix a CVE #204

Closed
AureProd opened this issue Apr 19, 2024 · 4 comments
Closed

Update Go dependancies for fix a CVE #204

AureProd opened this issue Apr 19, 2024 · 4 comments

Comments

@AureProd
Copy link

Hello I use your exporter in a docker image of one of my projects but do you have a solution for me to update the Go dependencies of your project because Trivy a tool which analyzes security vulnerabilities in docker containers finds a CVE on a version of the Go dependency that you are using (do you have a way that I can update or rebuild your tool by updating the Go libraries without you having to do a release)

The Trivy result :
image

My dockerfile implementation of your tool :
image

@Lusitaniae
Copy link
Owner

fastest option would be you make your own build with updated dependencies

but if it's a security vulnerability affecting current releases then a PR would be most welcome :)

@AureProd
Copy link
Author

AureProd commented Apr 19, 2024

ok no problem,

After a test to build your tool, I have 2 problems :

These problems there are not important but you can update the doc in readme

  • for build with make

    docker run --rm -v .:/usr/local/go/src/github.com/Lusitaniae/apache_exporter -w /usr/local/go/src/github.com/Lusitaniae/apache_exporter golang:latest make

    I have this error :

    image

  • for build with docker :

    docker build -t apache_exporter .

    this build is not possible because in the dockerfile contains this :

    image

    and in local repo there are no folder .build

My solution for build in local repo is :

# for get and update go dependancies
docker run --rm -v .:/usr/local/go/src/github.com/Lusitaniae/apache_exporter -w /usr/local/go/src/github.com/Lusitaniae/apache_exporter golang:latest go get

# for build apache_exporter
docker run --rm -v .:/usr/local/go/src/github.com/Lusitaniae/apache_exporter -w /usr/local/go/src/github.com/Lusitaniae/apache_exporter golang:latest go build -buildvcs=false

and for update version of dependency with CVE :

docker run --rm -v .:/usr/local/go/src/github.com/Lusitaniae/apache_exporter -w /usr/local/go/src/github.com/Lusitaniae/apache_exporter golang:latest go get -u golang.org/x/net

this command change the go.mod file and change version v0.20.0 of dependency golang.org/x/net to v0.24.0 like this :

@AureProd
Copy link
Author

AureProd commented Apr 19, 2024

tell me if you want a PR for the version and the doc ;)
but dependabot has open PR

@blkperl blkperl closed this as completed Jun 24, 2024
@blkperl
Copy link
Collaborator

blkperl commented Jun 24, 2024

Looks like the dependabot pr is closed so I'm closing this out. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants