Repository navigation
Conversation
Insei
force-pushed
the
feat/tags-complete
branch
from
October 19, 2026 09:50
96e1b78 to
efe9edf
Compare
The userinfo was checked only for whitespace, A://"@0 was valid; it is the userinfo of RFC 3986 now. A zone of an IPv6 host, [::0%00], was accepted by netip; url.Parse needs it escaped, the zones aren't allowed. Both were found by fuzzing against url.Parse.
The formats of strings are checked against the parsers of the standard library and the patterns of their JSON Schema, the reading of the fields by the offsets of fmap against the fields themselves, and any tag either configures the rules or panics with its error, the rules never panic. The inputs found by fuzzing are kept in testdata.
Contributor
Benchmark diff:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #78 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 38 38
Lines 1775 1784 +9
=========================================
+ Hits 1775 1784 +9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
On top of #79 (merged).
Fuzz targets:
rules/str:FuzzPatterns(UUID, E.164, hex color, alphanumeric, alpha, digits, numeric, hexadecimal, hostname against their regexps — the patterns of JSON Schema of the rules, so the schema describes the same strings),FuzzEncodings(base64, base64url, MAC againstencoding/base64,net.ParseMAC),FuzzChecksums(Luhn against a reference implementation, credit cards),FuzzURL(a valid URL is parsed byurl.Parsewith a scheme and a host).shared:FuzzFieldAccess—Getter,InStructand the elements of slices of pointers read by the offsets of fmap are the fields themselves, with nil nested structs, nil pointers and nil elements.internal/tags:FuzzTags— any tag on fields of 12 types either configures the rules or panics withvaligo: tag ...in Configure, and the rules validate zero and filled values without panics.Found and fixed (
fix(str)):URLaccepted invalid userinfo (A://"@0) and IPv6 zones (https://[::0%00]),url.Parserejects both. The found inputs stay intestdata/fuzzas regression tests. Local runs: 60–180 s per target, nothing else found.CI: the
fuzzjob runsscripts/fuzz.sh, every target for 30 s.