feat: registry URL scheme/host CI gate + http allowlist (F-11-01)#95
Merged
Conversation
Adds scripts/validate-urls.py as a BLOCKING check in validate-registry.yml: every url / url_template / *_url / wikipedia value across registry/**/*.json must be https, unless the host is in scripts/http-exception-allowlist.txt; javascript:/data:/file:/blob:/vbscript: are always rejected. Closes the gap where a poisoned-but-well-formed URL passed the structural-only schema check and auto-propagated to production KV. Policy (owner decision): both http and https supported, https preferred, http allowed only via the curated allowlist. Seeded with 3 verified http-only hosts (veriscommunity.net, www.pentest-standard.org, www.planalto.gov.br). Removes the dead http://www.vapidlabs.com/misc/policy.html entry (hard 404, already _broken-annotated) from registry/disclosure/com/me.json. Verified GREEN against all 2028 registry files; 6 offline rejection-path unit tests (scripts/test_validate_urls.py). Schema additionalProperties tightening (F-11-03) deferred to a follow-up (needs a field-enumeration sweep). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Finding
F-11-01 — the registry is the URL trust root for every resolver, but the only automated content gate (
validate-registry-schema.py) is structural; a poisoned-but-well-formedurl(javascript:, attacker host, …) passed it and auto-propagated to production KV.Fix
New blocking CI step
scripts/validate-urls.py(wired intovalidate-registry.yml): everyurl/url_template/*_url/wikipediavalue must be https, unless the host is inscripts/http-exception-allowlist.txt;javascript:/data:/file:/blob:/vbscript:are always rejected. Templated values are checked on their literal scheme+host prefix (a{placeholder}can't supply/move the host).Policy (owner decision): both http and https supported, https preferred, http only via the curated allowlist (a new http URL fails CI until upgraded or explicitly allowlisted).
Seeded the allowlist with the 3 verified http-only hosts:
veriscommunity.net(https cert mismatch),www.pentest-standard.org(https protocol error),www.planalto.gov.br(live gov site, blocks non-browser UAs). Removed the deadhttp://www.vapidlabs.com/misc/policy.html(hard 404, already_broken-annotated) fromregistry/disclosure/com/me.json.Verification
validate-urls.pyruns GREEN against all 2028 registry files with the allowlist + dead-link removal.validate-registry-schema.pystill green (schema unchanged).scripts/test_validate_urls.py) cover the rejection paths the all-clean registry never exercises (dangerous schemes, non-allowlisted http, placeholder-scheme, template prefix).Deferred
Schema
additionalProperties:falsetightening (F-11-03) → follow-up; needs a field-enumeration sweep across all entries to avoid rejecting valid data. Pairs with the publish-gate (F-12-04) PR next.🤖 Generated with Claude Code