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

chore(ci): add govulncheck step to depedency-review #2752

Conversation

Jayanth-Parthsarathy
Copy link
Contributor

Change Overview

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

Changes

  • Added latest version of govulncheck github actions
  • Runs on the root dir of the project and reports vulerabilites

@Jayanth-Parthsarathy
Copy link
Contributor Author

Hey @hairyhum. Please have a look at this and let me know if any changes are to be made

@psilva-veeam
Copy link
Contributor

psilva-veeam commented Mar 15, 2024

Hi, Thanks for the PR. I realize govulncheck is still comparatively new. One feature that's not included yet is ignoring false-positives [1]. This is for instance necessary for functionality in dependencies that may be vulnerable but isn't used. (Merges may get blocked)

It would be good if in a first step govulncheck would just report and not block pipelines. One option could be to run it with continue-on-error: true. Also I wonder about nightly runs.

By the way, the Github Action https://github.com/golang/govulncheck-action is marked experimental at this point. I'm not sure if that's a serious impediment, on the other hand running the command directly on the build images might create a more realistic scan speaking about vulnerabilities that depend on the Go version in actual use. Also since it has a -json output parameter, missing functionality like ignoring findings could be added as needed.

[1] https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck#hdr-Limitations

@Jayanth-Parthsarathy
Copy link
Contributor Author

Hi, Thanks for the PR. I realize govulncheck is still comparatively new. One feature that's not included yet is ignoring false-positives [1]. This is for instance necessary for functionality in dependencies that may be vulnerable but isn't used. (Merges may get blocked)

It would be good if in a first step govulncheck would just report and not block pipelines. One option could be to run it with continue-on-error: true. Also I wonder about nightly runs.

By the way, the Github Action https://github.com/golang/govulncheck-action is marked experimental at this point. I'm not sure if that's a serious impediment, on the other hand running the command directly on the build images might create a more realistic scan speaking about vulnerabilities that depend on the Go version in actual use. Also since it has a -json output parameter, missing functionality like ignoring findings could be added as needed.

[1] https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck#hdr-Limitations

Hi @psilva-veeam. Thank you for bringing up the continue-on-error: true feature. It sounds like incorporating this option should address the issue of pipeline blocking due to govulncheck findings. Your insight is much appreciated!

I'll proceed to implement this change in the upcoming commit. Thanks again for your helpful suggestion!

@Jayanth-Parthsarathy
Copy link
Contributor Author

Hey @psilva-veeam. Do you suggest we use the govulncheck command directly instead of the github-action which is experimental, in our workflow?

@julio-lopez
Copy link
Contributor

The golang/govulncheck-action appears to be used broadly in the GH+Go ecosystem, and it is used in upstream projects such as kopia.

@psilva-veeam @hairyhum @pavannd1 any objection with adding this as part of the CI workflow?

@psilva-veeam
Copy link
Contributor

I see, my from side sounds good to use the golang/govulncheck-action then!

@julio-lopez julio-lopez merged commit 9692a68 into kanisterio:master Mar 19, 2024
12 checks passed
@julio-lopez julio-lopez added security Security related issues upstream-security labels Mar 19, 2024
@Jayanth-Parthsarathy Jayanth-Parthsarathy deleted the jayanth-parthsarathy/govulncheck branch March 20, 2024 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
security Security related issues upstream-security
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add govulncheck to CI
3 participants