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

Integrate govulncheck #2119

Closed
sbueringer opened this issue Jul 31, 2023 · 9 comments · Fixed by #2174
Closed

Integrate govulncheck #2119

sbueringer opened this issue Jul 31, 2023 · 9 comments · Fixed by #2174
Assignees

Comments

@sbueringer
Copy link
Member

sbueringer commented Jul 31, 2023

govulncheck is a tool provided by the Go team: https://go.dev/blog/vuln

It allows scanning Go code for vulnerabilities and then reports if the vulnerable code is actually used (it could be that we have a Go Dependency with a CVE, but the affected package in the dependency is not actually used). The huge benefit here is that it can help to assess the impact of CVE's (i.e. no impact if we don't use the code).

It should be pretty easy to integrate as it can be ~ run via go run golang.org/x/vuln/cmd/govulncheck ./.... But let's integrate it with go install like other tools.

Limitations:

  • Trivy could find CVE's that are either outside of the scope of govulncheck (e.g. base image) or that govulncheck is not aware of yet

Notes:

  • The idea is to run it in our scan GitHub action after Trivy
  • We can decide if we action should also fail is govulncheck fails (could be that it finds issues that are unknown to Trivy). I would say yes, we can always iterate
@sbueringer
Copy link
Member Author

Corresponding core CAPI issue: kubernetes-sigs/cluster-api#9091

@chrischdi
Copy link
Member

Question: should we optionally consider using the gh action for it? https://github.com/golang/govulncheck-action

I think being able to run it locally too leads myself to +1 to the makefile / via go install.

@sbueringer
Copy link
Member Author

I think if the action doesn't have a significant upside I would favor a make target and to run it in our existing scan action.

It's also very valuable to just be able to check out an arbitrary commit and then run the make target (e.g. for older releases / commits)

@chrischdi
Copy link
Member

xref: kubernetes/sig-security#95

@chrischdi
Copy link
Member

/assign

@chrischdi
Copy link
Member

/reopen

To close when cherry-picks are done

@k8s-ci-robot
Copy link
Contributor

@chrischdi: Reopened this issue.

In response to this:

/reopen

To close when cherry-picks are done

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot reopened this Aug 14, 2023
@sbueringer
Copy link
Member Author

@chrischdi Done?

@chrischdi
Copy link
Member

jep

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