Repository navigation
Conversation
This was referenced Nov 23, 2026
jess-lowe
pushed a commit
that referenced
this pull request
Nov 30, 2026
…ed event (#674) Part of #311, the "version range is valid (`fixed` != `0` && `introduced` < `fixed`)" item @hogo6002 added. RNG:004 (`range-events-ordered`) sorts the events of each SEMVER and ECOSYSTEM range with `semantic`, the same way the evaluation algorithm does, and flags a `fixed` or `last_affected` that's lower than every `introduced` in that range. Those events can't close anything, so the range usually matches nothing or more than intended. That covers `fixed: "0"` too. GIT ranges and versions `semantic` can't parse are skipped, and so is a run of several `fixed` after one `introduced`, since Alpine lists fixes that way on purpose. I ran it over the current PyPI, npm, Go, crates.io, Maven, RubyGems, Packagist, NuGet, Pub, Hex, Alpine and Debian exports (about 390k records) and it flagged 12. Most are real, like GHSA-4f84-67cv-qrv3 (introduced `1.1.5.post1`, fixed `1.1.5`) and GHSA-82jv-9wjw-pqh6 (`4.0.0-beta1` sorts after `4.0.0-beta.11`). The two openc3 RubyGems hits come from `semantic` putting `7.0.0-rc3` below `7.0.0.pre.rc1`, which RubyGems itself doesn't do. It's in ALL and offline, not fatal. This touches the same lines as #673, so whichever lands second needs a small rebase, and I used RNG:004 so the codes don't clash. Signed-off-by: Srinivas Chippagiri <cvas22@gmail.com>
Part of ossf#311. RNG:003 (range-versions-valid) flags SEMVER range events that aren't SemVer 2.0.0 versions without a leading "v", and GIT range events that aren't full-length commit hashes. "0" for introduced and "*" for limit are allowed. ECOSYSTEM ranges aren't checked. Also drops some leftover editing notes from the README. Signed-off-by: Srinivas Chippagiri <cvas22@gmail.com>
cvas22
force-pushed
the
linter-range-versions-valid
branch
from
November 30, 2026 19:08
4a27af4 to
307b7bf
Compare
This branch has not been deployed
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.
Part of #311, the "range type is correct (SEMVER is valid, GIT is valid)" item.
RNG:003 (
range-versions-valid) flags events inSEMVERranges that aren't SemVer 2.0.0 versions without a leading "v", and events inGITranges that aren't full-length commit hashes (SHA-1 or SHA-256). It looks atintroduced,fixed,last_affectedandlimit, and allows "0" for introduced and "*" for limit.ECOSYSTEMranges are left alone since their versions are free-form.It's in ALL and offline. I ran the same logic over the current Go, crates.io and OSS-Fuzz exports from osv.dev (about 17k records, 4k GIT ranges) and nothing got flagged, so it shouldn't be noisy.
Notes
I also removed a few stray lines from the linter README ("Save it.", "Then check", a
git diffblock) that look like editing notes left over from #609.