Repository navigation
refactor(think): share the private-host policy with agents/webfetch - #2521
Merged
Merged
Conversation
|
ben-reitz
added this pull request to stack #2523
October 8, 2026 10:12
Contributor
|
✅ agents import sizes: no significant changes ( |
agents
@cloudflare/ai-chat
@cloudflare/codemode
hono-agents
@cloudflare/shell
@cloudflare/think
@cloudflare/voice
@cloudflare/worker-bundler
commit: |
ben-reitz
force-pushed
the
web-fetch/think
branch
from
October 8, 2026 11:52
d1a5c09 to
795403b
Compare
ben-reitz
removed this pull request from stack #2523
October 8, 2026 11:55
ben-reitz
added this pull request to stack #2528
October 8, 2026 11:55
This was referenced Oct 8, 2026
ben-reitz
force-pushed
the
web-fetch/think
branch
from
October 8, 2026 12:14
795403b to
feb67cb
Compare
ben-reitz
force-pushed
the
web-fetch/think
branch
from
October 8, 2026 12:28
feb67cb to
19c1320
Compare
ben-reitz
force-pushed
the
web-fetch/think
branch
from
October 8, 2026 12:43
19c1320 to
df5e5ee
Compare
ben-reitz
force-pushed
the
web-fetch/think
branch
from
October 8, 2026 12:47
df5e5ee to
f282ba7
Compare
ben-reitz
force-pushed
the
web-fetch/think
branch
from
October 8, 2026 13:17
f282ba7 to
01f68d7
Compare
ben-reitz
force-pushed
the
web-fetch/think
branch
from
October 8, 2026 13:24
01f68d7 to
2111e2b
Compare
ben-reitz
marked this pull request as ready for review
October 8, 2026 13:28
ben-reitz
force-pushed
the
web-fetch/think
branch
from
October 8, 2026 13:31
2111e2b to
abb1668
Compare
ben-reitz
force-pushed
the
web-fetch/think
branch
from
October 8, 2026 13:33
abb1668 to
e803bf1
Compare
fetch_url and its redirect check now use isPrivateOrLocalHost from agents/webfetch instead of a local isBlockedHost list, so the SDK has one SSRF table. Raises the agents peer floor to >=0.28.0, the first release with agents/webfetch.
ben-reitz
force-pushed
the
web-fetch/think
branch
from
October 8, 2026 14:05
e803bf1 to
31c7348
Compare
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.
Summary
One SSRF list instead of two. Think's
fetch_urldrops its ownisBlockedHost/isBlockedIpv4/isBlockedIpv6and uses the policy from #2526, at the request and at every redirect hop. No new tool for Think in this stack.fetch_urlkeeps every block it had and gains192.0.0/24,198.18/15, multicast,240/4,::/96, NAT64, 6to4,fec0::/10,ff00::/8(none routable from Workers). Because Think now imports fromagents/webfetch, theagentspeer floor rises>=0.25.0→>=0.28.0, the first release with that entry point (same move as 6c8f85a for websearch).Evidence
agentsblocked.localand 6to4, Think rejected all-digit hosts).After:
packages/think/src/tests/fetch-tools.test.ts→ 51 passed with no test changes: every blocked-host case (localhost,127.0.0.1,10.x,169.254.169.254,[::1],[::ffff:…], redirect to a private host) still blocks. typecheck → 132 projects.Merge Danger
Door: two-way
Blast Radius: small
Peer-dep floor bump: users on
agents0.25–0.27 get a peer warning when they upgrade@cloudflare/think.fetch_urlblocks a few more reserved ranges than before.