Repository navigation
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0010f5b6fb
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| @@ -35,6 +36,7 @@ export async function fetchWithWebToolsNetworkGuard( | |||
| ...rest, | |||
| timeoutMs: resolveTimeoutMs({ timeoutMs: rest.timeoutMs, timeoutSeconds }), | |||
| proxy: "env", | |||
| policy: WEB_TOOLS_TRUSTED_NETWORK_SSRF_POLICY, | |||
There was a problem hiding this comment.
Keep strict endpoints on default SSRF policy
Setting policy: WEB_TOOLS_TRUSTED_NETWORK_SSRF_POLICY in fetchWithWebToolsNetworkGuard makes every caller use the relaxed policy, which unintentionally disables strict SSRF behavior for withStrictWebToolsEndpoint (used for citation redirect resolution). After this change, URLs resolved through the strict path can now reach private/internal/special-use targets that were previously blocked, so the strict/trusted split is lost. Apply the relaxed policy only at trusted call sites rather than in the shared guard helper.
Useful? React with 👍 / 👎.
Greptile SummaryThis PR enables
The RFC 2544 range is designated for network benchmarking and is used by Clash fake-ip mode for DNS responses. Since the policy already permits private networks via Confidence Score: 4/5
Last reviewed commit: 0010f5b |
Add allowRfc2544BenchmarkRange: true to WEB_TOOLS_TRUSTED_NETWORK_SSRF_POLICY to fix web_fetch being blocked when using Clash fake-ip mode (198.18.0.0/15). This only affects withTrustedWebToolsEndpoint, keeping strict SSRF behavior for withStrictWebToolsEndpoint (citation redirect resolution).
0010f5b to
087d122
Compare
) Landed from contributor PR #31176 by @sunkinux. Co-authored-by: sunkinux <[email protected]>
|
Landed via maintainer squash + fixup workflow. Thank you @sunkinux. What we did:
SHAs:
Thanks again for the contribution. |
) Landed from contributor PR #31176 by @sunkinux. Co-authored-by: sunkinux <[email protected]>
…@sunkinux) Landed from contributor PR openclaw#31176 by @sunkinux. Co-authored-by: sunkinux <[email protected]>
…@sunkinux) Landed from contributor PR openclaw#31176 by @sunkinux. Co-authored-by: sunkinux <[email protected]>
…@sunkinux) Landed from contributor PR openclaw#31176 by @sunkinux. Co-authored-by: sunkinux <[email protected]>
|
web_fetch is still down.. |
…@sunkinux) Landed from contributor PR openclaw#31176 by @sunkinux. Co-authored-by: sunkinux <[email protected]>
…@sunkinux) Landed from contributor PR openclaw#31176 by @sunkinux. Co-authored-by: sunkinux <[email protected]>
…@sunkinux) Landed from contributor PR openclaw#31176 by @sunkinux. Co-authored-by: sunkinux <[email protected]>
…@sunkinux) Landed from contributor PR openclaw#31176 by @sunkinux. Co-authored-by: sunkinux <[email protected]>
…@sunkinux) Landed from contributor PR openclaw#31176 by @sunkinux. Co-authored-by: sunkinux <[email protected]>
…@sunkinux) Landed from contributor PR openclaw#31176 by @sunkinux. Co-authored-by: sunkinux <[email protected]>
This fixes
web_fetchbeing blocked when using Clash fake-ip mode, which returns addresses in the 198.18.0.0/15 range.Problem
When using Clash with fake-ip mode, DNS queries return addresses in the 198.18.0.0/15 range (RFC 2544 benchmark range). OpenClaw's SSRF guard was blocking these addresses as "private/internal/special-use IP", causing
web_fetchto fail.Solution
allowRfc2544BenchmarkRange: truetoWEB_TOOLS_TRUSTED_NETWORK_SSRF_POLICYpolicytofetchWithSsrFGuardinfetchWithWebToolsNetworkGuardTesting
Tested with Clash fake-ip mode enabled,
web_fetchnow works correctly with GitHub, Baidu, and other sites.