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

Stop bumping go directive unless necessitated by other dependencies #1454

Open
kaovilai opened this issue Dec 24, 2024 · 4 comments
Open

Stop bumping go directive unless necessitated by other dependencies #1454

kaovilai opened this issue Dec 24, 2024 · 4 comments

Comments

@kaovilai
Copy link

This repo by itself should not be enforcing minimum on other repositories importing it. Stop spreading "minimum virus"

toolchain version used will be defined outside of go.mod ideally, such as by installing a newer compatible go toolchain to ci/cd/development env.

Failing that, toolchain directive should be used instead of go directive for bumping versions to not cascade minimum versions to importing dependencies.

toolchain directive, in contrast to the go directive, applies only to the current module (the one defined by the go.mod file). It suggests the toolchain to be used when in that very module, and doesn't propagate to other modules.

High profile repos that have removed/reduced minimum go patch version per user requests

Being proactive to prevent following from reoccuring

@kaovilai
Copy link
Author

Nothing in this repo necessitated 1.23.1. In fact, it is shown that the lowest required by other deps is 1.23.1 as required by chainguard.dev/[email protected]

@xnox
Copy link
Contributor

xnox commented Jan 6, 2025

Often there are CVEs in the standard library and the only way to enforce remediation of them in any builds is to bump the version number.

At Chainguard, we do no support building binaries with known CVEs.

@kaovilai
Copy link
Author

kaovilai commented Jan 6, 2025

The standard libraries used to build are based on toolchain setting. go directive is the wrong way to go because it affects importing modules.

golang/go#70853 (comment)

Please see https://go.dev/doc/toolchain#:~:text=Go%20toolchain%20selection%C2%B6

go mod's go directive is the wrong way to go.

If your ci system lacks ability to specify the correct go version to use outside of go.mod file (my preference), use toolchain directive instead please.

@kaovilai
Copy link
Author

kaovilai commented Jan 6, 2025

You do not have to build binaries with known CVEs AND force importing dependencies (those outside of chainguard) to have higher minimum versions.

Everyone including the importing modules can fix standard library CVEs through go cli updates etc WITHOUT commiting change to go.mod file.

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

No branches or pull requests

2 participants