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

Fix CVE because of golang.org/x/net in kanister-tools image #2419

Merged
merged 3 commits into from
Oct 20, 2023
Merged

Conversation

viveksinghggits
Copy link
Contributor

Change Overview

There were some vulnerabilities reported in kanister-tools image that were because of older version of golang.org/x/net being used in kanister.
This PR make sure that we are using latest version of golang.org/x.net for kansiter and it's indirect deps as well as the binaries that we build with kanister, i.e., restic and kopia.

Pull request type

Please check the type of change your PR introduces:

  • 🚧 Work in Progress
  • 🌈 Refactoring (no functional changes, no api changes)
  • 🐹 Trivial/Minor
  • 🐛 Bugfix
  • 🌻 Feature
  • 🗺️ Documentation
  • 🤖 Test

Issues

  • fixes #issue-number

Test Plan

Build the kanister-tools image and run grype to make sure no vulns. are reported

grype --add-cpes-if-none --only-fixed --by-cve ghcr.io/kanisterio/kanister-tools:latestxnet     
 ✔ Vulnerability DB                [no update available]  
 ✔ Loaded image                                                    ghcr.io/kanisterio/kanister-tools:latestxnet
 ✔ Parsed image                         sha256:f067ff4e4b8dc657e266a33cf5c0909289a8b45d4cac034fa078e1e2962d2b22
 ✔ Cataloged packages              [410 packages]  
 ✔ Scanned for vulnerabilities     [45 vulnerability matches]  
   ├── by severity: 0 critical, 0 high, 18 medium, 25 low, 0 negligible (2 unknown)
   └── by status:   0 fixed, 45 not-fixed, 0 ignored 
No vulnerabilities found

  • 💪 Manual
  • ⚡ Unit test
  • 💚 E2E

Some of the kanister's deps were using older version of `x/net` package which
resulted into some of the vuln. being reported in the image.
This commit makes sure that we are using 0.17.0 version of `x/net`.
While building the tools image, we were also building and packaging
`restic` and `kopia` with it.
Some of the direct/indirect deps of these projects had a vuln. because
of package `x/net`.
This commit updates the `go.mod` of these packages while building them
to make sure that we are using updated version `0.17.0` of that dep.
Copy link
Contributor

@denisvmedia denisvmedia left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you!

@pavannd1 pavannd1 added the kueue label Oct 20, 2023
@mergify mergify bot merged commit ebba82c into master Oct 20, 2023
14 checks passed
@mergify mergify bot deleted the fix-cve branch October 20, 2023 16:44
kale-amruta pushed a commit that referenced this pull request Oct 23, 2023
* Add `golang.org/x/net` in replace to make sure we use `v0.17.0` version

Some of the kanister's deps were using older version of `x/net` package which
resulted into some of the vuln. being reported in the image.
This commit makes sure that we are using 0.17.0 version of `x/net`.

* Use `0.17.0` version of `golang.org/x/net` in restic and kopia

While building the tools image, we were also building and packaging
`restic` and `kopia` with it.
Some of the direct/indirect deps of these projects had a vuln. because
of package `x/net`.
This commit updates the `go.mod` of these packages while building them
to make sure that we are using updated version `0.17.0` of that dep.

* Run go mod tidy and then commit changes
kale-amruta pushed a commit that referenced this pull request Oct 24, 2023
* Add `golang.org/x/net` in replace to make sure we use `v0.17.0` version

Some of the kanister's deps were using older version of `x/net` package which
resulted into some of the vuln. being reported in the image.
This commit makes sure that we are using 0.17.0 version of `x/net`.

* Use `0.17.0` version of `golang.org/x/net` in restic and kopia

While building the tools image, we were also building and packaging
`restic` and `kopia` with it.
Some of the direct/indirect deps of these projects had a vuln. because
of package `x/net`.
This commit updates the `go.mod` of these packages while building them
to make sure that we are using updated version `0.17.0` of that dep.

* Run go mod tidy and then commit changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants