Skip to content

ci: add govulncheck job #2452

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

Closed
wants to merge 1 commit into from
Closed

Conversation

kolyshkin
Copy link
Contributor

@kolyshkin kolyshkin commented Jun 12, 2025

The main idea here is to find any possible vulnerabilities in dependencies that would require upgrades. This is better than just blindly updating dependencies to their latest versions.

Note that this setup ignores Go stdlib vulnerabilities by using latest Go version (which is a default for govulncheck-action), as this is a library and we should not care much about specific Go version used.

Summary by Sourcery

CI:

  • Introduce a govulncheck GitHub Action step running on Ubuntu 24.04 using golang/govulncheck-action@v1 to detect dependency vulnerabilities.

The main idea here is to find any possible vulnerabilities in
dependencies that would require upgrades.

Note that this setup ignores Go stdlib vulnerabilities by using latest
Go version (which is a default for govulncheck-action), as this is a
library and we should not care much about specific Go version used.

Signed-off-by: Kir Kolyshkin <[email protected]>
Copy link

sourcery-ai bot commented Jun 12, 2025

Reviewer's Guide

Introduce a new GitHub Actions job that runs govulncheck to automatically detect vulnerabilities in Go dependencies.

Sequence Diagram: Execution Flow of the New govulncheck Job

sequenceDiagram
    participant GA as GitHub Actions
    participant GCJob as "govulncheck Job"
    participant GAction as "golang/govulncheck-action@v1"

    GA->>+GCJob: Trigger job execution
    GCJob->>+GAction: Execute action
    GAction-->>-GCJob: Return results/status
    GCJob-->>-GA: Report job completion
Loading

File-Level Changes

Change Details Files
Add govulncheck CI job
  • Define a new 'govulncheck' job in the CI workflow
  • Set the job's runner to ubuntu-24.04
  • Add a step using golang/govulncheck-action@v1
.github/workflows/validate.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @kolyshkin - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

openshift-ci bot commented Jun 12, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kolyshkin, sourcery-ai[bot]

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kolyshkin kolyshkin marked this pull request as draft June 12, 2025 19:41
@kolyshkin
Copy link
Contributor Author

OK this needs more work, draft for now.

@kolyshkin
Copy link
Contributor Author

Ideally though, renovate should update dependencies only when govulncheck says so.

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

Why would we not update every dependency? Realistically we need to update anyway and just because it doesn't contain a vulnerability yet doesn't mean it it does not tomorrow. Of course this problem goes both ways...
And there still can be plenty of regular bug fixes we would like to consume.

But really having an action that fails on a PR all of the sudden because some dep needs an update seem wrong? That blocks other people from working on this repo until we update the dep.

Renovate already has security data as well and open updates right away when it finds one (or at least it should, I haven't check the config in a while)

If this is setup to run some nightly interval to report the issues to us sure but I think we already have plenty of tools reporting new security issues so I am not sure what we would gain from this tool.

@kolyshkin kolyshkin closed this Jul 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants