Bound SemVer input length - #24100
Merged
Merged
Conversation
MikeMcQuaid
approved these changes
Sep 26, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Sep 26, 2026
andrew
force-pushed
the
semver-input-limit
branch
from
September 26, 2026 13:42
4dffb1a to
bbc5b26
Compare
|
Sent from [Proton Mail](https://proton.me/mail/home) for Android.
…-------- Original Message --------
On Saturday, 09/26/26 at 15:09 github-merge-queue[bot] ***@***.***> wrote:
[#24100](#24100) was automatically removed from the merge queue due to a conflict with the base branch.
—
Reply to this email directly, [view it on GitHub](#24100?email_source=notifications&email_token=CMNT6ZOJURY27FF4HKAUT6D5Q65ZTA5CNFSNUABQM5UWIORPF5TWS5BNNB2WEL2JONZXKZKFOZSW45CON52GSZTJMNQXI2LPNYXTGMJYHEZDAOJUGU4DJJTSMVQXG33OVJZXKYTTMNZGSYTFMSSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#event-31892094584), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/CMNT6ZO67JTS2L3IYV2Q6T35Q65ZTAVCNFSNUABEKJSXA33TNF2G64TZHM2TGMRTHA4DCMZ3JFZXG5LFHM2TKOJUGAZTENBYGSQXMAQ).
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
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.
Vulns::Semverparses version strings from remote advisory data without a size limit. Large strings reach regex matching, integer conversion and prerelease splitting.Reject inputs over 256 bytes before normalisation or parsing. Oversized versions return
nil, as invalid versions already do, so the advisory matcher retains the OSV match without reporting a local fix. Cover the limit boundary, oversized numeric components, build metadata and whitespace, plus advisory matching.From the repository root, run:
./bin/brew ruby -- -e 'require "vulns/semver"; p Homebrew::Vulns::Semver.compare("1.0.0-" + "a" * 5000, "1.0.0")'This prints
-1before the change andnilafter it. The limit also applies torelease_version.brew benchmarkresults.brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?OpenAI Codex (GPT-6) assisted with the implementation and tests.