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

Kikobeats / url-http
100%
main: 100%

Build:
Build:
LAST BUILD BRANCH: master
DEFAULT BRANCH: main
Repo Added 27 Apr 2022 10:49PM UTC
Files 2
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

LAST BUILD ON BRANCH master
branch: SELECT
CHANGE BRANCH
x
  • No branch selected
  • authority-validation
  • cursor/critical-bug-management-22ac
  • cursor/critical-bug-management-9993
  • cursor/critical-bug-management-9f33
  • dependabot/github_actions/actions/checkout-5
  • dependabot/github_actions/actions/checkout-7
  • dependabot/github_actions/pnpm/action-setup-5
  • dependabot/github_actions/pnpm/action-setup-6
  • dependabot/github_actions/pnpm/action-setup-6.0.9
  • dependabot/npm_and_yarn/re2-1.22.1
  • dependabot/npm_and_yarn/re2-1.23.0
  • dependabot/npm_and_yarn/re2-1.24.0
  • dependabot/npm_and_yarn/re2-1.25.0
  • dependabot/npm_and_yarn/re2-1.26.0
  • master
  • refs/heads/master

05 Aug 2026 07:20PM UTC coverage: 100.0% (+3.2%) from 96.842%
31038955413

push

github

web-flow
fix: validate the authority instead of the whole href (#34)

`new URL()` already applies IDNA, IPv4/IPv6 validation and percent-encoding,
so the only question left is whether the host is one the public internet can
resolve. Answering that directly replaces the round-trip through
url-regex-safe, a matcher built to find URLs inside prose.

Closes the fake-IDN-TLD hole: url-regex-safe's list holds no `xn--` entries,
so #32 had to inject the host's own TLD, which is a check that passes by
construction. `https://xn--80a0aaa.xn--totallyfaketld/` was accepted and the
design could not reject it. Mapping the list to punycode once at load makes
the punycode case fall out instead of needing a special case, so the IPv6
exception, the TLD injection and the second origin-only pass all go away
along with the url-regex-safe and re2 dependencies.

Fuzz-differentialled against the previous implementation over 300k inputs.
Every divergence falls in one of four classes:

- paths ending in prose punctuation (`/a.`, `/?q=1.`, `/#x!`) are now
  accepted; url-regex-safe forbids a trailing `. ? !` because in prose it is
  sentence punctuation
- ports below 10 (`http://example.com:1/`) are now accepted
- an underscore is now allowed in any interior label, not only in a bare
  second-level one (`x.a_b.com` was rejected while `a_b.com` was accepted)
- a host whose TLD is not in the public suffix list is now rejected in
  punycode form too

Per call: 21.6us to 0.29us on ordinary hosts, 3.8us to 0.34us on punycode.


Claude-Session: https://claude.ai/code/session_01G3AcnZdy222rWCkptbywJT

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>

24 of 24 branches covered (100.0%)

Branch coverage included in aggregate %.

25 of 25 new or added lines in 1 file covered. (100.0%)

46 of 46 relevant lines covered (100.0%)

22.33 hits per line

Relevant lines Covered
Build:
Build:
46 RELEVANT LINES 46 COVERED LINES
22.33 HITS PER LINE
Source Files on authority-validation
  • Tree
  • List 2
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
31038955413 master fix: validate the authority instead of the whole href (#34) `new URL()` already applies IDNA, IPv4/IPv6 validation and percent-encoding, so the only question left is whether the host is one the public internet can resolve. Answering that directly... push 05 Aug 2026 07:21PM UTC web-flow github
100.0
31025505618 authority-validation Merge e48e57805 into 630bd5697 Pull #34 05 Aug 2026 04:29PM UTC web-flow github
100.0
31023409704 master perf: avoid rebuilding url-regex-safe patterns per call The two fixed regex shapes (exact for ordinary hosts, unanchored for IPv6 authorities) are now built once at load, and per-IDN-TLD regexes are memoized in a 256-entry FIFO cache bounded agai... push 05 Aug 2026 04:04PM UTC Kikobeats github
96.84
31021105080 master fix: reject punycode hosts with non-public ASCII TLDs (#32) Punycode matching disabled url-regex-safe's TLD list so IDN labels could accept .local/.internal/arbitrary suffixes that ASCII hosts reject. Derive the TLD list from the final hostname l... push 05 Aug 2026 03:36PM UTC web-flow github
98.41
31020878638 cursor/critical-bug-management-9f33 Merge 802d6698e into 4fa807760 Pull #32 05 Aug 2026 03:33PM UTC web-flow github
98.41
31020737822 master fix: reject invalid hosts matched via path substrings (#31) * fix: reject invalid hosts matched via path substrings When exact matching is disabled for IPv6/punycode URLs, url-regex-safe can match a URL-looking substring in the path while the au... push 05 Aug 2026 03:32PM UTC web-flow github
100.0
31020282949 cursor/critical-bug-management-22ac Merge 3f9ec9497 into 8678523fe Pull #31 05 Aug 2026 03:26PM UTC web-flow github
100.0
31020158231 master fix: reject credentialed URLs for IPv6, punycode, and text fragments (#30) * fix: reject credentialed URLs for IPv6, punycode, and text fragments url-regex-safe can match a substring after `@` when exact matching is disabled, so userinfo-bearing... push 05 Aug 2026 03:25PM UTC web-flow github
100.0
30993065623 cursor/critical-bug-management-9993 Merge ac229206c into 52faa83a0 Pull #30 05 Aug 2026 09:24AM UTC web-flow github
100.0
30993027345 cursor/critical-bug-management-22ac Merge 63a29dd52 into 52faa83a0 Pull #31 05 Aug 2026 09:23AM UTC web-flow github
100.0
See All Builds (88)
  • Repo on GitHub
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