Repository navigation
feat(web-fetch): add tools.web.fetch.headers for operator request headers - #115545
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 12:04 PM ET / 16:04 UTC. ClawSweeper reviewWhat this changesAdds opt-in Merge readinessThis PR remains necessary: current Priority: P2 Review scores
Verification
How this fits together
flowchart LR
A[Operator config] --> B[Web fetch tool]
C[Model-selected URL] --> B
B --> D[Header validation and cache key]
D --> E[SSRF-guarded direct request]
E --> F[Redirect safety filter]
E --> G[Redacted debug capture]
E --> H[Fetched content or provider fallback]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +141, Tests +406, Docs +64, Generated +1. Total +612 across 18 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Merge the focused core configuration only after human review of the exact head confirms the documented opt-in first-hop boundary and the existing guarded-fetch protections remain intact. Do we have a high-confidence way to reproduce the issue? Not applicable: this is an additive configuration capability, not a report of broken existing behavior. Current source confirms the capability is absent from the direct Is this the best way to solve the issue? Yes. Given the accepted product boundary, adding the setting at the direct web-fetch owner and reusing guarded-fetch redirect handling, cache identity, and capture redaction is preferable to a parallel gateway or provider-specific workaround. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5ae401d9084f. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (22 earlier review cycles; latest 8 shown)
|
ba3e48a to
6713b1e
Compare
3b6f001 to
bc0e4a7
Compare
|
/clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Maintainer decision: accept the documented first-hop trust boundary. |
|
/clawsweeper re-review |
1 similar comment
|
/clawsweeper re-review |
|
/clawsweeper re-review |
1 similar comment
|
/clawsweeper re-review |
# Conflicts: # docs/.generated/config-baseline.sha256
|
/clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
/clawsweeper re-review |
|
Merged via squash.
|
* origin/main: (44 commits) fix(plugins): compare authoring metadata by canonical JSON semantics (openclaw#117486) fix(doctor): reject contradictory lint check selectors (openclaw#117495) fix(anthropic): honor configured model pricing (openclaw#117275) refactor(plugins): reuse scoped loader for capability discovery (openclaw#117373) refactor(test): derive changed tooling routes (openclaw#117407) fix(kova): clarify extension memory attribution (openclaw#117500) fix(imessage): sanitize private context on every outbound path (openclaw#117501) fix(ci): align release validation fixtures (openclaw#117494) fix(talk): preserve owner authorization in realtime consults (openclaw#114163) fix(ui): surface aborted-run diagnostics (openclaw#117497) perf(models): skip Ollama row runtime loading (openclaw#117465) fix(cli): report user profile command outcomes (openclaw#117466) fix(active-memory): detect Chinese recall intent in escalate mode (openclaw#117338) (openclaw#117419) fix(workboard): ignore caller-supplied archivedAt when creating a card (openclaw#116412) fix(models): avoid waiting on promotions before listing models (openclaw#117322) refactor(plugins): inherit shared package boundary settings (openclaw#117474) fix(systemd): parse all inline environment assignments (openclaw#117484) feat(web-fetch): add tools.web.fetch.headers for operator request headers (openclaw#115545) fix(qa): Slack progress lane misses successful delivery (openclaw#117391) refactor: deduplicate Codex prompt snapshot fixtures (openclaw#117476) ...
* origin/main: (41 commits) fix(plugins): compare authoring metadata by canonical JSON semantics (openclaw#117486) fix(doctor): reject contradictory lint check selectors (openclaw#117495) fix(anthropic): honor configured model pricing (openclaw#117275) refactor(plugins): reuse scoped loader for capability discovery (openclaw#117373) refactor(test): derive changed tooling routes (openclaw#117407) fix(kova): clarify extension memory attribution (openclaw#117500) fix(imessage): sanitize private context on every outbound path (openclaw#117501) fix(ci): align release validation fixtures (openclaw#117494) fix(talk): preserve owner authorization in realtime consults (openclaw#114163) fix(ui): surface aborted-run diagnostics (openclaw#117497) perf(models): skip Ollama row runtime loading (openclaw#117465) fix(cli): report user profile command outcomes (openclaw#117466) fix(active-memory): detect Chinese recall intent in escalate mode (openclaw#117338) (openclaw#117419) fix(workboard): ignore caller-supplied archivedAt when creating a card (openclaw#116412) fix(models): avoid waiting on promotions before listing models (openclaw#117322) refactor(plugins): inherit shared package boundary settings (openclaw#117474) fix(systemd): parse all inline environment assignments (openclaw#117484) feat(web-fetch): add tools.web.fetch.headers for operator request headers (openclaw#115545) fix(qa): Slack progress lane misses successful delivery (openclaw#117391) refactor: deduplicate Codex prompt snapshot fixtures (openclaw#117476) ...
…ders (openclaw#115545) * feat(web-fetch): add tools.web.fetch.headers for operator request headers * docs(web-fetch): update cache discriminator comment * fix(web-fetch): reserve runtime and cookie headers * fix(web-fetch): harden operator header normalization * fix(web-fetch): align header safety contracts * fix(web-fetch): close header logging gaps * fix(web-fetch): report case-colliding headers * fix(web-fetch): reject stale colliding headers * fix(web-fetch): refuse credential token aliases * fix(web-fetch): preserve empty header values * fix(web-fetch): refuse credential-shaped headers * chore(config): refresh web fetch header baselines * test(web-fetch): cover header security contracts * fix(web-fetch): narrow credential header refusal * fix(web-fetch): preserve trace metadata headers * fix(web-fetch): keep header validation internal * test(web-fetch): satisfy strict test contracts * fix(web-fetch): refuse vendor credential headers * fix(web-fetch): refuse authentication signatures * fix(web-fetch): detect qualified auth signatures * fix(web-fetch): refuse auth-suffixed headers * fix(web-fetch): refuse compact credential headers * fix(secrets): audit authentication signatures * fix(web-fetch): redact operator headers in captures * fix(web-fetch): keep capture metadata internal * fix(web-fetch): allow sensitive operator headers * test(web-fetch): cover normalized operator headers * docs: note web fetch request headers * chore(config): refresh web fetch header baseline * chore: remove release-owned changelog entry
* origin/main: (44 commits) fix(plugins): compare authoring metadata by canonical JSON semantics (openclaw#117486) fix(doctor): reject contradictory lint check selectors (openclaw#117495) fix(anthropic): honor configured model pricing (openclaw#117275) refactor(plugins): reuse scoped loader for capability discovery (openclaw#117373) refactor(test): derive changed tooling routes (openclaw#117407) fix(kova): clarify extension memory attribution (openclaw#117500) fix(imessage): sanitize private context on every outbound path (openclaw#117501) fix(ci): align release validation fixtures (openclaw#117494) fix(talk): preserve owner authorization in realtime consults (openclaw#114163) fix(ui): surface aborted-run diagnostics (openclaw#117497) perf(models): skip Ollama row runtime loading (openclaw#117465) fix(cli): report user profile command outcomes (openclaw#117466) fix(active-memory): detect Chinese recall intent in escalate mode (openclaw#117338) (openclaw#117419) fix(workboard): ignore caller-supplied archivedAt when creating a card (openclaw#116412) fix(models): avoid waiting on promotions before listing models (openclaw#117322) refactor(plugins): inherit shared package boundary settings (openclaw#117474) fix(systemd): parse all inline environment assignments (openclaw#117484) feat(web-fetch): add tools.web.fetch.headers for operator request headers (openclaw#115545) fix(qa): Slack progress lane misses successful delivery (openclaw#117391) refactor: deduplicate Codex prompt snapshot fixtures (openclaw#117476) ...
* origin/main: (27 commits) fix(plugins): compare authoring metadata by canonical JSON semantics (openclaw#117486) fix(doctor): reject contradictory lint check selectors (openclaw#117495) fix(anthropic): honor configured model pricing (openclaw#117275) refactor(plugins): reuse scoped loader for capability discovery (openclaw#117373) refactor(test): derive changed tooling routes (openclaw#117407) fix(kova): clarify extension memory attribution (openclaw#117500) fix(imessage): sanitize private context on every outbound path (openclaw#117501) fix(ci): align release validation fixtures (openclaw#117494) fix(talk): preserve owner authorization in realtime consults (openclaw#114163) fix(ui): surface aborted-run diagnostics (openclaw#117497) perf(models): skip Ollama row runtime loading (openclaw#117465) fix(cli): report user profile command outcomes (openclaw#117466) fix(active-memory): detect Chinese recall intent in escalate mode (openclaw#117338) (openclaw#117419) fix(workboard): ignore caller-supplied archivedAt when creating a card (openclaw#116412) fix(models): avoid waiting on promotions before listing models (openclaw#117322) refactor(plugins): inherit shared package boundary settings (openclaw#117474) fix(systemd): parse all inline environment assignments (openclaw#117484) feat(web-fetch): add tools.web.fetch.headers for operator request headers (openclaw#115545) fix(qa): Slack progress lane misses successful delivery (openclaw#117391) refactor: deduplicate Codex prompt snapshot fixtures (openclaw#117476) ...
* origin/main: (41 commits) fix(plugins): compare authoring metadata by canonical JSON semantics (openclaw#117486) fix(doctor): reject contradictory lint check selectors (openclaw#117495) fix(anthropic): honor configured model pricing (openclaw#117275) refactor(plugins): reuse scoped loader for capability discovery (openclaw#117373) refactor(test): derive changed tooling routes (openclaw#117407) fix(kova): clarify extension memory attribution (openclaw#117500) fix(imessage): sanitize private context on every outbound path (openclaw#117501) fix(ci): align release validation fixtures (openclaw#117494) fix(talk): preserve owner authorization in realtime consults (openclaw#114163) fix(ui): surface aborted-run diagnostics (openclaw#117497) perf(models): skip Ollama row runtime loading (openclaw#117465) fix(cli): report user profile command outcomes (openclaw#117466) fix(active-memory): detect Chinese recall intent in escalate mode (openclaw#117338) (openclaw#117419) fix(workboard): ignore caller-supplied archivedAt when creating a card (openclaw#116412) fix(models): avoid waiting on promotions before listing models (openclaw#117322) refactor(plugins): inherit shared package boundary settings (openclaw#117474) fix(systemd): parse all inline environment assignments (openclaw#117484) feat(web-fetch): add tools.web.fetch.headers for operator request headers (openclaw#115545) fix(qa): Slack progress lane misses successful delivery (openclaw#117391) refactor: deduplicate Codex prompt snapshot fixtures (openclaw#117476) ...
What Problem This Solves
Operators who route outbound traffic through a gateway they control can attach request metadata to model-provider traffic, but not to direct
web_fetchrequests. In deployments with gateway-enforced egress, that meansweb_fetchcannot reach the approved route even though the same deployment can route model traffic.Why This Change Was Made
Adds
tools.web.fetch.headers, an opt-in string map applied only to the direct, SSRF-guardedweb_fetchrequest.The contract is:
Authorization,Cookie,X-Api-Key, and deployment-specific routing headers.Accept,Accept-Language,User-Agent, andSec-Fetch-Mode), framing/hop-by-hop headers, and values the runtimeHeadersimplementation cannot carry are dropped per entry.Values are plain strings and support normal
${VAR}config substitution. StructuredSecretRefobjects are not accepted by this string-map field; sensitivity comes from the schema marking every map value sensitive.The headers are sent to the initial URL selected by the model. Credential headers should therefore be configured only when that is the intended trust boundary. This does not relax SSRF policy, DNS pinning, redirect limits, or trusted-proxy rules.
User Impact
Operators can now send deployment-specific routing, authentication, or service-injection headers with direct
web_fetchtraffic. The feature is additive and disabled by default. Existing request and cache behavior is unchanged when no headers are configured.Evidence
Behavioral coverage verifies:
Checks on rebased head
e1d0a8fca38:pnpm check:changed: passed on Blacksmith Testbox, including core production/test typechecks, all core/UI/package lint shards, generated metadata/API baselines, dead-export scans, import cycles, and boundary/database/media/runtime guards.No screenshot is included because this changes a backend/config request contract and no rendered UI state.
Review Note
The implementation is intentionally local to
web_fetch. It uses the runtimeHeadersimplementation for transport validation and the existing guarded-fetch, redirect, cache, config-sensitivity, and capture-redaction seams rather than introducing a second credential policy.Maintainer policy decision: enabling
tools.web.fetch.headersintentionally authorizes the accepted configured headers on every initial directweb_fetchURL selected by the model. Header names are arbitrary, so OpenClaw does not infer which values are credentials or add a separate destination allowlist. Operators must configure credential-bearing headers only when that global first-hop scope is their intended trust boundary. Cross-origin redirects remain restricted by the existing safe-header filter.