Commit 15a5aae
fix(web-tools): exempt fake-IP DNS ranges from trusted/self-hosted SSRF policy
The trusted-endpoint helper used by Tavily / Brave / Exa / hosted Firecrawl
search providers passes a policy of `{}` to fetchWithSsrFGuard. On fake-IP
proxy setups (sing-box / Clash / Surge), every public domain resolves to the
198.18.0.0/15 RFC 2544 benchmark range or fc00::/7 IPv6 ULA, which is
unconditionally blocked unless the policy opts in.
Apply the same opt-in that #74571 added to the public `tools.web.fetch`
config to the hardcoded trusted/self-hosted web-tool policies:
WEB_TOOLS_TRUSTED_NETWORK_SSRF_POLICY:
+ allowRfc2544BenchmarkRange: true
+ allowIpv6UniqueLocalRange: true
WEB_TOOLS_SELF_HOSTED_NETWORK_SSRF_POLICY:
+ allowIpv6UniqueLocalRange: true (companion to the existing
allowRfc2544BenchmarkRange entry)
Real-world impact: `api.tavily.com` (and every other trusted-endpoint
provider) currently fails with "Blocked: resolves to private/internal/
special-use IP address" on every fake-IP proxy user, even when they have
`tools.web.fetch.ssrfPolicy.allowRfc2544BenchmarkRange: true` configured.
The trusted endpoint path doesn't read user config; it uses the hardcoded
policy above.
Refs #74351 (the original fake-IP IPv6 ULA report). The user-facing
`tools.web.fetch` path was fixed in #74571; this commit covers the parallel
trusted-endpoint path that #74571 didn't touch.
Open question for maintainers (not blocking this fix): the same fake-IP
exemption is currently impossible to configure for `browser.ssrfPolicy` and
`models.providers.*.request` — both schemas reject `allowRfc2544BenchmarkRange`
and `allowIpv6UniqueLocalRange`. Should those schemas be extended to mirror
`tools.web.fetch.ssrfPolicy`, or is the deliberate design that browser
navigation and provider HTTP must rely on `dangerouslyAllowPrivateNetwork`
plus DNS-level fake-IP exemptions outside OpenClaw? Happy to follow up
separately if the schema extension is desired.1 parent 882ddc4 commit 15a5aae
1 file changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
11 | 24 | | |
12 | 25 | | |
13 | 26 | | |
| 27 | + | |
14 | 28 | | |
15 | 29 | | |
16 | 30 | | |
| |||
0 commit comments