Title: lab-ops-hub crawl validators disagree on special IPv6 ranges — Python allows multicast/reserved, TS allows 2001::/23 specials · Issue #474 · developing-today/code · GitHub
Open Graph Title: lab-ops-hub crawl validators disagree on special IPv6 ranges — Python allows multicast/reserved, TS allows 2001::/23 specials · Issue #474 · developing-today/code
X Title: lab-ops-hub crawl validators disagree on special IPv6 ranges — Python allows multicast/reserved, TS allows 2001::/23 specials · Issue #474 · developing-today/code
Description: Problem The two lab-ops-hub crawl validators claim to apply the same policy independently (src/lib.ts: "The Python container crawler applies the same policy independently"; container/app.py: "Only public http(s) targets"), but they disag...
Open Graph Description: Problem The two lab-ops-hub crawl validators claim to apply the same policy independently (src/lib.ts: "The Python container crawler applies the same policy independently"; container/app.py: "Only ...
X Description: Problem The two lab-ops-hub crawl validators claim to apply the same policy independently (src/lib.ts: "The Python container crawler applies the same policy independently"; container/app....
Opengraph URL: https://github.com/developing-today/code/issues/474
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"lab-ops-hub crawl validators disagree on special IPv6 ranges — Python allows multicast/reserved, TS allows 2001::/23 specials","articleBody":"## Problem\n\nThe two lab-ops-hub crawl validators claim to apply the **same policy** independently (`src/lib.ts`: \"The Python container crawler applies the same policy independently\"; `container/app.py`: \"Only public http(s) targets\"), but they disagree on special-use IPv6 literals **in both directions**. Verified this run on main `4b8f252d` by calling both validators directly on the same URLs:\n\n### Python container validator ALLOWS, TS Worker validator blocks\nPython relies on `ipaddress.IPv6Address.is_global`, which is `True` for any address outside its narrow private list — including multicast and reserved space:\n\n| URL | Python (`container/app.py` `validate_crawl_url`) | TS (`src/lib.ts` `validateCrawlUrl`) |\n|---|---|---|\n| `http://[ff00::1]/` (multicast ff00::/8) | ALLOW | BLOCK |\n| `http://[4000::1]/` (reserved, outside global unicast 2000::/3) | ALLOW | BLOCK |\n| `http://[fec0::1]/` (site-local fec0::/10, deprecated) | ALLOW | BLOCK |\n| `http://[5f00::1]/` (SRv6 SIDs 5f00::/16, IANA Global=False) | ALLOW | BLOCK |\n| `http://[100:1::1]/` (outside the 100::/64 discard prefix, not global unicast) | ALLOW | BLOCK |\n\nThe Python service is **the component that actually fetches**, so these non-public targets are reachable through the container path even though the Worker would refuse them as direct targets and as redirect targets.\n\n### TS Worker validator ALLOWS, Python blocks\n`ipv6IsGlobal` in `src/lib.ts` treats everything in 2000::/3 as global except a short blocklist that omits the IANA special-purpose block **2001::/23**:\n\n| URL | TS | Python |\n|---|---|---|\n| `http://[2001::1]/` (Teredo 2001::/32) | ALLOW | BLOCK |\n| `http://[2001:2::1]/` (benchmarking 2001:2::/48) | ALLOW | BLOCK |\n| `http://[2001:10::1]/` (ORCHID 2001:10::/28) | ALLOW | BLOCK |\n| `http://[2001:40::1]/`, `http://[2001:50::1]/` (2001::/23 specials) | ALLOW | BLOCK |\n\nPython's verdict follows the IANA special registry encoded in `ipaddress`: 2001::/23 is non-global **except** 2001:1::1/128, 2001:1::2/128, 2001:3::/32, 2001:4:112::/48, 2001:20::/28 and 2001:30::/28 — those exceptions must keep passing in both validators (e.g. `http://[2001:20::1]/` and `http://[2001:3::1]/` are ALLOW in both today).\n\n## Why it matters\n\nThe two validators are defence-in-depth for the same SSRF policy (#441, #460–#472). A policy that depends on which component happens to fetch is not defence in depth: the container path currently accepts multicast/reserved/site-local literals outright, and the Worker path accepts the 2001::/23 special ranges its own redirect validation is supposed to refuse.\n\n## Acceptance criteria\n\n- Both validators refuse: `ff00::1`, `4000::1`, `fec0::1`, `5f00::1`, `100:1::1`, `2001::1`, `2001:2::1`, `2001:10::1`, `2001:40::1`, `2001:50::1`.\n- Both validators still accept the global exceptions inside 2001::/23 (2001:1::1, 2001:1::2, 2001:3::1, 2001:4:112::1, 2001:20::1, 2001:30::1) and ordinary global unicast (e.g. `2606:4700:4700::1111`, `2001:4860:4860::8888`).\n- The same test vectors appear in both suites (`test/lib.test.ts` and `test/test_container_validate.py`) with identical verdicts, in the style of the #472 shared-vectors test.\n- Suggested fix: in Python, don't trust `is_global` wholesale for IPv6 — require global unicast 2000::/3 (as the TS side does) on top of the existing checks; in TS, add the 2001::/23 block with the six global exceptions above.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-21T10:59:11Z","url":"https://github.com/developing-today/code/issues/474"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:15cefe7e-6cd0-4cf2-9283-fc0478a37e17 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9C00:1619FB:654A56:876AC8:6B062A73 |
| html-safe-nonce | 17b246a9995c7aec33c6d75514010fc9f1784c29956595dcb4c2ed51f8a1a3e4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QzAwOjE2MTlGQjo2NTRBNTY6ODc2QUM4OjZCMDYyQTczIiwidmlzaXRvcl9pZCI6IjMzNDU4NjAzNTIzNjkxMDk2MTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4d1ab32821043d3042190746ce5ae11cd7c85f05fe257af1e5dfeb73c3d3fe19 |
| hovercard-subject-tag | issue:5959188918 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/474/issue_layout |
| twitter:image | https://opengraph.githubassets.com/89562fb01f4851c3a6a17bcc141d3cf2e4aefd0d0928580bc5574ccbc7f448b0/developing-today/code/issues/474 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/89562fb01f4851c3a6a17bcc141d3cf2e4aefd0d0928580bc5574ccbc7f448b0/developing-today/code/issues/474 |
| og:image:alt | Problem The two lab-ops-hub crawl validators claim to apply the same policy independently (src/lib.ts: "The Python container crawler applies the same policy independently"; container/app.py: "Only ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7f961de5dd5c5d4aca24d33f8b3ffb3fb8b2ef53d0a4f32f01f0a790e512f6d3 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 494ea0bb1e0feef734a83e2628697647755e8864 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width