-
Notifications
You must be signed in to change notification settings - Fork 270
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
nodetaint/0.0.4-r22: cve remediation #35052
base: main
Are you sure you want to change the base?
Conversation
Gen AI suggestions to solve the build error: • Detected Error: "cannot use doc (variable of type *"github.com/google/gnostic/openapiv2".Document) as *"github.com/google/gnostic-models/openapiv2".Document value in argument to proto.NewOpenAPIData" • Error Category: Dependency/Version • Failure Point: Go module dependency resolution during build, specifically with k8s.io/client-go package • Root Cause Analysis: There's a type mismatch between gnostic packages due to incompatible versions. The kubernetes client-go package v0.27.8 is using an older version of gnostic that's incompatible with newer dependencies. • Suggested Fix:
- uses: go/bump
with:
deps: k8s.io/[email protected] k8s.io/[email protected] k8s.io/[email protected] google.golang.org/[email protected] golang.org/x/[email protected]
- runs: |
go mod edit -require github.com/google/[email protected]
go mod tidy -compat=1.17 • Explanation: The error occurs because newer versions of dependencies are trying to use the updated gnostic-models package while k8s.io/client-go is still expecting the older gnostic package. By pinning to compatible versions and explicitly requiring the correct gnostic version, we ensure type compatibility across dependencies. • Additional Notes:
• References: |
d05e268
to
d80dbc8
Compare
Gen AI suggestions to solve the build error: • Detected Error: "failed to build package: unable to run package nodetaint pipeline: unable to run pipeline: exit status 1" • Error Category: Build/Version • Failure Point: During the • Root Cause Analysis: The error appears to be caused by version incompatibility between the Go modules being updated. The pipeline is trying to update to newer versions of k8s.io components while keeping compatibility with Go 1.17 ( • Suggested Fix:
- runs: |
# Update this line
go mod tidy -compat=1.20
- uses: go/bump
with:
deps: k8s.io/[email protected] k8s.io/[email protected] google.golang.org/[email protected] golang.org/x/[email protected] k8s.io/[email protected] • Explanation:
• Additional Notes:
• References:
|
the build is failing with the following error: 2024/12/08 11:58:53 WARN /var/cache/melange/gomodcache/k8s.io/[email protected]/applyconfigurations/meta/v1/unstructured.go:64:38: cannot use doc (variable of type *"github.com/google/gnostic/openapiv2".Document) as *"github.com/google/gnostic-models/openapiv2".Document value in argument to proto.NewOpenAPIData which means that the project cannot be compiled with updating kubernetes dependency, so we have to add this as a note to the detected CVE entry here: https://github.com/wolfi-dev/advisories/blob/a1b97bda597968dbe9fac378f615103f55881e55/nodetaint.advisories.yaml#L494 |
Gen AI suggestions to solve the build error: • Detected Error:
• Error Category: Dependency/Version • Failure Point: Go package compilation during the build phase, specifically in k8s.io/client-go package • Root Cause Analysis: There's a type mismatch between gnostic packages. This is a known issue when mixing certain versions of kubernetes client libraries with newer versions of gnostic dependencies. • Suggested Fix:
- uses: go/bump
with:
deps: |
k8s.io/[email protected]
k8s.io/[email protected]
google.golang.org/[email protected]
golang.org/x/[email protected]
k8s.io/[email protected]
k8s.io/[email protected]
github.com/google/[email protected]
github.com/google/[email protected] • Explanation: The error occurs because newer versions of kubernetes client libraries expect the gnostic-models package while older versions use the gnostic package. By explicitly pinning the gnostic versions, we ensure compatibility with the kubernetes client library version being used. • Additional Notes:
• References: |
nodetaint/0.0.4-r22: fix GHSA-27wf-5967-98gx
Advisory data: https://github.com/wolfi-dev/advisories/blob/main/nodetaint.advisories.yaml