-
-
Notifications
You must be signed in to change notification settings - Fork 79.2k
[Feature]: Add tools.web.fetch.allowPrivateNetwork to allow private network access #39604
Copy link
Copy link
Open
BingqingLyu/openclaw
#130Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
Add an opt-in
tools.web.fetch.allowPrivateNetworkconfig key (boolean, defaultfalse) soweb_fetchcan reach private/internal network addresses when explicitly enabled.Problem to solve
web_fetchblocks all private/internal network addresses (localhost, 10.x, 192.168.x, 172.16-31.x) via the SSRF guard. There is no config-level way to opt in to private network access forweb_fetch.This blocks agent architectures where agents need to call a local service via
web_fetch:The
ToolsWebFetchSchemainzod-schema.agent-runtime.tsuses.strict(), so users cannot add custom keys — this requires an upstream schema change.Proposed solution
Add
allowPrivateNetwork(boolean, optional, defaultfalse) toToolsWebFetchSchema. Whentrue, passpolicy: { allowPrivateNetwork: true }tofetchWithSsrFGuard.The internal mechanism already exists —
withTrustedWebToolsEndpoint()inweb-guarded-fetch.tspasses{ dangerouslyAllowPrivateNetwork: true }to the SSRF guard. This feature request is about exposing that capability toweb_fetchvia config.Impact
web_fetch(multi-agent pipelines, local API callbacks, internal documentation).strict()schema validationEvidence/examples
The
allowPrivateNetworkpattern is already established in the codebase:browser.ssrfPolicy.allowPrivateNetwork— defaults totrue(trusted-network mode) insrc/browser/config.tschannels.tlon.allowPrivateNetworkinextensions/tlon/src/config-schema.tsallowPrivateNetworkpassed through insrc/media-understanding/providers/deepgram/audio.tsWEB_TOOLS_TRUSTED_NETWORK_SSRF_POLICYinsrc/agents/tools/web-guarded-fetch.tsalready setsdangerouslyAllowPrivateNetwork: truefor trusted endpointsweb_fetchis the only tool surface that does not expose this opt-in to config.Additional information
false— no change to existing behavior or security postureallowPrivateNetworkimplementations in the codebase