Repository navigation
Description
Problem
Lines cited at dcafadf.
Every outbound HTTP guard checks a host name or a URL string. httpx2 then resolves the name again when it opens the socket, so the checked address is never the dialled one. This issue started as web_fetch only. It now covers every client and every redirect, in two PRs under this one issue:
- PR A builds the connect-time check and moves the broker, the shared pool, web_fetch and the hand-rolled copies onto it.
- PR B moves the remaining clients and deletes the old resolve paths.
Measured offline (stub resolver, no sockets):
-
DNS rebinding through web_fetch. The measurement replaced two functions:
socket.getaddrinfoanswered a public address for the first k lookups ofexample.comand 169.254.169.254 after that;httpcore2.SyncBackend.connect_tcpwas replaced by a recorder.
The first hop made three checking lookups:
egress_policyatsrc/devops_cli/ai/common_tools.py:372, then the tool's policy and the broker'svalidate_service_urlin the request hook (src/devops_cli/http/broker.py:59-64). Each redirect hop makes two, the hook's policy and the broker's check.For k = 0 to 2 the fetch was refused. At k = 3 every check passed, and the recorder was handed the hostname
example.com, not an address. The realSyncBackend.connect_tcppasses that name tosocket.create_connection(httpcore2/_backends/sync.py:204in the locked 2.13.0), which resolves it a fourth time; with the stub, that lookup answers 169.254.169.254. The fourth lookup is read from the code, because the recorder replaced it. This issue's earlier version measured the same window with an RFC 1918 answer. -
Spellings.
validate_url(u, allow_private=True)(src/devops_cli/core/validation.py:264-316) refuses the literalhttp://169.254.169.254/, because its metadata check (:305-310) compares the host text only. It lets these through:http://2852039166/,http://0xa9fea9fe/andhttp://0xa9.0xfe.0xa9.0xfe/: glibc'sgetaddrinfoturns all three into 169.254.169.254 without a DNS query (getaddrinfo(h, 80, flags=socket.AI_NUMERICHOST)returned 169.254.169.254 for each, offline);http://169。254。169。254/:httpx2.URLreads its host as169.254.169.254.
Without
allow_private,validate_url_egressand_enforce_non_private_ssrfresolve these spellings and refuse them (validation.py:220-226,:251-261). The hole is on the allow-private path, which the broker hook takes whenever private networks are allowed. -
A name whose answer is 169.254.169.254 passes
validate_urlwithallow_private=True, because its metadata check runs withresolve_dns=False(validation.py:306). -
validate_url_egress(..., allow_private=True)skips every address check (validation.py:208), so it lets throughhttp://169.254.169.254/andhttp://[fd00:ec2::254]/.
Resolve-then-check copies. Each has its own lookup and its own host canonicaliser:
- core/validation.py:
_resolve_host_ips(:120-149) does a lookup in a thread pool;- it is used by
validate_url_egress(:179-227) and_enforce_non_private_ssrf(:230-261); :250holds a default-port table.
- telemetry/waterfall.py:111-162:
_is_unsafe_iptestsstr(ip).startswith("169.254.")(:114);:130strips brackets withstrip("[]");:139holds a default-port table;:142callsgetaddrinfoitself.
- sandbox/probe.py:48-74, with
strip("[]")at:57:probe_tcpchecks every answer but dials only the first (:100-106);- the HTTP probe resolves again at
:173, and httpx2 resolves once more at:197.
- valkey/client.py:91-133 is a fourth copy, in front of raw sockets. fix(valkey): one validated URL names every Valkey endpoint, valkey-py dials an address that one check vetted, and the unused cache layer goes #1113 replaces that client with Valkey GLIDE (
valkey-glide-sync), whose Rust core opens its own sockets, and runs its egress check through this item's resolve-and-check function.
Other defects on the same paths:
-
The async hook blocks the event loop.
_async_validate_request(broker.py:87-89) runs the sync check. Its lookup can wait up toDEFAULT_DNS_TIMEOUT_SECONDS, which is 15 s (src/devops_cli/config/defaults.py:306). -
Jaeger gets the wrong TLS name and Host.
waterfall.py:187-191builds[ip]:portwith f-strings and setsHosttoparsed.netloc.- httpcore2 takes
server_hostnamefrom the URL's host, here the IP literal. CPython sends no SNI for an IP literal and checks the certificate against the IP, so an https Jaeger whose certificate names its hostname fails verification. - Any userinfo in the configured URL goes out in the Host header.
- httpcore2 takes
-
Tool downloads follow redirects unchecked.
src/devops_cli/commands/install_tools.py:84,:100and:190buildhttpx2.Client(follow_redirects=True)with no per-hop check._downloadchecks only the first URL: astartswith("https://")test (:97), thenvalidate_service_url(:99), which the environment flag can widen to private addresses.:84and:190check nothing.- httpx2's
_redirect_url(httpx2/_client.py:497-522) has no scheme check, so https-to-http redirects are followed.
-
Four parsers of one flag disagree.
DEVOPS_CLI_AI_ALLOW_PRIVATE_NETWORKis read in four ways:in ("true", "1")atbroker.py:31-35;in {"1", "true", "yes", "on"}atvalidation.py:297-302;- the same four words as a tuple at
src/devops_cli/ai/client/unified.py:344-352, after theallow_private_networkconfig field; - the settings' general bool coercion at
src/devops_cli/config/settings.py:1145-1146.
So
=yesis honoured by validation and ignored by the broker. The broker's reading is also frozen at import, becauseDEFAULT_HTTP_BROKERis built at module load (broker.py:186). -
A per-request override cannot reach the connection.
requestandarequesttakeallow_private_networkand pass it as a request extension (broker.py:104-154).- Vault uses it at
src/devops_cli/security/vault_broker.py:113,:158and:179, and atsrc/devops_cli/security/vault_lease.py:56. - A pooled connection opened for a permissive request can be reused by a strict one.
-
Fallbacks outside any check. In
src/devops_cli/ai/client/base.py::64-65: if buildinghttpx2.HTTPTransport(limits=..., http2=True)fails, the retry transport wraps httpx2's default transport instead;:73-74catches any exception from that and returns a plainhttpx2.Client;:96-97does the same for the shared client, returning it without the retry transport.
-
Clients built outside any guard. The Python files under
srchold 54httpx2.Client(/httpx2.AsyncClient(matches (rg -n -g '*.py' 'httpx2\.(Async)?Client\(' src):- three in
http/pool.py, one of them in its module docstring (:5); - two in
http/client.py; - 49 elsewhere.
Two more are in a knowledge-base document (
src/devops_cli/ai/knowledge_base/devops_cli/libraries/httpx2.md:38and:56) and are not code.broker.pybuilds two more clients through itshttpxalias. Seven module-level calls skip clients altogether:src/devops_cli/ai/providers/anthropic.py:77,ai/providers/ollama.py:37and:65,ai/providers/openai.py:62,ai/spend/pricing.py:463and:472, andk8s/logql.py:365. - three in
-
One service, several rules. The rule depends on the code path, not the service:
- Prometheus is reached at any address, metadata included, by the pool-load query (
src/devops_cli/ai/pool_load.py:45), butdevops prometheusneeds the flag for a private address (src/devops_cli/commands/prometheus.py:49); - the pydantic-ai Ollama model allows private addresses without the flag (
src/devops_cli/ai/models/ollama.py:130,:150), while the provider and embedding paths to the same URL need it (ai/providers/ollama.py:36,ai/rag/embeddings.py:520).
The level key question below lists every caller with its rule today.
- Prometheus is reached at any address, metadata included, by the pool-load query (
-
No test reaches the connect.
stub_web(tests/conftest.py:189-222) gives every client aMockTransport.test_web_fetch_tool_blocks_dns_rebinding(tests/test_common_tools.py:176-181) answers the same private address to every lookup. The first check refuses it, so the answer never changes between check and connect.- The session guard passes a non-loopback lookup through only when
ipaddressparses the host (tests/conftest.py:76-82, used at:127), so2852039166fails withgaierrorin tests instead of resolving as glibc resolves it.
Acceptance criteria
Deliverable
- One vetting network backend on httpcore2's public network-backend API (
httpcore2.NetworkBackendandAsyncNetworkBackend). httpcore2 2.13.0 is already locked as httpx2's transport. Itsconnect_tcp:- resolves once:
socket.getaddrinfoin the sync backend, andanyio.getaddrinfoin the async one (anyio 4.15.1, already locked), which runs the lookup off the event loop; - raises
SSRFBlockedErrorif any answer is unsafe under the client's level. It classifies answers with fix(security): egress guards refuse cloud metadata in every numeric, NAT64 and provider form, classified by ipaddress and one maintained library #897's predicates (stdlibipaddressplus the metadata classifier fix(security): egress guards refuse cloud metadata in every numeric, NAT64 and provider form, classified by ipaddress and one maintained library #897 settles); - dials each vetted address in turn through the inner
httpcore2.SyncBackendorAnyIOBackend, assocket.create_connectiondoes. The inner backend only ever receives an IP literal.
- resolves once:
- TLS stays on the hostname. httpcore2 builds
server_hostnamefrom the origin host (httpcore2/_sync/connection.py:136in the locked 2.13.0), so SNI and certificate checks still use the name. - One factory, built on the existing
new_http_clientandnew_async_http_client(src/devops_cli/http/client.py:55-75).- It owns verify, cert, http2, limits and retry wrapping, because httpx2 ignores those options on a client given
transport=. - Sync: it builds an
httpx2.HTTPTransportand replaces its_poolwithhttpcore2.ConnectionPool(..., ssl_context=httpx2.create_ssl_context(...), network_backend=<sync vetting backend>). - Async: it builds an
httpx2.AsyncHTTPTransportand replaces its_poolwithhttpcore2.AsyncConnectionPool(..., network_backend=<async vetting backend>). httpx2 builds these two pools athttpx2/_transports/default.py:152and:295. See the_poolkey question. - The retry transport wraps that transport through its existing
wrapped=argument (src/devops_cli/ai/retries/__init__.py:96-100).
- It owns verify, cert, http2, limits and retry wrapping, because httpx2 ignores those options on a client given
- Three policy levels, chosen per client: public-only, loopback-allowed and private-allowed.
- A caller whose URL comes from the user's configuration is built at loopback-allowed, or at private-allowed when
ai.allow_private_networkis set. The table below calls this "configured". - Cloud metadata addresses, as fix(security): egress guards refuse cloud metadata in every numeric, NAT64 and provider form, classified by ipaddress and one maintained library #897's classifier lists them, are refused at every level.
- Other link-local addresses follow the link-local key question (owner decision).
- Each caller gets the level in the table under the level key question.
- A caller whose URL comes from the user's configuration is built at loopback-allowed, or at private-allowed when
- PR A delivers:
- the policy module, with one public resolve-and-check function that both backends,
stub_weband the pre-flight callers share; both backends; and the factory; - the session guard's literal test (
tests/conftest.py:76-82, used at:127), described under "Old vs new". fix(valkey): one validated URL names every Valkey endpoint, valkey-py dials an address that one check vetted, and the unused cache layer goes #1113's tests rely on it too; - the broker: one client per level, the flag read lazily from
Settings.ai.allow_private_network, and the per-request extension deleted. Vault takes the private-allowed client.telemetry/memory_profiler.py:263moves to the private-allowed client; http/pool.py:get_shared_clientandget_shared_async_clienttake a level, which becomes part of the pool key. Their callers (ai/client/base.py:95-97,k8s/service_http.py:53-55and:64) pass theirs. The module docstring's example (:5) shows the factory, nothttpx2.Client(;- web_fetch on the public-only client. Its hop hook keeps only the scheme and domain-list checks; the address check moves to the backend;
stub_web, waterfall, probe and install_tools;- removal of the three ad-hoc flag parsers.
- the policy module, with one public resolve-and-check function that both backends,
- Not in scope: the
import httpxfallbacks athttp/broker.py:9-12andtelemetry/memory_profiler.py:247-250. fix(deps): pyproject.toml declares every package src imports, and a deptry step in devops ci keeps it that way #1120 deletes them, whichever of the two items lands first. Until it does, PR A leaves those lines alone, and both files keep calling httpx2 through thehttpxalias. - PR B delivers:
- the remaining raw clients moved to the factory at the table's levels;
- pre-flight address checks removed, except those listed under the pre-flight key question;
- the old resolve paths deleted.
Kept from this issue's earlier version (criteria 1 to 8, adapted to this design)
- Rebinding (criterion 1). A test drives
web_fetch_tool().execute(url="https://example.com/")withoutstub_web.- It is parametrised over k = 0 to 4, and over the second answer: 169.254.169.254, 127.0.0.1, and an RFC 1918 address.
- A stub resolver answers 93.184.215.14 (the
public_dnsfixture's public address) for the first k lookups ofexample.com, and the second answer after that. - The inner backend is a recorder that returns an
httpcore2.MockStream. - For every k, no connection attempt goes to the second answer, and the inner backend receives 93.184.215.14 or nothing, never a hostname.
- The test fails on the current code at k = 3.
- Redirect to a second hostname (criterion 2). A redirect from
https://example.com/starttohttps://example.org/is pinned the same way. A second hostname is the point of the row;example.orgis used because AGENTS.md:36 rules out subdomains ofexample.com. Its connection never goes to the second answer, for any k. - One hostname per connection (criterion 3).
example.comredirects toexample.org, and both answer 93.184.215.14. The backend is still asked for a second connection, and itsstart_tlsreceivesserver_hostname="example.org". - The environment does not widen web_fetch (criterion 4). With
DEVOPS_CLI_AI_ALLOW_PRIVATE_NETWORK=trueandai.allow_private_network: true, the three criteria above still hold. web_fetch uses the public-only client whatever the environment says, as_validate_fetch_hoppromises (common_tools.py:345-348). - Mixed and failed answers (criterion 5).
- An answer holding 93.184.215.14 and an RFC 1918 address together is refused, with no connection attempt.
- A resolver error surfaces as
httpx2.ConnectError: the backend re-raises theOSErrorashttpcore2.ConnectError. - An IP-literal host is classified without a DNS query.
[fe80::1%25eth0]fails closed.- If the first vetted address refuses the connection, the next one is tried, and the last error is raised.
- TLS (criterion 6). For an https URL:
start_tlsreceivesserver_hostname="example.com";- the SSL context has
check_hostname=Trueandverify_mode=CERT_REQUIRED; - the request's Host header is
example.com; response.urlishttps://example.com/.
- Refusals (criterion 7).
- A refusal raises
SSRFBlockedError. That is not an httpx2TransportError, so the tenacity retry transport (src/devops_cli/ai/retries/__init__.py:51) attempts the request only once. - With fix(ai): web_fetch reports a failed fetch as a tool failure, not as page text #894 in place, the refusal reaches the runner's
errorresult (src/devops_cli/ai/agents/runner.py:167-174). A test asserts this for k = 3. - A refusal never comes back as page content.
- A refusal raises
- Classification (criterion 8). The backend classifies with fix(security): egress guards refuse cloud metadata in every numeric, NAT64 and provider form, classified by ipaddress and one maintained library #897's predicates, the same ones every other check uses. An answer of
64:ff9b::a9fe:a9feis refused before any connect, at every level. - Criteria 9 and 10 are dropped. They kept every other client on httpx2's default transport and banned httpcore2 imports from src, and this design moves every client onto an httpcore2 network backend that src imports directly.
New criteria
- Old vs new at the connect. These run with
httpcore2.MockBackendas the inner backend and a stubbed resolver.- The stub resolves numeric spellings as glibc does. The session guard's literal test (
tests/conftest.py:76-82, used at:127) becomes "the originalgetaddrinfo(host, None, flags=socket.AI_NUMERICHOST)succeeds".AI_NUMERICHOSTnever queries DNS, so2852039166,0xa9fea9feand0xa9.0xfe.0xa9.0xferesolve to 169.254.169.254 in tests as they do in production. - Every refusal below is
SSRFBlockedErrorraised by the backend's classification, with no connect reaching the inner backend. AConnectErrororgaierrorfails the row. - The integer, hex, dotted-hex and ideographic-dot spellings of 169.254.169.254 are allowed today by
validate_urlwithallow_private=True, and refused afterwards at every level. - A name answering 169.254.169.254 is allowed today by
validate_urlwithallow_private=True, and refused afterwards at every level. - NAT64-, 6to4- and Teredo-wrapped 169.254.169.254 under private-allowed are allowed today by
validate_urlwithallow_private=True, and refused afterwards. - Answers of 169.254.169.254,
fd00:ec2::254andfd20:ce::254under private-allowed are refused. Todayvalidate_url_egress(allow_private=True)lets them through. - Loopback, RFC 1918 and CGNAT (100.64.0.0/10) answers are allowed only at the levels that allow them.
- The stub resolves numeric spellings as glibc does. The session guard's literal test (
- Link-local host gateway (pins the link-local key question). A stub answers 169.254.1.2 for
example.com; the address is the point of the row, not the name.- Under the proposed answer it is refused at public-only and loopback-allowed and allowed at private-allowed. 169.254.169.254, 169.254.170.2 and
fd00:ec2::254stay refused at private-allowed. - Under the alternative it is refused at every level, and
docs/DEVCONTAINER_USAGE.md:252-255and:424-461are updated.
- Under the proposed answer it is refused at public-only and loopback-allowed and allowed at private-allowed. 169.254.169.254, 169.254.170.2 and
- Level table. One parametrised test builds each caller's client in the table below, with and without
ai.allow_private_network, and asserts its level. Each row marked "narrower" or "wider" has a case that fails on the current code. - Redirect to metadata. A redirect to a name that resolves to 169.254.169.254 is refused at hop 2, and no connection is left in the pool.
- Async. With a resolver stub that blocks for 0.5 s, a concurrent task keeps running during the lookup. The broker's async hook does no lookup at all.
- Isolation. The broker keeps one client per level, and the shared pool keys include the level. A connection opened by a private-allowed client is never reused by a public-only one.
- Pinned seam. A test asserts that the factory's sync transport
_poolis anhttpcore2.ConnectionPooland its async transport_poolanhttpcore2.AsyncConnectionPool, each holding the vetting backend. An httpx2 upgrade that changes either then fails the test, instead of silently dropping the check. - Proxies. A test pins the proxy decision (see the proxy key question).
- Jaeger.
query_jaeger_tracerequests the configured hostname URL through a loopback-allowed factory client. For an https Jaeger,start_tlsreceives the hostname, and no Host header carries userinfo. An RFC 1918 Jaeger is still refused, with or without the flag, astests/test_sandbox_traces.py:385-393pins today. - Tool downloads. A request hook on
request.url.schemerefuses an install_tools redirect from https to http at hop 2. The same hook replaces thestartswith("https://")test atinstall_tools.py:97, and the public-only client replacesvalidate_service_urlat:99. - Fail closed. A factory error raises.
base.py:64-65,:73-74and:96-97no longer fall back to a transport or client built outside the factory. - The flag is read once.
Settings.ai.allow_private_networkis the only source, read when a client is built, not at import. - Dependency. Once src imports httpcore2,
httpcore2==2.13.0is declared inpyproject.tomlnext tohttpx2==2.13.0. fix(deps): pyproject.toml declares every package src imports, and a deptry step in devops ci keeps it that way #1120's dependency check enforces the declaration once it lands. - Review guidance.
AGENTS.md:416,src/devops_cli/ai/review/common_hallucinations.json:511and.devops/review.md:20-23say that internal connectors "configureallow_private_network=True". They are rewritten to say which level each connector gets (private-allowed or configured, as in the table), that metadata addresses are refused at every level, and that SSRF findings still apply to public-only callers. - No construct left after PR A:
rg -n 'ALLOW_PRIVATE_NETWORK_ENV|"DEVOPS_CLI_AI_ALLOW_PRIVATE_NETWORK"' srcprints only lines undersrc/devops_cli/config/. This removesvalidation.py:18,:37and:297,broker.py:34,unified.py:27,:163and:347, and theALLOW_PRIVATE_NETWORK_ENValias atai/client/network.py:21and:34with its re-export atai/client/__init__.py:17and:39;rg -n '"allow_private_network"|allow_private_network=True' src/devops_cli/http src/devops_cli/securityprints nothing;rg -n '_resolve_safe_jaeger_target|_resolve_safe_socket_addr|_is_unsafe_ip|startswith\("https://"\)' src/devops_cli/telemetry/waterfall.py src/devops_cli/sandbox/probe.py src/devops_cli/commands/install_tools.pyprints nothing.
- No construct left after PR B:
rg -n -g '*.py' '_resolve_host_ips|_enforce_non_private_ssrf' srcprints nothing.rg -n -g '*.py' 'httpx2\.((Async)?Client|get|post|put|patch|delete|head|request|stream)\(' srclists onlysrc/devops_cli/http/client.py. Two temporary exceptions:github/client.py:178, until refactor(github): the github session owns transport, ledger, error classes and link pagination #983 lands;ai/library/docs_ingester.py:244, only if PR B lands before fix(security): URL and host:port reads use the sending client's parser, so key trust, crawls, probes and settings act on the host actually dialled #1112. Whichever of PR B and fix(security): URL and host:port reads use the sending client's parser, so key trust, crawls, probes and settings act on the host actually dialled #1112 lands second moves the docs crawler's client onto the public-only factory client. The crawler fetches untrusted links, so it must not be left with a check-then-connect gap.
- Address pre-flight checks remain only at the callers listed under the pre-flight key question.
- Markers, once feat(ci): hand-rolled URL and address parsing fails
devops ci, AGENTS.md makes the library the rule, and reviews stop discarding the findings #1107 has landed:- no
net-port-tablemarker is left in validation.py or waterfall.py; - no
net-scheme-affixmarker is left in waterfall.py or install_tools.py; - no
net-normalisemarker is left at waterfall.py:130 or probe.py:57; - the ceiling is lowered by the number of markers removed.
- probe.py:485-495 belongs to fix(security): URL and host:port reads use the sending client's parser, so key trust, crawls, probes and settings act on the host actually dialled #1112, and probe.py:515 and :527 belong to fix(k8s): service URLs bracket IPv6 hosts, k8s:// addresses reach only their Service, and https probe targets are probed over https #1111.
- no
- Tests updated:
tests/test_validation.py:162-231and:460-514;tests/test_sandbox_policy_properties.py:39-40and:269-315, where the per-site agreement collapses to one policy;tests/test_sandbox_traces.py:385-393, which moves to the backend at the loopback-allowed level;tests/test_http_broker.py:58-122(the per-request override, deleted with it),:125-200and:230-247;tests/conftest.py:189-222:stub_webcalls the shared resolve-and-check function, because aMockTransportnever reachesconnect_tcp. Two or three wiring tests use aMockBackendinner backend instead;tests/conftest.py:76-82and:127: the literal test described under "Old vs new";tests/test_pydantic_ai_ollama.py:96, which patches_resolve_host_ips;tests/test_sandbox_probe.py:115-124and:575-594;tests/test_k8s_service_proxy.py:273-289, which patchesvalidate_url_egress;tests/test_ollama_dynamic_leasing.py:90-112, which imports theALLOW_PRIVATE_NETWORK_ENValias.
- Release.
changelog.d/898.mdhas the entry under### Security. It names:- the proxy change;
- every table row marked "narrower" or "wider";
- the metadata refusal for callers that allowed any address;
- the link-local answer.
- PR B adds to the fragment, or recreates it if a release cut has already merged PR A's fragment.
CHANGELOG.mdanddocs/ROADMAP.mdare not edited.
- Offline and fast.
- Tests never touch the network. The session guard (
tests/conftest.py:125-163) still applies, and anyio's lookup goes through the patchedsocket.getaddrinfo. - web_fetch's lookups fall from 4 to 1 on the first hop and from 3 to 1 on each redirect hop.
uv run devops cipasses.
- Tests never touch the network. The session guard (
- Pending a person: (optional) start a listener on 127.0.0.1:8000, then call web_fetch 50 times on
http://7f000001.5db8d822.rbndr.us:8000/. That public rebinding name answers 127.0.0.1 or 93.184.216.34 at random. Before PR A some calls usually reach the listener; after it, none do. - Pending a person: file an upstream feature request for a
network_backend=argument onhttpx2.HTTPTransportandAsyncHTTPTransport(see the_poolkey question). - Pending a person: answer the proxy and link-local key questions before PR A is merged.
Key questions
-
Swap httpx2's private
_pool, write a project-owned transport, or keep the earlier URL-rewrite design? Proposed: swap_poolfor a publichttpcore2.ConnectionPool(..., network_backend=...)(async:httpcore2.AsyncConnectionPool), pinned by the seam test.HTTPTransport.__init__takes nonetwork_backendin 2.13.0 (httpx2/_transports/default.py:132-145). The upstream code has none, and no upstream issue asks for it.- A project-owned
BaseTransportwould re-implement httpx2's exception mapping, becausemap_httpcore_exceptionsis not exported. - The earlier URL rewrite has three drawbacks:
- it needs one inner transport per (scheme, hostname, port) to keep certificates per hostname;
- it relies on the
sni_hostnameextension; - it covers only the clients that are handed it.
- The backend sees every connection any pool opens, redirects included, and leaves pooling, SNI and HTTP/2
:authorityto httpcore2.
-
Do guarded clients honour
HTTP_PROXY/HTTPS_PROXY/ALL_PROXY? Proposed: no (owner decision).- httpx2 already ignores environment proxies for a client given
transport=(httpx2 2.13.0,httpx2/_client.py:659). - A proxy would become the vetted peer instead of the destination.
httpcore2.HTTPProxy(network_backend=)vets the proxy, not the destination, so it is not an alternative.- Cost: a workstation that reaches the internet only through a proxy loses outbound HTTP from devops-cli. The changelog says so, and a test pins the decision.
- httpx2 already ignores environment proxies for a client given
-
Which level does each client get? Proposed: each caller keeps the address classes it reaches today, minus metadata, with three exceptions:
- fixed public hosts move to public-only;
- configured services that today refuse loopback without the flag gain it, matching
validate_configured_service_url(fix(ai): client timeouts take effect, replies are read under the size limit, and remote models go where their settings say (#960) #1077,validation.py:339-353); - the pydantic-ai Ollama model joins the other Ollama paths at configured.
"Configured" means loopback-allowed, or private-allowed when
ai.allow_private_networkis set. "The flag" below covers bothai.allow_private_networkandDEVOPS_CLI_AI_ALLOW_PRIVATE_NETWORK, whichvalidate_urlalso reads today.Caller Today After web_fetch ( ai/common_tools.py:354,:372)public only; the flag is ignored public-only (same) Tool downloads ( commands/install_tools.py:84,:99-100,:190):99: public, or private with the flag;:84and:190: no checkpublic-only (narrower: the flag no longer widens) Docs crawler ( ai/library/docs_ingester.py:231,:244,:253)public, or private with the flag public-only (narrower) Fixed public APIs: GitHub ( github/client.py:178,github/graphql.py:720,github/ssh.py:151), Cloudflare (cloudflare/client.py:287), OSV, Shodan InternetDB and Cloudflare Radar (security/vulnerability_lookup.py:185,:307,:377), DuckDuckGo and Tavily (ai/common_tools.py:419,:470), the harness docs fetch (ai/harness/docs.py:88), the default pricing registry (ai/spend/pricing.py:472)no address check public-only (narrower: a non-public answer for these names is refused) devops ai cost--sourceURL (ai/spend/pricing.py:463)no address check configured (narrower: a private source needs the flag) AI client base URL ( ai/client/network.py:379,ai/providers/__init__.py:96), Ollama provider and embeddings (ai/providers/ollama.py:36,:57;ai/rag/embeddings.py:520,:539,:686,:811), Qdrant (ai/rag/qdrant.py:180, pre-flight only)configured; the metadata literal refused configured (same) pydantic-ai Ollama model ( ai/models/ollama.py:130,:150, viaai/pydantic_ai_bridge.py:166)private without the flag; names answering link-local refused ( :34-37,:70)configured (narrower: a private Ollama needs the flag on this path too) Anthropic and OpenAI providers' own checks ( ai/providers/anthropic.py:43,ai/providers/openai.py:42)public, or private with the flag configured (wider: loopback without the flag) AI gateway and backend probes ( ai/gateway.py:249,:375,:532)public only without the flag; any address, metadata included, with it configured (wider: loopback without the flag; metadata refused with it) Benchmark endpoints ( commands/benchmark.py:75,ai/benchmark/runner.py:227,ai/benchmark/embedding_runner.py:290)--serversaccepts private; the runners then refuse loopback and private without the flagconfigured, through the AI client (wider: loopback without the flag) Grafana ( commands/grafana.py:66,k8s/credentials.py:331,:449), ArgoCD (argo/fleet.py:48,argo/gitops.py:358,commands/argo.py:170,k8s/credentials.py:236,:418),devops prometheusand other Prometheus commands (commands/prometheus.py:49,argo/rollouts.py:91,commands/ai_gateway.py:547)public, or private with the flag configured (wider: loopback without the flag) Jaeger ( telemetry/waterfall.py:176-182)loopback and public; RFC 1918 and link-local refused; the flag is ignored loopback-allowed (same) Sandbox metrics scrape ( sandbox/metrics.py:410-417)loopback names and public; the flag is ignored loopback-allowed (same) Loki ( k8s/logql.py:352), Prometheus pool load (ai/pool_load.py:45), cluster-service direct URLs (k8s/service_http.py:63)any address, metadata included private-allowed (metadata refused) Kubernetes API-server proxy ( k8s/service_http.py:53-55)no address check private-allowed, with the API server's TLS context passed through the factory (metadata refused) OTLP exporter and connection probe ( telemetry/tracer.py:1169,:1202)no address check private-allowed (metadata refused) Vault ( security/vault_broker.py:113,:158,:179;security/vault_lease.py:56)private; the metadata literal refused private-allowed (same, now checked at the connect) Sandbox HTTP probe ( sandbox/probe.py:162-173,:197,:346)private; link-local and metadata refused private-allowed (wider only if the link-local answer allows host gateways) Memory profiler ( telemetry/memory_profiler.py:263)private private-allowed (ASGI transport, no socket) - AGENTS.md:416 names Prometheus, Loki, Ollama and the LiteLLM gateway as intentionally private-allowed. Loki, the pool-load query and the cluster-service URLs keep that. Ollama and the gateway already follow fix(ai): client timeouts take effect, replies are read under the size limit, and remote models go where their settings say (#960) #1077's configured rule on their main paths, and the table aligns their remaining paths with it.
- Prometheus keeps two levels, as today: private-allowed for the pool-load query, configured for the commands. Unifying them is a policy change this item does not make.
-
Are link-local host gateways refused? (owner decision)
- Measured: in a rootless Podman (pasta) devcontainer,
getent hosts host.containers.internal host.docker.internalreturns 169.254.1.2, a link-local address. docs/DEVCONTAINER_USAGE.md:252-255recommendshttp://host.docker.internal:11434for Ollama, with the flag set.:424-461recommendshost.docker.internalfor the API server (https://host.docker.internal:6443at:426).- Today, a name answering a link-local address passes
validate_urlwithallow_private=True,validate_url_egress(allow_private=True)and the k8s proxy client, which has no check. The pydantic-ai Ollama model, the sandbox probe, Jaeger and the Valkey client (src/devops_cli/valkey/client.py:122) refuse it. fix(valkey): one validated URL names every Valkey endpoint, valkey-py dials an address that one check vetted, and the unused cache layer goes #1113's Valkey check follows whichever answer is chosen. - Under Docker Desktop and Docker's
host-gatewaymapping, these names answer private, not link-local, addresses and are unaffected either way.
Proposed: public-only and loopback-allowed refuse every link-local address. Private-allowed refuses metadata addresses (fix(security): egress guards refuse cloud metadata in every numeric, NAT64 and provider form, classified by ipaddress and one maintained library #897's classifier, which lists 169.254.169.254, 169.254.170.2, 169.254.170.23,
fd00:ec2::254and the other provider addresses) and allows other link-local addresses.- This keeps the documented host-gateway setups working where they work today.
- Cost: an unlisted link-local service is reachable from private-allowed clients, whose URLs come from the user's configuration. At that level the backend uses the classifier's metadata test and the metadata names, not fix(security): egress guards refuse cloud metadata in every numeric, NAT64 and provider form, classified by ipaddress and one maintained library #897's
is_link_localclause. - Alternative: refuse every link-local address at every level, as fix(security): egress guards refuse cloud metadata in every numeric, NAT64 and provider form, classified by ipaddress and one maintained library #897's metadata predicate does. Then the documentation lines above tell rootless Podman users to reach the host at an address that is not link-local.
- The link-local criterion pins whichever answer is chosen, and the changelog names it.
- Measured: in a rootless Podman (pasta) devcontainer,
-
Is there an off-the-shelf alternative? Proposed: none fits.
- safehttpx: async GET only. It falls back to DNS-over-HTTPS at dns.google, which bypasses split-horizon DNS for private zones, and it treats 100.64.0.0/10 as public.
- advocate: last released in 2020, and it needs requests with urllib3<2.
- httpx-secure: targets httpx, not httpx2.
- Smokescreen: a proxy to run, not a library.
- pydantic-ai's
safe_download: in a private module (pydantic_ai/_ssrf.py,__all__ = ['safe_download']) and async only. - httpcore2's network-backend API is the maintained seam.
-
Which callers keep a pre-flight check? Proposed: only those whose dialler is not an httpx2 client, or that dial nothing. Each names its time-of-check gap in a docstring and calls the policy module's one public resolve-and-check function, the same one the backend and
stub_webuse:- qdrant-client opens its own connections through httpx and grpcio (it depends on httpx, not httpx2), so
src/devops_cli/ai/rag/qdrant.py:179-182stays; devops k8s applyhands a manifest URL to kubectl (src/devops_cli/commands/k8s/cluster_context.py:181-188);- the container engine endpoint (Podman or Docker): docker-py dials a
tcp://daemon through requests (src/devops_cli/docker/engine.py:239-246). fix(docker): the Docker endpoint check covers the endpoint the SDK dials, including contexts and the TUI, and pushes accept registry ports #1108 owns that check and keeps today's rule: public-only, or private-allowed with the flag; - Valkey GLIDE (fix(valkey): one validated URL names every Valkey endpoint, valkey-py dials an address that one check vetted, and the unused cache layer goes #1113) opens its sockets in its Rust core. fix(valkey): one validated URL names every Valkey endpoint, valkey-py dials an address that one check vetted, and the unused cache layer goes #1113 runs the resolve-and-check function at the private-allowed level before GLIDE dials, and hands GLIDE the vetted address as an IP literal on plaintext connections;
- the PlaywrightBrowser stub's
is_private_ip_or_localhost(common_tools.py:281-287, called atsrc/devops_cli/ai/harness/agents.py:386-388). That file's host parsing belongs to fix(security): local names come from the public suffix list, and domains match on DNS labels, not string suffixes #887; - the sandbox CIDR builders (
src/devops_cli/sandbox/models.py:114and:154-208) build firewall rules, not connections, and keep resolving; - the config wizard (
src/devops_cli/commands/config.py:269,:285,:295) checks a URL as it is typed and dials nothing; it checks at the configured level. - Ollama is not on this list: it takes a factory client (
src/devops_cli/ai/models/ollama.py:157), which removes its DNS check at:37.
- qdrant-client opens its own connections through httpx and grpcio (it depends on httpx, not httpx2), so
-
What about boolean coercion of the flag? Today
DEVOPS_CLI_AI_ALLOW_PRIVATE_NETWORK=bogussilently becomes False throughsettings.py:1141-1146. Proposed: refactor(config): a settings field is the one declaration, and the option, env and config-show registries become views of it #1000 makes it strict. This item only reads the setting. -
What about
get_pr_diff's redirect rule (src/devops_cli/github/client.py:170-186)? Proposed: not here. That rule is about the Authorization header and a host allowlist, not addresses.- An amendment to refactor(github): the github session owns transport, ledger, error classes and link pagination #983 replaces it with
follow_redirects=Trueplus a request hook that allows only the API origin (CONST_URL_GITHUB_API_BASE). - httpx2 already strips Authorization on a cross-origin redirect (
httpx2/_client.py:524-534).
- An amendment to refactor(github): the github session owns transport, ledger, error classes and link pagination #983 replaces it with
-
Does "every HTTP client" include model and embedding traffic, which refactor(ai): one model seam: llmclient over three wire adapters behind one factory, no second provider stack #1001 says it "does not move onto the broker"? Proposed: yes for the connect-time check, no for the broker. PR B gives the AI clients their client from this item's factory, so their connections are checked against the address dialled; refactor(ai): one model seam: llmclient over three wire adapters behind one factory, no second provider stack #1001's adapters take that client and stay off the broker, so refactor(ai): one model seam: llmclient over three wire adapters behind one factory, no second provider stack #1001's statement stays true. A comment on refactor(ai): one model seam: llmclient over three wire adapters behind one factory, no second provider stack #1001 records this.
-
Does PR B take this issue's v0.2.29 slot? Proposed: no. PR A keeps the slot; PR B follows under this issue wherever the roadmap tooling places it. A person confirms.
Strategic alignment
- Priority P1. It closes the rebinding window and the numeric-spelling bypasses for every client at once. It also deletes three resolve-and-check copies and three ad-hoc flag parsers, and gives each service one stated level.
- Library first. The check uses httpcore2's public network backend (already locked as httpx2's transport), stdlib
socketandipaddress, anyio's resolver, and the metadata classifier fix(security): egress guards refuse cloud metadata in every numeric, NAT64 and provider form, classified by ipaddress and one maintained library #897 settles. It adds no hand-written resolver, address set or URL builder. - Size: large, in two PRs under this issue, PR A then PR B.
- Milestone: PR A keeps this issue's v0.2.29 slot. PR B follows under this issue.
- Depends on:
- fix(security): egress guards refuse cloud metadata in every numeric, NAT64 and provider form, classified by ipaddress and one maintained library #897 (v0.2.27): the predicates and the metadata classifier. The link-local answer also decides whether fix(security): egress guards refuse cloud metadata in every numeric, NAT64 and provider form, classified by ipaddress and one maintained library #897's metadata predicate keeps its
is_link_localclause where private networks are allowed; - fix(ai): web_fetch reports a failed fetch as a tool failure, not as page text #894 (v0.2.28): the runner
errorpath in the refusals criterion; - feat(ci): hand-rolled URL and address parsing fails
devops ci, AGENTS.md makes the library the rule, and reviews stop discarding the findings #1107: the markers; enforcement lands first. - feat(ai): web_fetch renders pages as untrusted, escaped markdown within a budget #896 (v0.2.28) edits fetch_web_page's rendering; this item only rebases onto it.
- fix(security): egress guards refuse cloud metadata in every numeric, NAT64 and provider form, classified by ipaddress and one maintained library #897 (v0.2.27): the predicates and the metadata classifier. The link-local answer also decides whether fix(security): egress guards refuse cloud metadata in every numeric, NAT64 and provider form, classified by ipaddress and one maintained library #897's metadata predicate keeps its
- Shared files, in order:
- core/validation.py: fix(security): egress guards refuse cloud metadata in every numeric, NAT64 and provider form, classified by ipaddress and one maintained library #897, then this item, then fix(security): local names come from the public suffix list, and domains match on DNS labels, not string suffixes #887;
- sandbox/probe.py: this item, then fix(security): URL and host:port reads use the sending client's parser, so key trust, crawls, probes and settings act on the host actually dialled #1112, then fix(k8s): service URLs bracket IPv6 hosts, k8s:// addresses reach only their Service, and https probe targets are probed over https #1111;
- ai/library/docs_ingester.py: PR B and fix(security): URL and host:port reads use the sending client's parser, so key trust, crawls, probes and settings act on the host actually dialled #1112 in either order; the second moves the crawler onto the public-only client;
- security/vault_broker.py, security/vault_lease.py and http/broker.py: this item and feat(security): vault commands use the token
devops vault loginstores #709 (v0.2.29) in either order; whichever lands second adapts. Vault's token requests go through the private-allowed client, and feat(security): vault commands use the tokendevops vault loginstores #709's same-origin redirect refusal stays a request hook; - http/broker.py, telemetry/memory_profiler.py and tests/test_http_broker.py: this item and fix(deps): pyproject.toml declares every package src imports, and a deptry step in devops ci keeps it that way #1120 in either order. fix(deps): pyproject.toml declares every package src imports, and a deptry step in devops ci keeps it that way #1120 deletes the two
import httpxfallbacks and renames the alias's call sites in whatever this item leaves. If PR A lands first, it has already deleted the per-request override tests, which hold the localimport httpxattests/test_http_broker.py:64and:99; - use changelog.d fragments only.
- Related:
- fix(ai): web_fetch vetoes every redirect hop, reports failures as failures and renders pages as untrusted text #860: shipped the per-hop veto in v0.2.24;
- feat(security): vault commands use the token
devops vault loginstores #709 (v0.2.29): Vault gets the private-allowed client instead of the per-request flag; - refactor(ai): one model seam: llmclient over three wire adapters behind one factory, no second provider stack #1001: PR B's AI clients; coordinate with its adapters;
- refactor(github): the github session owns transport, ledger, error classes and link pagination #983: the amendment above;
- refactor(config): a settings field is the one declaration, and the option, env and config-show registries become views of it #1000: boolean coercion;
- fix(valkey): one validated URL names every Valkey endpoint, valkey-py dials an address that one check vetted, and the unused cache layer goes #1113: Valkey GLIDE's egress check calls PR A's resolve-and-check function at the private-allowed level;
- fix(docker): the Docker endpoint check covers the endpoint the SDK dials, including contexts and the TUI, and pushes accept registry ports #1108: the container engine endpoint check, which PR B keeps as a pre-flight check;
- fix(deps): pyproject.toml declares every package src imports, and a deptry step in devops ci keeps it that way #1120: deletes the
import httpxfallbacks in http/broker.py and telemetry/memory_profiler.py, and enforces the httpcore2 declaration; - fix(ai): web_fetch decodes pages by their BOM and declared charset #895: same tool, no overlap.
Update 2026-10-08: delivered scope (PR A) and corrected premises
- Scope. This issue closes with the "PR A" deliverables only. The "PR B delivers" bullets, the "No construct left after PR B" criterion, the PR B rows of the level table, the docs crawler (with fix(security): URL and host:port reads use the sending client's parser, so key trust, crawls, probes and settings act on the host actually dialled #1112) and
github/client.py(after refactor(github): the github session owns transport, ledger, error classes and link pagination #983) move to fix(security): move the remaining HTTP clients onto the egress-checked factory and delete the pre-flight resolve paths #1381. Readiness requires a PR to close exactly one issue, and the task file reads Done in the delivering commit. "PR B adds to the fragment" and the "Does PR B take this slot" key question are dropped. - Docs. The review guidance and docs name only the clients built by the
devops_cli.http.clientfactory as checked at the connect, and say the others are not checked there yet. fix(security): move the remaining HTTP clients onto the egress-checked factory and delete the pre-flight resolve paths #1381 updates them when it moves the rest. - Re-baselined "today" claims (at 910b823). Since fix(security): egress guards refuse cloud metadata in every numeric, NAT64 and provider form, classified by ipaddress and one maintained library #897,
validate_url(allow_private=True)already refuses the integer, hex, dotted-hex and ideographic spellings and the NAT64/6to4/Teredo forms, andvalidate_url_egress(allow_private=True)refuses metadata and all link-local addresses. Two gaps remained: a name answering a metadata address passedvalidate_url(allow_private=True), and every check ran before a dial that received the hostname. The "old vs new" rows assert the connect-time result. - Dependency.
httpcore2==2.13.1, not 2.13.0: httpx2 2.13.1 is locked and requires it.anyio==4.15.1is declared too, because the async backend imports it. - Link-local and proxies. The proposed answers are implemented and pinned by tests, and the owner confirms them before merge. At the private level the backend uses
is_cloud_metadata_ipand the metadata names instead of fix(security): egress guards refuse cloud metadata in every numeric, NAT64 and provider form, classified by ipaddress and one maintained library #897'sis_link_localclause, so criterion 8's "same predicates" holds with that exception. Scoped IPv6 is refused at every level. - Retries are opt-in in the factory. The tenacity transport turns 4xx and 5xx replies into errors and retries with backoff, so only the AI clients keep it.
- Criterion 7. With one lookup per hop, a rebound answer is refused at k = 0, and the runner-error test uses k = 0. At k = 3 the single lookup returns the public address, and that is the address dialled.
- Earlier narrowing. Removing
validate_url's environment-variable reader means the variable no longer widens hard-codedallow=Falsechecks (the docs crawler) orAIConfigobjects built in code. The changelog names both. - Existing factory callers. DuckDuckGo, Tavily, the harness docs fetch and the Statuspage fetch move to public-only in this PR.
- Line references drifted: common_tools
:483-515, AGENTS.md:468, the conftest guard:125-139, stub_web:203-236, andDEFAULT_DNS_TIMEOUT_SECONDSat defaults.py:312.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
feat(release): v0.2.24 (#905)
dan-petty commentedon Oct 2, 2026
Grooming (2026-10-02): Priority p2-medium → p1-high.
Checked against the code at the release/v0.2.25 tip.
dan-petty commentedon Oct 2, 2026
Placed in v0.2.29 on 2026-10-02. v0.2.29 holds P1 work that has to land before v0.3.0, which v0.2.25 to v0.2.28 had no room for. Backlog P1 items were ranked by Value, then Effort, with defects and security fixes first at a tie. This item ranked in the top ten, and two of the release's twelve slots stay open for P1 items that surface before then.
dan-petty commentedon Oct 2, 2026
Refined to Ready on 2026-10-02 for v0.2.29. The body was checked claim by claim against release/v0.2.25 at 9c879ae, and a second agent then tried to refute it; every major objection was resolved in a revision. Cited lines were updated for code that moved, and the scope was corrected where merged work changed it. Acceptance criteria were tightened so each fails on the current code, and every key question now has a proposed answer.
[-]fix(security): web_fetch connects to the address its egress check approved[/-][+]fix(security): every HTTP client dials only addresses its egress level allows, checked at the connect and on every redirect[/+]dan-petty commentedon Oct 8, 2026
Owner decisions, 2026-10-08, clearing this item's merge gate (PR #1382 implements both):
HTTP_PROXY,HTTPS_PROXYandALL_PROXY. A workstation that reaches the internet only through a proxy loses outbound HTTP from these clients, and the changelog says so.fix(security): check the address factory HTTP clients dial, at the co…
fix(security): check the address factory HTTP clients dial, at the co…
dan-petty-bot commentedon Oct 8, 2026
What changed
#1382, merged into
release/v0.2.29as 99566ea.60 file(s) changed.
How it was verified
Check runs at b76f56e:
Acceptance Criteria of
docs/agent/tasks/task-898-connect-time-egress-check.md:NetworkBackendandAsyncNetworkBackend: one lookup,SSRFBlockedErroron any unsafe answer, each vetted IP literal dialled in turn (test_each_vetted_address_is_dialled_in_turn_and_the_last_error_raised).start_tlsreceivesserver_hostname="example.com", the context hascheck_hostname=TrueandCERT_REQUIRED, Host isexample.comandresponse.urlishttps://example.com/(test_tls_and_the_host_header_keep_the_hostname).test_the_factory_swaps_httpx2s_pool_for_a_vetting_httpcore2_pool).test_each_level_admits_only_its_address_classes,test_link_local_host_gateways_are_admitted_only_at_the_private_level).web_fetchwithoutstub_web, k = 0 to 4 against 169.254.169.254, 127.0.0.1 and 10.0.0.1, with the environment flag set; the dial receives 93.184.215.14 or nothing, never a hostname (test_web_fetch_never_dials_a_rebound_answer).test_web_fetch_never_dials_a_rebound_redirect_hop), and one hostname per connection (criterion 3) withstart_tlsnamesexample.comthenexample.org(test_web_fetch_opens_one_connection_per_hostname_with_its_own_tls_name).DEVOPS_CLI_AI_ALLOW_PRIVATE_NETWORK=trueandai.allow_private_network: true.httpx2.ConnectError, a literal is classified without a DNS query,[fe80::1%25eth0]and scoped answers fail closed, and a refused address moves the dial on to the next.SSRFBlockedErroris attempted once under the retry transport and reaches the runner'serrorresult, never page text.64:ff9b::a9fe:a9feand every other metadata spelling are refused at every level before any dial.fd00:ec2::254,fd20:ce::254and 169.254.170.2 answers are refused at every level; loopback, RFC 1918, CGNAT and unique-local answers only at their levels.test_each_caller_dials_at_its_level, 14 callers); the memory profiler makes no lookup or dial (test_the_memory_profiler_exercises_its_pool_without_a_lookup_or_a_dial); the narrower tool-download row istest_download_refuses_a_private_answer_whatever_the_flag.test_a_redirect_to_a_name_answering_metadata_is_refused_at_hop_two).ConnectTimeout, and the broker's async hook makes no lookup.SSL_CERT_FILEnames a missing CA bundle (test_an_ai_client_raises_when_its_client_cannot_be_built).--timeoutand Jaeger'stimeoutbound the connect (test_the_probe_timeout_bounds_every_connect,test_the_jaeger_timeout_bounds_the_connect).ai.allow_private_networkonly (test_the_configured_level_is_read_from_the_settings_when_a_client_is_built).httpcore2==2.13.1(andanyio==4.15.1) declared.AGENTS.md,.devops/review.mdandcommon_hallucinations.json.rg -n 'ALLOW_PRIVATE_NETWORK_ENV|"DEVOPS_CLI_AI_ALLOW_PRIVATE_NETWORK"' srcprints onlyconfig/env.py;rg -n '"allow_private_network"|allow_private_network=True' src/devops_cli/http src/devops_cli/securityprints nothing;rg -n '_resolve_safe_jaeger_target|_resolve_safe_socket_addr|_is_unsafe_ip|startswith\("https://"\)'over waterfall, probe and install_tools prints nothing.changelog.d/898.mdunder### Securitynames the proxy change, the narrower and wider rows, metadata refusal for clients that reached any address, and the link-local answer;CHANGELOG.mdanddocs/ROADMAP.mdare untouched.-n0, each test this item adds or rewrites has a call phase under 1 s; the longest istest_the_async_lookup_runs_off_the_event_loopat 0.5 s, its blocking resolver stub.uv run devops cipasses._resolve_host_ipsand_enforce_non_private_ssrf, the documentation crawler andgithub/client.py: fix(security): move the remaining HTTP clients onto the egress-checked factory and delete the pre-flight resolve paths #1381.devops ci, AGENTS.md makes the library the rule, and reviews stop discarding the findings #1107) are not in this release; the conditional criterion does not apply.http://7f000001.5db8d822.rbndr.us:8000/; no call should reach the listener.network_backend=argument on httpx2'sHTTPTransportandAsyncHTTPTransport.feat(release): v0.2.29 (#1455)
fix(valkey): the Valkey client resolves a name once, vets every answe…
fix(ai): the AI service clients dial through the egress-checked facto…