OpenProgram Docs

Runtime outbound URL protection

Registry key 48 immutable consumers five trust classes exact configured origin Policy decision normalized URL and origin every A and AAAA answer exact exception, reason code Managed transport dials the approved IP keeps Host, SNI, cert name manual redirects, limits Refused: sanitized reason code, no raw retry
  1. Registry key48 immutable consumers, five trust classes, exact configured origin
  2. Policy decisionnormalized URL and origin, every A and AAAA answer, exact exception, reason code

    Refused: sanitized reason code, no raw retry

  3. Managed transportdials the approved IP, original Host, SNI and certificate name, manual redirects, bounded body

Components

ComponentDoesDoes not
openprogram/host/security/url_policy.pyURL and origin normalization; scheme, userinfo, host and port validation; full A/AAAA classification; exact owner exceptions; stable sanitized reason codesSend requests or infer a caller's trust class
openprogram/host/security/safe_http.pyImmutable consumer registry; sync and async peer-constrained transports; Host and SNI preservation; manual redirects; credential, header, MIME, decoded-body, encoding, timeout, proxy and atomic-download enforcementAccept caller-created policy objects or expose verify=False
Consumer adaptersSelect one registry key; for configured services or callbacks, supply the exact owner-configured originImplement a second private-address classifier or retry through a raw client
runtime_http_audit.py, doctor, scripts/checks/check_runtime_http.pyBounded sanitized denial state, owner exception and proxy reporting, AST inventory, SDK disposition, stale exclusion detectionDisplay userinfo, query, fragment, credentials, peer bodies or token-bearing paths

Trust classes

Class (URLTrustClass)TargetsConsumers
untrusted_publicArbitrary public URLs; every resolved address must be global4
fixed_public_serviceA service origin shipped with the product23
configured_serviceThe exact origin the owner configured, private or local allowed18
loopback_callbackA local callback1
owner_tooltool.web_fetch.owner, tool.image_result.download.owner: no address, port or method limits. Chosen only for a turn of the owner while security.outbound_url.model_tools is open, the default.2

What is and is not covered

SurfaceTreatment
Arbitrary and derived URLsweb_fetch, attachments, generated assets, image result downloads, catalogs, marketplaces, updater metadata: managed clients, public or exact-service policy
Fixed and configured APIsWeb search, image APIs, channel REST, TTS, provider listing, probes and OAuth, Web model listing, MCP HTTP and SSE, local probes: fixed or owner-configured exact origins
Third-party SDKsSee SDK dispositions
Owner control-plane liveness probesNarrow loopback-only exclusions, inventoried; not Runtime URL fetches
Outside this designBrowser navigation, popups, Service Workers and page subresources (browser-control design and any owner egress isolation). Sandboxed code, plugins, external provider CLIs, package managers (sandbox, plugin trust, child-process and installation boundaries).

The feature matrix scores this as partial for that reason.

Transport and policy rules

AreaRule
Public requestsOnly registry-declared methods, schemes and ports. All resolved addresses must be global. Rejected: metadata, loopback, private, link-local, CGNAT, multicast, reserved, unspecified, documentation and test, mapped, ambiguous, malformed. DNS failure closes.
DiallingSync and async httpcore backends dial only the approved IP tuple, verify the actual socket peer, and keep the normalized hostname for Host, SNI and certificate validation
Connection poolsIdentity includes consumer, trust class, normalized origin, approved IPs, proxy identity
RedirectsManual, each hop a new decision. Cross-origin configured-service redirects fail; public credentials are stripped.
PrivacyURL userinfo is rejected. Logs and public errors keep no query, fragment, token path, cookie or peer-controlled body; errors are origin-only.
BoundsHeaders, MIME, content encoding, decoded bytes, connect, read, write, pool and overall timeouts, temporary files
DownloadsReplace the destination only after full validation, flush, fsync and cleanup-safe completion

SDK dispositions

DispositionConsumersEnforcement
Injected transportprovider.openai.sdk, provider.anthropic.sdk, provider.google.sdk, mcp.configured.http, mcp.configured.sseThe SDK receives a scoped managed client or factory
Exact originTelegram, WeChat, Feishu, Matrix, Slack, Discord, fixed and configured TTS, other REST consumersOrigin frozen before credentials attach; redirects cannot move credentials
Derived URL extractionAttachment, generated-asset and image-result consumersThe SDK or response yields a URL; Runtime transfers it through a dedicated managed consumer
Disabledprovider.amazon_bedrock.sdk, channel.slack.gateway_sdk, channel.discord.gateway_sdk, tts.edge_sdkFails with UNMANAGED_TRANSPORT before importing or using the SDK. Bedrock covers the stream and model-list entries, before any boto3 credential or client activity.

Owner exceptions and policy proxy

Owner exception
A registered consumer plus exactly one normalized origin or canonical private or local CIDR. Rejects wildcards, suffixes, credentials, unknown fields, public and default-route networks, metadata, link-local ranges, and forms the consumer does not allow. Changed only through owner-authenticated settings.
Policy proxy
Usable only with owner configuration enforces_target_policy: true. Runtime evaluates the target first, constrains the proxy peer separately, reports delegation through doctor and audit, and never retries direct.
Static checks and inventory exclusions

scripts/checks/check_runtime_http.py fails on an unregistered raw call, an active unmanaged SDK transport, a registry entry without a classified consumer, or a stale exclusion. doctor labels: runtime-http-registry, runtime-http-owner-exceptions, runtime-http-policy-proxy, runtime-http-recent-denials, runtime-http-unmanaged-transport.

ExclusionOwner and narrow reason
security/safe_http.pyManaged transport; the only direct httpcore pool and proxy construction
programs/applications/browser/app_endpoint.pyBrowser control; loopback probe of the App's CDP endpoint
cli/commands/capabilities/mcp.pyOwner control plane; authenticated backend opener only
cli/ink.py, cli/commands/maintenance/doctor.py, cli/commands/maintenance/rescue.pyOwner control plane; exact loopback worker liveness socket only
machines/peer.py, computer_use/providers/paired.py, security/remote_access.pyOwner control plane; pairing with, probing and forwarding computer_use calls to an OpenProgram the owner linked, on the addresses its link names, with its device credential, no proxy or redirects; a UDP socket that only reads the LAN address
interfaces/server/web_push.pyOwner control plane; one encrypted notice per POST to a browser push service on an allow-listed https host (Apple, Google, Mozilla, Microsoft), no proxy or redirects

Publication requires policy and address tests, real sync and async socket and TLS peer tests, DNS-rebinding prevention, redirect and credential-origin tests, response, decompression and timeout cleanup, all consumers migrated, zero active unmanaged transports, owner-only exact exceptions, doctor, audit and static enforcement, and the consumer compatibility contract.

Design choices

ChoiceMechanismReason
AdoptedOne pure URL and IP policy; all DNS answers must pass; every redirect reevaluated; origin-only errors; bounded decoded bodiesCovers target, redirect, credential and resource boundaries consistently
AdoptedDistinct trust classesOwner-configured local services stay usable without giving public consumers private-network access
AdoptedPermission and network layering (Claude Code, CodeBuddy), structured deny reasons (Codex), fixed channel-media allowlists (CodeBuddy)Permission answers who may request; transport policy answers which peer gets the connection and credentials
ModifiedHermes's process-wide allow_private_urls becomes an exact consumer plus origin or CIDRMetadata and link-local targets stay non-exceptable
ModifiedOpenClaw browser interception and Codex's whole-process proxyBrowser controls are a separate gate; a policy proxy is optional, owner-declared, peer constrained, visible in doctor, with no direct fallback
RejectedURL-string-only checks, one DNS preflight, implicit redirects, inherited environment proxies, disabling TLS verification, raw fallbackEach leaves a target, rebinding, credential or bypass path
RejectedUser confirmation or hostname allow and deny as target enforcementNeither validates every resolved address nor constrains the peer
RejectedPublic-only for every clientBreaks configured local model endpoints, MCP servers, intranet services
RejectedCounting Origin and Host checks, CORS, owner authentication, browser checks or sandbox networking as this protectionThose guard other directions or execution boundaries
How other projects compare

From fixed audited snapshots; what a snapshot does not confirm is described as unconfirmed, not absent.

ProjectURL-fetch evidenceNetwork or permission boundaryTaken
HermesShared url_safety for web, browser, vision, gateway media. DNS failure closed; loopback, RFC1918, link-local, CGNAT, metadata, reserved, multicast, unspecified rejected; hop-by-hop redirects; sanitized URLs; streamed limits.allow_private_urls relaxes several entries together; application checks do not replace OS isolation.Shared fail-closed validation, full address set, redirect checks, sanitization, limits. Global switch made exact.
OpenClawPrivate, internal and special-use targets denied by default, exact or wildcard exceptions, checks before navigation, interaction-generated loads and final URLs. Documents speculative navigation and subresource risk.Request interception is not a network firewall: redirects, popups, Service Workers and background resources can still need egress isolation or a policy proxy.Strict defaults, explicit exceptions. Browser interception is a separate boundary.
Claude CodeWebFetch(domain:...) allow and deny. The hostname goes to Anthropic's safety blocklist first, cached five minutes; the owner may disable it.Bash sandbox uses a Seatbelt or bubblewrap HTTP and SOCKS proxy inherited by children. It trusts the client hostname and does not inspect TLS, so broad domains and fronting stay risks.Layered tool authorization, child-process egress policy. Hostname permission rejected as connect-time evidence.
CodexDoes not substitute one WebFetch string check for a network boundary.codex-network-proxy: HTTP and SOCKS5, exact or restricted wildcard domains, private-resolution rejection, limited read-only methods, MITM header hooks, Unix-socket control, structured audit; OS sandbox limits loopback bypass.Structured deny reasons, audit, managed-policy concepts. Consumer-aware safe clients kept.
CodeBuddy 2.109.3WebFetch applies Security Center domain policy, rejects IP literals, localhost and some private ranges. WeCom media: official CDN allowlist, no redirects.Sandbox allowedDomains intersects WebFetch permission. Full A/AAAA validation, peer binding and hop-by-hop redirects unconfirmed.Fixed channel allowlists, intersection of permission and network policy. Literal-IP-only protection rejected.
Gemini CLIDocuments that web_fetch can reach localhost and private networks; Plan Mode can require confirmation. Core 0.35.3 has IP and DNS utilities, not a general boundary.Confirmation is a permission decision; it does not constrain the peer.Explicit risk documentation. Confirmation rejected as enforcement.
OpenCodewebfetch permissions on the full URL: allow, ask, deny. Documentation does not establish private-IP classification, full DNS results, hop-by-hop redirects or peer binding.shell uses the host user's network; string rules are best effort.Uniform resource permissions. A permitted URL still passes transport policy.
pi-monoNo built-in arbitrary-URL fetch confirmed; network comes from shell, installers, extensions.No OS egress policy confirmed. Third-party pi-sandbox not counted.Not an SSRF reference. Supports keeping third-party code outside this protection.
pi-aiProtocol reference source, no Runtime URL consumer.Not applicable.Excluded.
weclawMessaging bridge to external agents; no independent URL fetch confirmed.Inherits the launched CLI's tools and network.Channel media and process launch are its relevant boundaries; not a safe-HTTP reference.
cc-internal, cx-internal, gm-internalWrap upstream launchers or reuse Gemini CLI; no independent strengthening confirmed.Inherit upstream behaviour; added authentication or endpoints create no SSRF boundary.Only their extra endpoints, credential forwarding and configuration audited; not counted as independent designs.
OWASPSeparates known-service allowlisting from arbitrary-public validation, restricts protocols, validates every A/AAAA result.One DNS preflight still has pinning and time-of-check risk; network controls recommended too.Separate trust classes, connect-time peer constraints. Single preflight rejected.

Implementation status

Runtime-owned HTTP is implemented. Separate boundaries still to do:

BoundaryNeeded before claiming it
Browser navigation and page trafficPolicy and tests for navigation, popups, Service Workers, background resources, redirects, downloads, CDP and profiles across every backend; an enforcing egress boundary where interception is not enough
Plugin and arbitrary-code networkingTrust and sandbox stay separate; an OS or policy-proxy egress boundary if these need restricted network
Disabled SDK network featuresEnable only after the SDK takes managed transport injection, or an enforcing policy proxy has equivalent tests

Execution authority and sandbox · Network proxy · Feature matrix

Last updated · 2026-11-25