Repository navigation
fix(sdk): allow plain HTTP to every loopback address - #9
Merged
Merged
Conversation
127.0.0.2 and IPv4-mapped loopback were refused, so a local service on any other 127/8 address required marking the network as trusted. Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
VikramLex
added a commit
that referenced
this pull request
Oct 24, 2026
…updates SDKs: the Python and TypeScript SDKs allow plain http to every loopback address, not only 127.0.0.1, [::1] and localhost (#9, by @rudycelekli, the commit before this one). On top of it, the Python SDK reads an IPv4-mapped address such as ::ffff:127.0.0.1 by its IPv4 address, because the is_loopback of some Python releases (3.12.3, for one) is False for it. New tests cover IPv4-mapped loopback under that older is_loopback, the hosts that stay refused, and the URL parser's normal form, which the TypeScript SDK judges: 127.1 and the octal and hex forms become 127.0.0.1, and localhost. and 127.0.0.1.example.com are refused. Security: tokio 1.53.3 (RUSTSEC-2026-0386) and ctutils 0.4.4 (RUSTSEC-2026-0385) in every lock that has them. Only their version and checksum lines change, and the third-party licence pages are regenerated. The comparison suite's reference pins take pypdf 6.21.2, which fixes the pypdf advisories of the open Dependabot alerts. Docs: docs/benchmarks.md has a section of independent measurements. Its first entry is the kubernetes rerun by @selimaytac, who reported #8: graphicle context took a median of 153.5 s per question on 0.1.3 and 9.5 s on 0.1.5 on an Apple M3 Pro, and the prompt hook returned a packet for 18 of 22. The retrieval benchmark's page points to it. Every crate is at 0.1.6, with a CHANGELOG entry. Signed-off-by: VikramLex <vikramlex@karlexai.com>
Member
|
Thank you, @rudycelekli. This is merged as it is, and it ships in Graphicle 0.1.6. We added one change on top. On some Python releases, The licences check that failed on this pull request came from two new Rust advisories (tokio and ctutils). The same release fixes them. Release notes: https://github.com/Graphicle-AI/graphicle/releases/tag/v0.1.6 |
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.
Problem
Plain HTTP is allowed for loopback so the workspace capability is not sent across a network. The allow-list was only
localhost,127.0.0.1, and::1.127.0.0.2and IPv4-mapped::ffff:127.0.0.1are loopback too, but both SDKs rejected them unless the caller marked the network as trusted. The Python client also skipped proxies only for those three names, so another 127/8 address could send the capability through a proxy.http://192.0.2.1,http://[::ffff:192.0.2.1], andhttp://example.comstay rejected.Evidence
Before:
After, those five loopback origins construct successfully, the non-loopback cases above still raise, and
node --test test/client.test.jsis 8 passed. The Python assertions are intest_the_capability_is_never_sent_over_plain_http_to_another_hostand were run againstgraphicle_sdk.Clientdirectly; that file's module skip still waits onGRAPHICLE_BINin a checkout that has not built the service.Made with Cursor