MCPcopy Index your code
hub / github.com/openai/plugins / _validate_remote

Function _validate_remote

plugins/codex-security/scripts/finalize_scan_contract.py:448–455  ·  view source on GitHub ↗
(remote: str, context: str)

Source from the content-addressed store, hash-verified

446
447
448def _validate_remote(remote: str, context: str) -> None:
449 parsed = urlsplit(remote)
450 if not parsed.scheme or not parsed.netloc:
451 raise ContractError(f"{context}: expected a sanitized canonical absolute URL")
452 if parsed.username or parsed.password or parsed.query or parsed.fragment:
453 raise ContractError(
454 f"{context}: remote URL must not contain credentials, query, or fragment"
455 )
456
457
458def _validate_date_time(value: str, context: str) -> None:

Callers 1

_validate_targetFunction · 0.85

Calls 1

ContractErrorClass · 0.85

Tested by

no test coverage detected