Skip to content

Conversation

@kolyshkin
Copy link
Contributor

Make sure our dependencies and actions stay up to date.

PS I am not entirely sure that keeping all our go.mod dependencies
at their latest released versions is quite the right approach. Maybe
@thaJeztah have something to say about it.

@kolyshkin kolyshkin requested a review from Copilot April 28, 2025 22:17
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a Dependabot configuration file to help keep our dependencies and GitHub Actions up to date. Key changes include the introduction of daily update schedules for Go module dependencies and GitHub Actions workflows.

@thaJeztah
Copy link
Member

Yeah, I'm tempted to say limiting it to updating github actions could make sense; it's good to keep the actions up-to-date, but for go.mod dependencies, I'd still consider sticking to Go's MVS (minimum version selection); if there's no reason to update the dependency, then we should specify the minimum required version for this module to do its thing (and consumers can pick whatever SemVer compatible version that's higher).

For Go versions, we could use the stable and oldstable keywords if we want to reduce maintenance; might be good to setup a scheduled job so that CI runs periodically, even if there were no changes, so test against oldest supported, oldstable, and stable ?

go-version: [1.23.x, 1.24.x]

I guess ideally we'd have CodeQL check for vulnerabilities in the modules we use, and it could update those dependencies, but it's likely to have false-positives (so setting up a govulncheck check would probably be better.

@tianon
Copy link
Member

tianon commented May 1, 2025

For Go versions, we could use the stable and oldstable keywords if we want to reduce maintenance; might be good to setup a scheduled job so that CI runs periodically, even if there were no changes, so test against oldest supported, oldstable, and stable ?

To that end, you might enjoy opencontainers/image-spec@00584ff 👀

@thaJeztah
Copy link
Member

To that end, you might enjoy opencontainers/image-spec@00584ff 👀

Thanks! The go.mod could work; my consideration was that it's nowadays "easy" to accidentally update the go version in go.mod (updating a dependency may push it up), so I was considering that pinning the oldest version explicitly in the github actions workflow would make updating the minimum version a more explicit action.

@kolyshkin
Copy link
Contributor Author

I've updated the PR to exclude go.mod updates, and added a govulncheck run
for every PR, the push on main branch, and once a week (with the rest of the checks).

@kolyshkin
Copy link
Contributor Author

govulncheck-action is a tad rusty; filed golang/go#73616 and opened a CL to fix: https://go-review.googlesource.com/c/govulncheck-action/+/670318

@kolyshkin
Copy link
Contributor Author

@thaJeztah PTAL

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Comment on lines +11 to +12
# Runs at 00:00 UTC every Monday
- cron: '0 0 * * 1'
Copy link
Member

Choose a reason for hiding this comment

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

These always drive me nuts; I once wrote a nice comment to document the fields (as it's very easy to get them wrong);
https://github.com/docker/cli/blob/8b8f558b8350d80530d39cae51d4d425d381a1ef/.github/workflows/codeql.yml#L23-L33

  schedule:
    #        ┌───────────── minute (0 - 59)
    #        │ ┌───────────── hour (0 - 23)
    #        │ │ ┌───────────── day of the month (1 - 31)
    #        │ │ │ ┌───────────── month (1 - 12)
    #        │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday)
    #        │ │ │ │ │
    #        │ │ │ │ │
    #        │ │ │ │ │
    #        * * * * *
    - cron: '0 9 * * 4'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This used to be in crontab(5) man page, but cron is now gone from the distros in favor of systemd.timer so there's no documentation anymore).

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I'm pretty sure I originally copied it from somewhere; could've been from the man-page for sure!

Make sure our github actions stay up to date.

Since this is a package (set of packages), we do not to bump
dependencies to the latest versions automatically, but only
when it is really required, thus sticking to Go's minimum version
selection rules (essentially so that users of these packages
are not required to unnecessarily update their dependencies).

Signed-off-by: Kir Kolyshkin <[email protected]>
This is to ensure our minimal dependencies do not have known
vulnerabilities.

NOTE we do not specify Go version to be used here to avoid reporting
vulnerabilities in stdlib which we're not interested in here.

Signed-off-by: Kir Kolyshkin <[email protected]>
This is to ensure our CI is not rotting away when there are no new PRs
or merges.

Signed-off-by: Kir Kolyshkin <[email protected]>
@kolyshkin
Copy link
Contributor Author

Hmm, I dunno what to do about the new govulncheck warning, as the vulnerability is Windows-specific and this package is Linux-specific, so we're definitely not vulnerable.

The only way I see is to use latest go version so that standard library vulnerabilities will be excluded.

@kolyshkin
Copy link
Contributor Author

kolyshkin commented Jun 12, 2025

Hmm, I dunno what to do about the new govulncheck warning, as the vulnerability is Windows-specific and this package is Linux-specific, so we're definitely not vulnerable.

The only way I see is to use latest go version so that standard library vulnerabilities will be excluded.

Hmm, this is actually the default way of using govulncheck-action. Let's just use it, as we're only interested in vulnerabilities in dependencies.

@thaJeztah
Copy link
Member

@AkihiroSuda ptal

@AkihiroSuda AkihiroSuda merged commit fc3510e into opencontainers:main Jun 12, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants