Skip to content

fix(tavily): allow a baseUrl override on a private or internal host - #139868

Closed
n1hility wants to merge 1 commit into
openclaw:mainfrom
n1hility:tavily-private-base-url
Closed

n1hility wants to merge 1 commit into
openclaw:mainfrom
n1hility:tavily-private-base-url

Conversation

@n1hility

@n1hility n1hility commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where operators who set the Tavily plugin's baseUrl (plugins.entries.tavily.config.webSearch.baseUrl or TAVILY_BASE_URL) to a Tavily-compatible endpoint on a private or internal host would find every tavily_search and tavily_extract call refused before it left the process. The documented override exists for self-hosted gateways, policy proxies and test doubles, and those endpoints are normally addressed by private names such as *.internal, *.local or an RFC 1918 address, or by a loopback address on the same machine. Routing through an env proxy does not change the outcome, and no plugin setting affects it.

Why This Change Was Made

The client posts through the trusted-endpoint guard mode, whose policy pins the hostname but keeps the private-network checks on. This change treats baseUrl as operator authority and trusts the host named in it by exact name, under this contract:

  • The configured host is honored as typed, including loopback and private addresses and localhost-style names.
  • Cloud-metadata destinations are always refused: 169.254.169.254 and other link-local literals, fd00:ec2::254, 100.100.100.200, their mapped and embedded encodings, and metadata.google.internal. A baseUrl naming one of these is routed to the strict guard, which refuses it before any DNS lookup or request in direct and env-proxy mode alike.
  • A configured name whose DNS answer is loopback, unspecified, link-local or cloud-metadata is refused, because that answer was not the operator's choice.
  • Off-host redirects are refused. A redirect that stays on the configured host is followed.
  • With an env proxy, name resolution belongs to the proxy, as for all trusted calls; the exact-host rule still applies to every hop.
  • The default api.tavily.com endpoint keeps the trusted-endpoint mode unchanged.

The guard gains an internal helper that combines the existing fake-IP hostname allowlist with the existing exact-host allowedHostnames policy for the request URL's host, after checking the host against a new isCloudMetadataHostnameOrIp classifier in src/infra/net/ssrf.ts that reuses the guard's metadata hostname and the net-policy metadata and link-local IP classifiers. postTrustedWebToolsJson's request shape, error handling and response parsing move into a shared helper, and postPinnedTrustedHostWebToolsJson is the one new plugin-sdk/provider-web-search export, used by the Tavily client when the resolved base URL's host is not api.tavily.com. The plugin SDK surface ledger records the export. The Tavily docs state the contract under "Custom base URL".

Alternative considered: an explicit webSearch.selfHosted opt-in flag. Not chosen because an operator who sets baseUrl has already named the host, and anyone able to write baseUrl can write the flag, so it adds a setting without adding a control.

User Impact

Operators can point the Tavily plugin at a Tavily-compatible endpoint on a private, internal or loopback host and use tavily_search and tavily_extract against it, directly or through an env proxy. Users of the default endpoint see no change. Cloud-metadata destinations remain unreachable, and a configured name whose DNS answer is loopback, link-local or metadata remains refused.

Evidence

September 18, 2026 rebase

Current head: d0360908091ed8ec8e444ebb9646bde815a188f9, rebased onto main ae36af547ee90ce128cb37f6bc0dfe411b36cc54. Resolved only SDK budget conflicts, preserving main’s additions and this PR’s +1 helper (4486 exports; 2650 function exports). Range-diff, source comparisons, and git diff --check passed; reviewed Tavily code/tests and contributor credit are unchanged. Earlier CI/review results below are historical, not a green result for this new head. Maintainer acceptance and existing review requests are unchanged.

September 12, 2026 refresh

  • Current head: 548a8002bd7caa1afb8eff232e4bc7321f25a06d, rebased onto main e16fc3c97374d3c0768ee6afb2e283a35c2d485c.
  • Only SDK surface-budget conflicts needed manual resolution: retain main’s additions and this PR’s +1 helper (total exports 4465, function exports 2639). Main’s canonical readProviderEnvValue migration remains intact.
  • git range-diff, changed-file comparisons, and git diff --check confirm the accepted Tavily routing, metadata/DNS/redirect policy, and tests are preserved. Original contributor authorship and existing coauthor credit are retained.
  • Fresh independent static review of this head and the network-owner context completed clean through P2, with no actionable findings. No new live Tavily-service execution is claimed.
  • ClawSweeper revision 8, completed September 12 at 17:38 UTC for this exact head, reports no actionable code/security findings and accepts the historical transport evidence with source-continuity checks. Its remaining blocker is the separately required SDK/security-owner acceptance.
  • CI run 34708395660, attempt 1, failed in checks-node-compact-large-14: src/agents/runtime-plan/resolve-auth.test.ts:159 exceeded its explicit 1000ms timeout. The shard otherwise reported 3,132 passed and 4 skipped tests. This is not yet attributed to a flake, main, or the PR. The single failed-jobs-only rerun, attempt 2, passed on the unchanged head at 18:12 UTC on September 12, 2026, with no test, timeout, or source changes. The previously failing test passed in 232ms, its shard passed, and the required openclaw/ci-gate is green. The successful retry does not establish the cause of attempt 1’s timeout. Historical test/runtime evidence below retains its original provenance.
  • The existing maintainer-acceptance note and SecOps team review request remain in place. This rebase does not change the accepted trust contract or imply SDK/security-owner signoff.

Focused tests, all passing on the rebased branch:

  • extensions/tavily/src/tavily-client.test.ts: the default baseUrl (also with a trailing slash, surrounding whitespace, or an uppercase host) calls postTrustedWebToolsJson with the existing arguments; https://tavily.gateway.internal (search) and http://10.0.0.5:8080/tavily/ (extract) call postPinnedTrustedHostWebToolsJson with the same parameter shape; in each case the other helper is not called.
  • src/agents/tools/web-guarded-fetch.test.ts: the pinned helper passes allowRfc2544BenchmarkRange, allowIpv6UniqueLocalRange, hostnameAllowlist: [host] and allowedHostnames: [host], and nothing else; https://169.254.169.254/search, https://metadata.google.internal/search and a non-http(s) URL reach the strict guard with no policy.
  • src/agents/tools/web-guarded-fetch.pinned-endpoint.test.ts (real guard, injected fetchImpl and lookupFn): trusted mode reaches api.tavily.com and rejects it before any request when it resolves to 127.0.0.1; trusted mode rejects proxy.example.internal, tavily.corp.local, tavily.localhost, 10.0.0.5 and [::1] before any request; the pinned guard reaches the configured host for each of those names and [fd00::1] when DNS answers a private address, and honors 127.0.0.1, [::1], localhost and tavily.localhost when they resolve to loopback; 169.254.169.254, [::ffff:169.254.169.254], [fd00:ec2::254], 100.100.100.200 and metadata.google.internal are rejected with no lookup and no request, both directly and with http_proxy/https_proxy set; tavily.gateway.internal resolving to 127.0.0.1, ::1, 0.0.0.0, 169.254.169.254, fd00:ec2::254 or 100.100.100.200 is rejected after one lookup and before any request, while 10.0.0.5, 192.168.1.20 and fd00::1 reach the fetch; a redirect from the configured host to any other host, private or api.tavily.com, is rejected after one request, and a same-host redirect is followed; with https_proxy set, the configured name is reached with no local DNS lookup, and a redirect to proxy.example.internal is rejected; the request timeout still aborts.
  • src/agents/tools/web-search-provider-common.test.ts: against a loopback server, postTrustedWebToolsJson is rejected with no request received; postPinnedTrustedHostWebToolsJson honors the operator-configured loopback endpoint and delivers the POST with Accept, Authorization: Bearer, Content-Type and the extra header, returning the parsed JSON; a 401 produces the same redacted, size-bounded error as the trusted path.

Results: pnpm test:extension tavily 56 passed; the three src/agents/tools guard files 67 passed; pnpm test:contracts:plugins 1128 passed; oxfmt and oxlint clean on the changed files; pnpm check:changed lanes pass, including typecheck, plugin boundaries and the plugin SDK surface budget (the lint lane did not complete on the local machine because module resolution escaped the checkout into an unrelated install; CI runs it).

Local run: a Tavily-shaped stub (POST /search, POST /extract) on 127.0.0.1:18080, a logging HTTP proxy stub on 127.0.0.1:18090 that records every CONNECT and absolute-URI request, tunnels CONNECT to the stub's port and answers 403 to any other tunnel, and the real plugin client (runTavilySearch, runTavilyExtract from extensions/tavily/src/tavily-client.ts) driven from source. The driver records every local dns.lookup call. The private name is redacted.

=== (a) baseUrl=http://127.0.0.1:18080, no proxy
[client] tavily_search: ok provider=tavily count=1
[dns] local lookups during tavily_search: 1 (127.0.0.1)
[client] tavily_extract: ok provider=tavily count=1
[dns] local lookups during tavily_extract: 1 (127.0.0.1)
--- stub log (new lines: 2)
[stub] method=POST route=/search status=200 auth=bearer-present x-client-source=openclaw body-bytes=48
[stub] method=POST route=/extract status=200 auth=bearer-present x-client-source=openclaw body-bytes=37
--- proxy log (new lines: 0)

=== (b) baseUrl=http://169.254.169.254:18080, no proxy
[security] blocked URL fetch (url-fetch) targetOrigin=http://169.254.169.254:18080 reason=Blocked hostname or private/internal/special-use IP address
[client] tavily_search: rejected name=SsrFBlockedError message=Blocked hostname or private/internal/special-use IP address
[dns] local lookups during tavily_search: 0
[security] blocked URL fetch (url-fetch) targetOrigin=http://169.254.169.254:18080 reason=Blocked hostname or private/internal/special-use IP address
[client] tavily_extract: rejected name=SsrFBlockedError message=Blocked hostname or private/internal/special-use IP address
[dns] local lookups during tavily_extract: 0
--- stub log (new lines: 0)
--- proxy log (new lines: 0)

=== (c) baseUrl=http://169.254.169.254:18080, HTTP_PROXY/HTTPS_PROXY=http://127.0.0.1:18090
[security] blocked URL fetch (url-fetch) targetOrigin=http://169.254.169.254:18080 reason=Blocked hostname or private/internal/special-use IP address
[client] tavily_search: rejected name=SsrFBlockedError message=Blocked hostname or private/internal/special-use IP address
[dns] local lookups during tavily_search: 0
[security] blocked URL fetch (url-fetch) targetOrigin=http://169.254.169.254:18080 reason=Blocked hostname or private/internal/special-use IP address
[client] tavily_extract: rejected name=SsrFBlockedError message=Blocked hostname or private/internal/special-use IP address
[dns] local lookups during tavily_extract: 0
--- stub log (new lines: 0)
--- proxy log (new lines: 0)

=== (d) baseUrl=http://<private-host>:18080, HTTP_PROXY/HTTPS_PROXY=http://127.0.0.1:18090
[client] tavily_search: ok provider=tavily count=1
[dns] local lookups during tavily_search: 0
[client] tavily_extract: ok provider=tavily count=1
[dns] local lookups during tavily_extract: 0
--- stub log (new lines: 2)
[stub] method=POST route=/search status=200 auth=bearer-present x-client-source=openclaw body-bytes=48
[stub] method=POST route=/extract status=200 auth=bearer-present x-client-source=openclaw body-bytes=37
--- proxy log (new lines: 2)
[proxy] CONNECT <private-host>:18080 (host received as written: <private-host>)
[proxy] CONNECT <private-host>:18080 (host received as written: <private-host>)

=== (e1) default endpoint (baseUrl unset), HTTP_PROXY/HTTPS_PROXY=http://127.0.0.1:18090
[client] tavily_search: rejected name=TypeError message=fetch failed cause=Request was cancelled. <- Proxy response (403) !== 200 when HTTP Tunneling
[dns] local lookups during tavily_search: 0
[client] tavily_extract: rejected name=TypeError message=fetch failed cause=Request was cancelled. <- Proxy response (403) !== 200 when HTTP Tunneling
[dns] local lookups during tavily_extract: 0
--- stub log (new lines: 0)
--- proxy log (new lines: 2)
[proxy] CONNECT api.tavily.com:443 (host received as written: api.tavily.com)
[proxy] CONNECT api.tavily.com:443 (host received as written: api.tavily.com)

=== (e2) baseUrl=https://<private-host>:18443, HTTP_PROXY/HTTPS_PROXY=http://127.0.0.1:18090
[client] tavily_search: rejected name=TypeError message=fetch failed cause=Request was cancelled. <- Proxy response (403) !== 200 when HTTP Tunneling
[dns] local lookups during tavily_search: 0
[client] tavily_extract: rejected name=TypeError message=fetch failed cause=Request was cancelled. <- Proxy response (403) !== 200 when HTTP Tunneling
[dns] local lookups during tavily_extract: 0
--- stub log (new lines: 0)
--- proxy log (new lines: 2)
[proxy] CONNECT <private-host>:18443 (host received as written: <private-host>)
[proxy] CONNECT <private-host>:18443 (host received as written: <private-host>)

(a) The operator-configured loopback endpoint is honored: both calls succeed and the stub receives exactly two requests. (b) and (c) A metadata baseUrl is refused before any lookup or connection, with or without an env proxy; the proxy log stays empty. (d) A private name is delivered through the proxy: one CONNECT per call, the name arrives at the proxy unresolved, and the stub receives exactly two requests. (e1) and (e2) The default endpoint in trusted mode and a private name in pinned mode behave identically under the proxy: one CONNECT per call carrying the hostname as written, zero local DNS lookups, and the same failure when the proxy refuses the tunnel. The pinned helper does not weaken proxy mode beyond exempting the one configured host from the pre-DNS hostname rule.

@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation agents Agent runtime and tooling extensions: tavily triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. size: L labels Sep 6, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 18, 2026, 2:26 PM ET / 18:26 UTC (Revision 14).

ClawSweeper review

What this changes

Allows Tavily search and extraction to reach operator-configured private endpoints through a hostname-scoped network helper, with metadata protection, documentation, and regression coverage.

Merge readiness

⛔ Blocked before merge - 4 items remain

The change remains useful: current main still blocks these private endpoints, and the related merged work does not replace it. Source review found no actionable defect, and the recorded transport proof supports the proposed behavior.

Priority: P2
Reviewed head: d0360908091ed8ec8e444ebb9646bde815a188f9
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, well-supported implementation with no actionable findings; the remaining owner decision does not reduce patch quality.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (logs): The complete, hash-matched body records the real Tavily client and HTTP transport delivering search/extraction requests to loopback and proxied private endpoints, while metadata attempts produce no DNS or network requests. Source continuity preserves this historical proof; mocked redirect/DNS tests supplement it, and no live Tavily-service success is claimed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (logs): The complete, hash-matched body records the real Tavily client and HTTP transport delivering search/extraction requests to loopback and proxied private endpoints, while metadata attempts produce no DNS or network requests. Source continuity preserves this historical proof; mocked redirect/DNS tests supplement it, and no live Tavily-service success is claimed.
Evidence reviewed 9 items Current main still needs the change: At the pinned main revision, postTavilyJson always calls postTrustedWebToolsJson. Its hostname allowlist does not grant private-network access, so configuring an internal endpoint does not select a permissive transport.
Latest release retains the old routing: The Tavily client in v2026.9.4 also unconditionally uses postTrustedWebToolsJson; the release tag resolves to the supplied release commit.
Trust remains scoped to operator configuration: The new guard combines the existing hostname allowlist and exact-host exception, routes recognized metadata destinations through strict checks, and retains per-hop validation. Tavily tool schemas expose query/extraction arguments rather than an endpoint override. The metadata classifiers are owned by this repository's packages/net-policy/src/ip.ts.
Findings None None.
Security None None.

How this fits together

The Tavily plugin turns agent search and extraction requests into authenticated HTTP requests. The shared network guard controls which configured destinations and redirects those requests may reach.

flowchart TD
  A[Agent search or extraction] --> C[Tavily client]
  B[Operator endpoint configuration] --> C
  C --> D{Hosted or custom host}
  D --> E[Existing hosted guard]
  D --> F[Hostname-scoped private endpoint guard]
  E --> G[Direct or proxy transport]
  F --> G
  G --> H[Parsed search or extraction results]
Loading

Decision needed

Question Recommendation
Do the SDK and security owners accept the new helper and hostname-wide private-endpoint authority granted by existing Tavily baseUrl settings? Accept the documented boundary: Record SDK and security-owner acceptance of existing-setting authorization, hostname-wide scope, and proxy-owned DNS enforcement.

Why: The recorded product acceptance explicitly leaves these owner approvals outstanding, and SDK policy requires them for this trust expansion.

Before merge

  • Resolve merge risk (P1) - Existing custom baseUrl settings gain authority to send credentials and request bodies to previously blocked private destinations without another opt-in; separate SDK/security-owner acceptance remains unrecorded.
  • Resolve merge risk (P1) - Trust covers the configured hostname across ports and schemes, and an environment proxy owns target DNS enforcement; this accepted tradeoff still requires the designated owners' disposition.
  • Complete next step (P2) - Record the separately required SDK and security-owner disposition for the new helper and the documented hostname-wide private-endpoint/proxy-DNS contract.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
Agent review details

Security

None.

PR surface

Source +92, Tests +579, Docs 0, Other +3. Total +674 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 5 122 30 +92
Tests 4 585 6 +579
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 6 3 +3
Total 11 714 40 +674

Review metrics

Metric Value Why it matters
Configuration and SDK surface 1 SDK helper added; 0 new settings The existing baseUrl setting acquires broader authority instead of requiring a new opt-in.
Production versus regression coverage Production net +92 lines; tests net +579; tooling net +3 Production growth is explained by the distinct endpoint policy and shared POST implementation; most growth covers network-boundary regressions.

Merge-risk options

Maintainer options:

  1. Record the remaining owner acceptance (recommended)
    Accept the documented SDK addition and upgrade-time trust expansion through explicit SDK/security-owner disposition.
  2. Hold for a narrower owner-approved contract
    Pause landing if either owner rejects hostname-wide authorization or proxy-owned DNS enforcement.

Technical review

Best possible solution:

Retain the shared hostname-scoped transport with metadata and redirect safeguards, subject to SDK/security-owner acceptance of its documented upgrade behavior.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: configure Tavily with a private baseUrl and invoke search or extraction; current main selects the guard that rejects it. This read-only review did not execute that path.

Is this the best way to solve the issue?

Yes, subject to owner acceptance: the helper composes existing network policies and shares HTTP handling, while the existing self-hosted helper would grant broader access.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against ae36af547ee9.

Labels

Label justifications:

  • P2: This enables a bounded operator-configured Tavily deployment path while leaving the default hosted endpoint unchanged.
  • merge-risk: 🚨 compatibility: An additive SDK contract changes the behavior of existing custom endpoint settings during upgrade.
  • merge-risk: 🚨 security-boundary: Configured hosts gain private-network authority, including hostname-wide scope and proxy-delegated DNS enforcement.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (logs): The complete, hash-matched body records the real Tavily client and HTTP transport delivering search/extraction requests to loopback and proxied private endpoints, while metadata attempts produce no DNS or network requests. Source continuity preserves this historical proof; mocked redirect/DNS tests supplement it, and no live Tavily-service success is claimed.
  • proof: sufficient: Contributor real behavior proof is sufficient. The complete, hash-matched body records the real Tavily client and HTTP transport delivering search/extraction requests to loopback and proxied private endpoints, while metadata attempts produce no DNS or network requests. Source continuity preserves this historical proof; mocked redirect/DNS tests supplement it, and no live Tavily-service success is claimed.

Evidence

What I checked:

  • Current main still needs the change: At the pinned main revision, postTavilyJson always calls postTrustedWebToolsJson. Its hostname allowlist does not grant private-network access, so configuring an internal endpoint does not select a permissive transport. (extensions/tavily/src/tavily-client.ts:129, ae36af547ee9)
  • Latest release retains the old routing: The Tavily client in v2026.9.4 also unconditionally uses postTrustedWebToolsJson; the release tag resolves to the supplied release commit. (extensions/tavily/src/tavily-client.ts:129, 3a9d69db306c)
  • Trust remains scoped to operator configuration: The new guard combines the existing hostname allowlist and exact-host exception, routes recognized metadata destinations through strict checks, and retains per-hop validation. Tavily tool schemas expose query/extraction arguments rather than an endpoint override. The metadata classifiers are owned by this repository's packages/net-policy/src/ip.ts. (src/agents/tools/web-guarded-fetch.ts:125, d0360908091e)
  • Complete captured runtime evidence inspected: The full GitHub body matches captured SHA-256 9cceeb027f783e9ea195aed49970b5185a4c2651d972b15ea1a105debb80ef12 and all 14,664 UTF-16 units were inspected. Its historical real-client run records successful search/extraction POSTs to a loopback server and through a logging proxy, plus metadata rejection with zero DNS calls and zero server/proxy requests. Default-host and custom-host proxy refusal traces show consistent transport behavior; no live Tavily-service success is claimed.
  • Review continuity independently checked: GitHub content identities at the previous reviewed revision match current local blobs for the Tavily client, guarded-fetch wrapper, pinned-endpoint tests, and shared JSON transport. This preserves the prior clean findings and relevant proof assessment. Local historical comparison was unavailable for the earlier head; bounded GitHub content reads supplied the comparison. (src/agents/tools/web-guarded-fetch.ts:125, d0360908091e)
  • Owner acceptance remains a distinct gate: SDK policy requires SDK and security-owner acceptance for widened trust boundaries. The recorded acceptance comment explicitly preserves that requirement: fix(tavily): allow a baseUrl override on a private or internal host #139868 (comment). Live review reads returned no submitted reviews; the current assignee is sallyom, and no separate owner disposition was present in the human-context comments. (src/plugin-sdk/AGENTS.md:75, d0360908091e)

Likely related people:

  • sallyom: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (13 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-10T19:31:28.821Z sha 7e5804ff5eca70b7eb97be88e80f22492c095ce4 :: blocked before merge. :: none
  • reviewed 2026-09-11T03:39:49.163Z sha c7a22d73f30f12a9b8a1ed78ca63ef7619774048 :: blocked before merge. :: none
  • reviewed 2026-09-12T17:38:05.335Z sha 548a8002bd7caa1afb8eff232e4bc7321f25a06d :: blocked before merge. :: none
  • reviewed 2026-09-12T17:50:22.599Z sha 548a8002bd7caa1afb8eff232e4bc7321f25a06d :: blocked before merge. :: none
  • reviewed 2026-09-12T18:03:38.309Z sha 548a8002bd7caa1afb8eff232e4bc7321f25a06d :: blocked before merge. :: none
  • reviewed 2026-09-12T18:21:10.494Z sha 548a8002bd7caa1afb8eff232e4bc7321f25a06d :: blocked before merge. :: none
  • reviewed 2026-09-13T18:05:48.390Z sha 8fee4b114adf7a7a4003114079f2f762afdfa979 :: blocked before merge. :: none
  • reviewed 2026-09-15T01:58:17.748Z sha 9c04c2da8321ed74f86c400dc56c5a8d49a803d1 :: blocked before merge. :: none

@n1hility
n1hility force-pushed the tavily-private-base-url branch from 06b6135 to a961c28 Compare September 6, 2026 21:41
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Sep 6, 2026
@n1hility
n1hility force-pushed the tavily-private-base-url branch from a961c28 to d086ea5 Compare September 6, 2026 21:59
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 6, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Sep 6, 2026
@n1hility
n1hility force-pushed the tavily-private-base-url branch from d086ea5 to db0e8b5 Compare September 6, 2026 23:35
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Sep 6, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 6, 2026
@n1hility
n1hility force-pushed the tavily-private-base-url branch from db0e8b5 to 7e5804f Compare September 10, 2026 19:23
@roboclaw-bot
roboclaw-bot force-pushed the tavily-private-base-url branch from 7e5804f to c7a22d7 Compare September 11, 2026 03:32
@roboclaw-bot

roboclaw-bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator

Maintainer acceptance

At @sallyom’s direction, we accept the documented trust-boundary change in c7a22d73f30f12a9b8a1ed78ca63ef7619774048: an existing operator-configured Tavily baseUrl may authorize private/internal/explicit-loopback access without a separate opt-in, through the new SDK helper. This is consistent with existing hostname-trusted OpenClaw integrations, including OpenAI-compatible, ElevenLabs, and Fish Audio TTS.

This acceptance includes hostname-wide scope across ports/schemes and delegation of target DNS enforcement to an operator-configured environment proxy. Recognized metadata destinations remain locally blocked; proxy-resolved addresses are the proxy’s responsibility. Different-host redirects remain rejected, and the default hosted Tavily path is unchanged.

CI run 34558848630 is green on this head; the latest review reports no blocking code findings. This records the maintainer decision, not a substitute for any separately required SDK/SecOps owner approval or permission to bypass merge gates.

@openclaw/openclaw-secops — please review the accepted hostname-wide private-endpoint and proxy-DNS contract above and record the security-owner disposition required by src/plugin-sdk/AGENTS.md; coordinate SDK-owner acceptance as applicable. This request does not authorize a gate bypass.

@sallyom sallyom self-assigned this Sep 11, 2026
@roboclaw-bot
roboclaw-bot requested a review from a team September 11, 2026 03:58
@roboclaw-bot
roboclaw-bot force-pushed the tavily-private-base-url branch 3 times, most recently from 8fee4b1 to 9c04c2d Compare September 15, 2026 01:49
A Tavily baseUrl on a private or internal host was unusable: requests went
through the trusted-endpoint guard, which keeps the private-network checks
on, so hosts ending in .internal, .local or .localhost and private,
loopback or link-local addresses were refused before the request left the
process. No plugin setting reaches the policy.

Treat baseUrl as operator authority and trust the host named in it by
exact name. The configured host is honored as typed, including loopback
and private addresses. Cloud-metadata destinations are always refused:
the new guard helper routes 169.254.169.254 and other link-local literals,
fd00:ec2::254, 100.100.100.200, their mapped and embedded forms and
metadata.google.internal to the strict guard, which rejects them before
any DNS lookup or request in direct and env-proxy mode alike. A configured
name whose DNS answer is loopback, unspecified, link-local or
cloud-metadata is refused, because that answer was not the operator's
choice. Off-host redirects are refused. With an env proxy the proxy
resolves the name, as for every trusted call. The default api.tavily.com
endpoint keeps the trusted-endpoint mode unchanged.

The helper combines the existing fake-IP hostname allowlist with the
existing exact-host allowedHostnames policy for the request URL's host;
isCloudMetadataHostnameOrIp in ssrf.ts reuses the guard's metadata
hostname and the net-policy metadata and link-local IP classifiers.
postTrustedWebToolsJson's request shape, error handling and response
parsing move into a shared helper; postPinnedTrustedHostWebToolsJson is
the one new plugin-sdk export, recorded in the SDK surface ledger and used
by the Tavily client when the resolved base URL's host is not
api.tavily.com.

Co-authored-by: sallyom <[email protected]>
@roboclaw-bot
roboclaw-bot force-pushed the tavily-private-base-url branch from 9c04c2d to d036090 Compare September 18, 2026 18:20
@openclaw-barnacle

Copy link
Copy Markdown

This assigned pull request has been automatically marked as stale after being open for 27 days.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Oct 4, 2026
@openclaw-barnacle

Copy link
Copy Markdown

Closing due to inactivity.
If you believe this PR should be revived, post in #clawtributors on Discord to talk to a maintainer.
That channel is the escape hatch for high-quality PRs that get auto-closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation extensions: tavily merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: L stale Marked as stale due to inactivity status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants