Raise the go directive floor to 1.25 - #40
Merged
Merged
Conversation
The 1.18 floor had become the thing blocking dependency maintenance.
Every current release of x/net, x/text and gomega declares a directive
above it, so the pins were frozen at versions carrying 16 known
vulnerabilities between them -- 15 in x/net v0.35.0 and 1 in x/text
v0.22.0. All three are now current and OSV reports none.
govulncheck stayed green throughout, because it does reachability
analysis and none of those were reachable from this package. Scanners
that work from presence rather than reachability disagreed, and
consumers run those.
1.25 is the lowest floor that admits all three, so it is the one that
costs consumers least.
Two things fell out rather than needing separate work:
- copyloopvar and intrange were already enabled in .golangci.yml but
disabled at runtime by golangci-lint itself for being above the
project's directive. They now run, and report nothing.
- gomega v1.42.1 moved from the archived gopkg.in/yaml.v3 to the
maintained go.yaml.in/yaml/v3, which is exactly the removal
condition the .modrotignore entry recorded. That file is now empty.
The Dependabot holds documented the same blockage and go with it.
Both documents New parses originate with the platform and the brokers bound to an app, never with the app itself, so this package is the boundary that has to survive whatever arrives. The property is that New returns an app or an error for any input and never panics, and that the accessors stay total on anything that decoded. Seeded with the shapes already known to be awkward: nested credentials, volume mounts, a null limits object, and empty strings. `make test` runs the seed corpus, since Go fuzz targets are also ordinary tests; `make fuzz` searches. 9.7 million executions found nothing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #38. Partially addresses #39 (the
FuzzingandVulnerabilitieschecks).Breaking change. The minimum Go version becomes 1.25, up from 1.18.
Consumers on an older toolchain stay on v1.22.0.
Why now
The 1.18 floor had stopped being a compatibility promise and become the thing
blocking maintenance. Every current release of the three dependencies declares
a directive above it:
golang.org/x/netgolang.org/x/textgithub.com/onsi/gomegaThe frozen pins carried 16 known vulnerabilities between them — 15 in
x/netv0.35.0 and 1 inx/textv0.22.0, per OSV. All three modules nowreport 0.
govulncheckwas green the whole time and still is: it does reachabilityanalysis, and none of those were reachable from this package. Scanners that
report on presence rather than reachability disagreed, and consumers run those.
OpenSSF Scorecard is one — its
Vulnerabilitiescheck scored 0 with"13 existing vulnerabilities detected".
1.25 is the lowest floor admitting all three upgrades, so it is the one that
costs consumers least.
Three things resolved themselves
.modrotignoreis now empty. gomega v1.42.1 depends on the maintainedgo.yaml.in/yaml/v3rather than the archivedgopkg.in/yaml.v3. Theexemption recorded "Revisit if gomega ever drops the dependency" as its
removal condition — met, so the entry is gone and the archived-dependency
gate now runs with no exemptions at all.
copyloopvarandintrangeneeded no config change. Both were alreadyin the
enable:list; golangci-lint was disabling them at runtime with"this linter is disabled because the Go version (1.18) of your project is
lower than Go 1.22". They now run, and report nothing.
blockage. The replacement comment notes the remaining real hazard: a
dependency raising its own directive above the floor is still a breaking
change for consumers, so check the
goline in any proposed bump.Fuzzing (#39)
FuzzNewcovers theVCAP_APPLICATIONandVCAP_SERVICESparsingNewperforms. Both documents originate with the platform and with bound brokers,
never with the app, so this package is the boundary that has to survive
whatever arrives.
The property:
Newreturns an app or an error for any input and never panics,and the accessors stay total on anything that decoded. Seeded with the shapes
already known to be awkward — nested credentials, volume mounts, a null
limits, empty strings. 9.7 million executions found nothing.make testruns the seed corpus, since Go fuzz targets are also ordinarytests.
make fuzzsearches;FUZZTIMEraises the budget.Verification
make checkclean — including both newly-active lintersmake test-racepasses, coverage 93.6%make govulncheckclean,make goseccleanmake modrotclean, with an empty ignore listAlso carries the
changelog.dsweep for the fragment v1.22.0 consumed.