René's URL Explorer Experiment


Title: lab-ops-hub: container validator still allows bare 0x hosts (example.0x, 0x) that the Worker validator refuses · Issue #504 · developing-today/code · GitHub

Open Graph Title: lab-ops-hub: container validator still allows bare 0x hosts (example.0x, 0x) that the Worker validator refuses · Issue #504 · developing-today/code

X Title: lab-ops-hub: container validator still allows bare 0x hosts (example.0x, 0x) that the Worker validator refuses · Issue #504 · developing-today/code

Description: Summary PR #503 (fixes #502, merge eaf371c9, commit 6ff8f354) made the lab-ops-hub container crawler's validate_crawl_url refuse hosts whose final label is numeric, mirroring the Worker's WHATWG ends-in-a-number rule — but the refusal pa...

Open Graph Description: Summary PR #503 (fixes #502, merge eaf371c9, commit 6ff8f354) made the lab-ops-hub container crawler's validate_crawl_url refuse hosts whose final label is numeric, mirroring the Worker's WHATWG en...

X Description: Summary PR #503 (fixes #502, merge eaf371c9, commit 6ff8f354) made the lab-ops-hub container crawler's validate_crawl_url refuse hosts whose final label is numeric, mirroring the Worker's W...

Opengraph URL: https://github.com/developing-today/code/issues/504

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"lab-ops-hub: container validator still allows bare 0x hosts (example.0x, 0x) that the Worker validator refuses","articleBody":"## Summary\n\nPR #503 (fixes #502, merge `eaf371c9`, commit `6ff8f354`) made the lab-ops-hub container crawler's `validate_crawl_url` refuse hosts whose final label is numeric, mirroring the Worker's WHATWG ends-in-a-number rule — but the refusal pattern requires at least one hex digit after a `0x` prefix, so a **bare** `0x`/`0X` final label still falls through to \"a public DNS name\" in the container validator while the Worker validator refuses every spelling:\n\n| Input | TS Worker (`validateCrawlUrl`, `src/lib.ts:129`) | Python container (`validate_crawl_url`, `container/app.py`) |\n| --- | --- | --- |\n| `http://example.0x/` | BLOCK (\"url is not a valid URL\") | **ALLOW** |\n| `http://example.0X/` | BLOCK | **ALLOW** |\n| `http://example.0x./` | BLOCK | **ALLOW** |\n| `http://0x/` | BLOCK (WHATWG normalises to `0.0.0.0`, non-public IPv4) | **ALLOW** |\n| `http://0X/` | BLOCK | **ALLOW** |\n\n## Evidence\n\n- Current main `eaf371c9`: `pkgs/lab-ops-hub/container/app.py:65-66` —\n  ```python\n  last_label = host.rsplit(\".\", 1)[-1]\n  if re.fullmatch(r\"0[xX][0-9a-fA-F]+|[0-9]+\", last_label):\n  ```\n  The `+` means `0x` with no following hex digit never matches, and a single-label `0x` host takes the same fall-through (`_inet_aton_ipv4(\"0x\")` returns `None` — `socket.inet_aton(\"0x\")` raises \"illegal IP address string\", verified directly).\n- WHATWG's IPv4-number parser returns `0` for a bare `0x` prefix (the digit sequence after the prefix is empty), so the host ends in a number: `new URL(\"http://example.0x/\")` throws, and `new URL(\"http://0x/\")` normalises the host to `0.0.0.0`.\n- Both real validators were driven over the same inputs on current main this run (TS via `node --experimental-strip-types` importing `src/lib.ts`, Python by importing `container/app.py`): the five rows above diverge; the PR's claimed ~600-input differential parity evidently did not generate the empty-hex-digit case.\n- Controls verified identical on both sides (must not change): `example.0x7f` BLOCK/BLOCK, `example.08` BLOCK/BLOCK, `dead.beef` ALLOW/ALLOW, `example.0xg` ALLOW/ALLOW, `example.0x7fg` ALLOW/ALLOW (a non-hex trailing character makes the label not an IPv4 number in WHATWG either, so it stays a DNS name).\n\n## Why it matters\n\nThe container validator is the defence-in-depth re-check on the component that actually fetches (#441), and #502's premise — where the two validators disagree, the effective policy is the weaker one — is exactly this class. A host spelling the URL grammar reserves for an IP literal (`0x` = `0.0.0.0`, the non-public \"this host\" network as a single label) is reclassified as a public DNS name and handed to the fetcher's resolver instead of being refused up front with the validator's clean error. This is the residual of the change PR #503 landed to close #502, not a new policy question.\n\n## Acceptance criteria\n\n- `validate_crawl_url` refuses a host whose final label is a bare `0x`/`0X` (no hex digits) when the host does not parse as an IPv4 address — including the single-label forms `0x`/`0X` and the trailing-dot spelling `example.0x.`.\n- Non-numeric-final-label names stay allowed on both sides: `dead.beef`, `a1.beef`, `123.example.com`, and the non-hex-trailing controls `example.0xg` / `example.0x7fg`.\n- Regression tests in `pkgs/lab-ops-hub/test/test_container_validate.py` cover the bare-`0x` spellings (initial URL; redirect targets inherit via the same function), and `npm test` in `pkgs/lab-ops-hub` (TS + Python suites) stays green.\n- A TS/Python differential probe that includes the bare-`0x` cases shows no verdict divergence for this class.\n\nSingle-repo: lab-ops-hub exists only in developing-today/code (no `validate_crawl_url`/`validateCrawlUrl` copy in the opencode/openchamber/nix clones).\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-21T20:45:02Z","url":"https://github.com/developing-today/code/issues/504"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:62314bc4-f027-4aa2-4d21-e535e342b588
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBDA2:3373A3:787E41:9B51E4:6B0628A2
html-safe-nonce476ee1c23d224f34cd6a626231ca005a6f7478910775b8b1ced98f4d6a2db030
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCREEyOjMzNzNBMzo3ODdFNDE6OUI1MUU0OjZCMDYyOEEyIiwidmlzaXRvcl9pZCI6Ijg0MDM1Mjg3ODI2MDYzNzkxNzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac2f8ac538c42541843bbbe65e6594e21791e88b1f85979083e56d7e6540d8b0fe
hovercard-subject-tagissue:5968236636
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/504/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f5d33968f180abf516186b9a375755322b8da1f7d5829a28a4b979291572b7b0/developing-today/code/issues/504
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f5d33968f180abf516186b9a375755322b8da1f7d5829a28a4b979291572b7b0/developing-today/code/issues/504
og:image:altSummary PR #503 (fixes #502, merge eaf371c9, commit 6ff8f354) made the lab-ops-hub container crawler's validate_crawl_url refuse hosts whose final label is numeric, mirroring the Worker's WHATWG en...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedezren39
hostnamegithub.com
expected-hostnamegithub.com
None9e10bb0ecc0bd0f8692aa89586ee9b54e498d7ab9f244a44cdb5b93653a125ce
turbo-cache-controlno-preview
go-importgithub.com/developing-today/code git https://github.com/developing-today/code.git
octolytics-dimension-user_id26439447
octolytics-dimension-user_logindeveloping-today
octolytics-dimension-repository_id627308783
octolytics-dimension-repository_nwodeveloping-today/code
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id627308783
octolytics-dimension-repository_network_root_nwodeveloping-today/code
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release32e57d5cc2ce6ce92ec6dceb65858344750c27c2
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/developing-today/code/issues/504#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F504
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F504
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=developing-today%2Fcode
Reloadhttps://github.com/developing-today/code/issues/504
Reloadhttps://github.com/developing-today/code/issues/504
Reloadhttps://github.com/developing-today/code/issues/504
developing-todayhttps://github.com/developing-today
codehttps://github.com/developing-today/code
Codehttps://github.com/developing-today/code
Issues1.1k (1.1k)https://github.com/developing-today/code/issues
Pull requests148 (148)https://github.com/developing-today/code/pulls
Discussionshttps://github.com/developing-today/code/discussions
Actionshttps://github.com/developing-today/code/actions
Projectshttps://github.com/developing-today/code/projects
Wikihttps://github.com/developing-today/code/wiki
Security and qualityhttps://github.com/developing-today/code/security
Insightshttps://github.com/developing-today/code/insights
https://github.com/developing-today/code
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/504
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/504
#509https://github.com/developing-today/code/pull/509
lab-ops-hub: container validator still allows bare 0x hosts (example.0x, 0x) that the Worker validator refuseshttps://github.com/developing-today/code/issues/504#top
#509https://github.com/developing-today/code/pull/509
https://github.com/dezren39
https://github.com/dezren39
dezren39https://github.com/dezren39
on Oct 21, 2026https://github.com/developing-today/code/issues/504#issue-5968236636
#503https://github.com/developing-today/code/pull/503
#502https://github.com/developing-today/code/issues/502
#441https://github.com/developing-today/code/issues/441
#502https://github.com/developing-today/code/issues/502
#503https://github.com/developing-today/code/pull/503
#502https://github.com/developing-today/code/issues/502
github-actionshttps://github.com/apps/github-actions
dezren39https://github.com/dezren39
on Oct 21, 2026https://github.com/developing-today/code/issues/504#event-33887496436
dezren39https://github.com/dezren39
completedhttps://github.com/developing-today/code/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#509https://github.com/developing-today/code/pull/509
on Oct 21, 2026https://github.com/developing-today/code/issues/504#event-33893263382
Sign up for freehttps://github.com/signup?return_to=https://github.com/developing-today/code/issues/504
Sign in to commenthttps://github.com/login?return_to=https://github.com/developing-today/code/issues/504
dezren39https://github.com/dezren39
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.