• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dunglas / go-urlpattern / 31848212451
93%
main: 92%

Build:
Build:
LAST BUILD BRANCH: fuzz-oss-fuzz-compat
DEFAULT BRANCH: main
Ran 14 Aug 2026 10:51PM UTC
Jobs 1
Files 6
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Aug 2026 10:47PM UTC coverage: 92.919% (+1.0%) from 91.899%
31848212451

push

github

web-flow
Add fuzz testing, fix panics it found (#14)

* test: add fuzz targets for constructor-string and init-based pattern parsing

Cover both entry points into the pattern compiler: New() with a
constructor string plus baseURL, and URLPatternInit.New() with
struct fields. Seeded from patterns exercised by the WPT test data.

* fix: prevent panic on syntax-only pathname/hostname pattern components

Some canonicalization callbacks (e.g. hostname, opaque-pathname) can
collapse a non-empty component like "#" down to an empty string.
generatePatternString assumed adjacent fixed-text parts always carry
a non-empty value and indexed into their rune slice unconditionally,
panicking on inputs like URLPatternInit{Protocol: "A", Hostname: "#*0"}.

Guard both indexing sites, and make canonicalizeHostname fail instead
of silently returning an empty hostname for a non-empty forbidden-host-
code-point input, matching the URL spec and the existing ':' guard.

Found by the new fuzz targets.

9 of 9 new or added lines in 2 files covered. (100.0%)

1509 of 1624 relevant lines covered (92.92%)

1562.69 hits per line

Jobs
ID Job ID Ran Files Coverage
1 31848212451.1 14 Aug 2026 10:51PM UTC 6
92.92
GitHub Action Run
Source Files on build 31848212451
  • Tree
  • List 6
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • f75ba23c on github
  • Prev Build on main (#29487397801)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc