Skip to content

fix(doctor): warn when HTTP(S)_PROXY is set without tools.web.fetch.useTrustedEnvProxy#96172

Open
nxmxbbd wants to merge 5 commits into
openclaw:mainfrom
nxmxbbd:fix/95560-web-fetch-proxy-warning
Open

fix(doctor): warn when HTTP(S)_PROXY is set without tools.web.fetch.useTrustedEnvProxy#96172
nxmxbbd wants to merge 5 commits into
openclaw:mainfrom
nxmxbbd:fix/95560-web-fetch-proxy-warning

Conversation

@nxmxbbd

@nxmxbbd nxmxbbd commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where users with HTTP_PROXY / HTTPS_PROXY (or their lowercase variants) set in the Gateway process environment see web_fetch silently use direct connections instead of routing through the configured proxy. On networks that block direct egress (corporate firewalls, regional proxies), this causes confusing web_fetch timeouts with no operator feedback about the missing tools.web.fetch.useTrustedEnvProxy opt-in.

The tools.web.fetch.useTrustedEnvProxy option has existed since the original landing for this surface, but there is no in-product surface that tells operators it exists or that their proxy env vars are being ignored. Users discover the option via changelogs, GitHub issues, or community channels.

Closes #95560.

Why This Change Was Made

Adds a diagnostic warning that fires in three existing surfaces — openclaw doctor, openclaw status, and openclaw security audit --deep — when any of HTTP_PROXY, HTTPS_PROXY, http_proxy, or https_proxy is present in the Gateway process environment but tools.web.fetch.useTrustedEnvProxy is not enabled. The change is diagnostic-only:

  • web_fetch routing is unchanged
  • The SSRF DNS-pinning boundary in src/infra/net/fetch-guard.ts is unchanged
  • No default config value changes
  • No auto-flip of the opt-in (a hard-flip would interact poorly with the open NO_PROXY work in web_fetch useTrustedEnvProxy ignores NO_PROXY env variable #93807 and was explicitly declined by the reporter)

Detection delegates to the existing per-protocol predicate hasEnvHttpProxyConfigured("http", env) || hasEnvHttpProxyConfigured("https", env) from src/infra/net/proxy-env.ts. The web_fetch runtime resolves tools.web.fetch.useTrustedEnvProxy in src/agents/tools/web-fetch.ts and passes that value into the guarded fetch env-proxy dispatch path in src/infra/net/fetch-guard.ts, which calls shouldUseEnvHttpProxyForUrl() before constructing the proxy dispatcher. The warning gate therefore stays tied to the HTTP(S) env vars that the web_fetch dispatcher considers:

  • lowercase HTTP/HTTPS env vars take precedence over uppercase,
  • an empty lowercase value intentionally shadows the uppercase value,
  • ALL_PROXY / all_proxy alone do not fire — the per-protocol helper only reads HTTP_PROXY / HTTPS_PROXY / http_proxy / https_proxy, and the web_fetch dispatcher (built with no explicit options at fetch-guard.ts:528) does not honor ALL_PROXY for HTTP/HTTPS even when useTrustedEnvProxy is on,
  • a bare NO_PROXY=* / no_proxy=* value suppresses the warning — matchesNoProxy() treats that exact value as bypass-everything, so enabling the opt-in could not route any web_fetch request through the proxy and the recommendation would be misleading. * entries inside comma/whitespace-separated lists are skipped per-entry by that matcher (only the bare value is all-bypass), so partial NO_PROXY lists still warn.

Prior art in this repo: this PR mirrors the shape of #74271 (PR #74433, fix(doctor): warn when OPENCLAW_GATEWAY_TOKEN env overrides gateway.auth.token config) — pure resolver in src/gateway/ + integration into the same three doctor / status / security-audit surfaces + per-surface unit tests + severity: "warn". The remediation text follows the canonical SSRF framing already used by the docs/tools/web-fetch.md trusted-env-proxy guidance.

Scope boundaries (deliberate)

User Impact

Operators with HTTP_PROXY / HTTPS_PROXY set who run openclaw doctor, openclaw status, or openclaw security audit --deep see a Security-section warning that names the env var, points at tools.web.fetch.useTrustedEnvProxy, and explains the SSRF / DNS-pinning trade-off of enabling it. Operators without proxy env vars, with the opt-in already enabled, with web_fetch explicitly disabled, or with NO_PROXY=* bypassing every target see no warning. There is no behavior change for web_fetch itself.

Evidence

Fresh-base merge update

Merged openclaw/openclaw@76a236da5fa into the PR branch with a signed merge commit (6dafc2c64aa), then added the NO_PROXY=* gate as signed commit 0287d4a4233 (current head).

$ git diff --name-status upstream/main...HEAD
M	src/commands/doctor-security.test.ts
M	src/commands/doctor-security.ts
M	src/commands/status.scan.config-shared.test.ts
M	src/commands/status.scan.config-shared.ts
A	src/gateway/web-fetch-proxy-source-conflict.ts
M	src/security/audit-gateway-config.ts
M	src/security/audit-gateway.test.ts

$ git diff --check upstream/main...HEAD
# clean

main kept advancing during proof (f180638e878 at push time); 0 commits in 76a236da..f180638e touch the 7 PR files or the dependency surface (proxy-env.ts, web-fetch.ts), and git merge-tree --write-tree upstream/main HEAD is conflict-free, so the branch was intentionally not re-merged again.

Focused regression on the three changed surfaces

$ node scripts/run-vitest.mjs src/security/audit-gateway.test.ts
Tests  17 passed (17)
$ node scripts/run-vitest.mjs src/commands/doctor-security.test.ts src/commands/status.scan.config-shared.test.ts
Tests  64 passed (64)

Red-first: the four new suppression tests (NO_PROXY=* on doctor/status/audit plus lowercase no_proxy=* on doctor) were added before the resolver change and fail against the previous head — the warning is still emitted — then pass with the gate. Coverage now includes:

  • positive uppercase HTTP_PROXY / HTTPS_PROXY, positive lowercase http_proxy / https_proxy, mixed case
  • empty-lowercase-shadows-uppercase, matching undici precedence
  • ALL_PROXY / all_proxy only stays negative (dispatcher does not honor those here)
  • tools.web.fetch.useTrustedEnvProxy: true stays negative
  • tools.web.fetch.enabled: false stays negative across doctor, status, and security audit
  • new: NO_PROXY=* and lowercase no_proxy=* suppress across doctor, status, and security audit
  • new: NO_PROXY="*,localhost" (a * entry inside a list) still warns, matching matchesNoProxy() per-entry skip
  • new: partial NO_PROXY=internal.example.com still warns
  • new: blank lowercase no_proxy= shadowing NO_PROXY=* still warns, matching undici precedence
  • doctor test env isolation now saves/clears/restores NO_PROXY / no_proxy, so a machine-level NO_PROXY cannot flip the suite

Full built CLI proof

Built and exercised head 0287d4a4233 in a fresh isolated clone with Node v24.15.0:

$ corepack pnpm install --frozen-lockfile   # exit 0
$ corepack pnpm build                       # exit 0, total 2m 34.1s

The built output contains the new gate:

$ grep -o 'if ((params.env.no_proxy ?? params.env.NO_PROXY) === "*") return null;' dist/web-fetch-proxy-source-conflict-DO90MGiu.js
if ((params.env.no_proxy ?? params.env.NO_PROXY) === "*") return null;

Then ran the built CLI (node dist/entry.js) with isolated OPENCLAW_HOME / OPENCLAW_STATE_DIR / OPENCLAW_CONFIG_PATH and HTTP_PROXY=http://127.0.0.1:7897, across four env/config sets, three surfaces each (doctor --non-interactive, status --json --timeout 1000, security audit --deep --json; all runs exit 0):

1. Positive control (no NO_PROXY, default config): all three surfaces report the diagnostic.

[Security]
- WARNING: HTTP_PROXY set without tools.web.fetch.useTrustedEnvProxy.
  Detected HTTP_PROXY in the process environment, but
  tools.web.fetch.useTrustedEnvProxy is not enabled, so web_fetch will
  use direct connections and ignore the configured proxy. ...

status: secretDiagnostics contains the opt-in diagnostic; audit: findings include tools.web.fetch.env_proxy_without_use_trusted_env_proxy (warn).

2. NO_PROXY=* (all-bypass): the diagnostic is gone from all three surfaces.

  • doctor stdout/stderr: "useTrustedEnvProxy is not enabled" absent, "web_fetch will use direct connections" absent
  • status: "secretDiagnostics": []
  • audit: matching findings for tools.web.fetch.env_proxy_without_use_trusted_env_proxy: []

3. NO_PROXY=internal.example.com (partial): the diagnostic is present on all three surfaces — partial bypass lists do not suppress.

4. tools.web.fetch.enabled: false (no NO_PROXY): the diagnostic stays absent on all three surfaces, re-proven at this head.

Assertion sweep over the captured outputs: 10/10 target-string checks passed (3 positive-control present, 4 all-bypass absent, 3 partial present).

Local gates

  • corepack pnpm install --frozen-lockfile / corepack pnpm build: exit 0 with Node v24.15.0
  • node scripts/run-oxlint.mjs on the 4 touched files: 0 warnings, 0 errors
  • oxfmt --check on the 4 touched files: clean
  • pnpm tsgo:core and pnpm tsgo:core:test: exit 0
  • git diff --check upstream/main...HEAD: clean

What was not tested

  • A packaged npm/tarball install path. The proof above builds this PR head from source and runs the built dist/entry.js CLI.
  • Per-target NO_PROXY routing behavior after the opt-in is enabled (sibling web_fetch useTrustedEnvProxy ignores NO_PROXY env variable #93807 owns that surface). This PR only recognizes the bare NO_PROXY=* all-bypass value in the diagnostic gate.

Risks / Mitigations

  • Risk: Diagnostic noise for operators who explicitly set useTrustedEnvProxy: false. Mitigation: Matches runtime semantics (=== true gate); message is informational and points at the trade-off.
  • Risk: The resolver lives under src/gateway/ but its subject is tools.web.fetch.*. Mitigation: Mirrors the [Feature]: doctor/status should warn when OPENCLAW_GATEWAY_TOKEN in ~/.openclaw/.env overrides gateway.auth.token #74271 precedent path for ease of review. Easy to move in a follow-up if the maintainer prefers a different placement.
  • Risk: Accidentally suppressing the diagnostic for normal proxy-env users. Mitigation: Suppression happens only for tools.web.fetch.enabled: false or the exact bare NO_PROXY=* / no_proxy=* value that matchesNoProxy() treats as bypass-everything. Positive control and partial-NO_PROXY built-CLI runs plus the per-surface positive tests prove normal proxy users still see the warning.

@nxmxbbd
nxmxbbd requested a review from a team as a code owner June 23, 2026 18:33
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime commands Command implementations size: L labels Jun 23, 2026
…seTrustedEnvProxy

Surface a doctor / status / security-audit warning when HTTP_PROXY,
HTTPS_PROXY, http_proxy, or https_proxy is present in the Gateway
process environment while tools.web.fetch.useTrustedEnvProxy is not
enabled. web_fetch silently uses direct connections in that case,
leading to confusing timeout failures on networks that block direct
egress (e.g. behind a corporate firewall or regional proxy).

Detection delegates to hasEnvHttpProxyAgentConfigured() from
src/infra/net/proxy-env.ts so the warning gate mirrors what undici's
EnvHttpProxyAgent would actually pick up at runtime: lowercase takes
precedence over uppercase, empty lowercase shadows uppercase as
intentional unset, and ALL_PROXY is intentionally not counted because
EnvHttpProxyAgent does not honor it for HTTP/HTTPS.

The change adds a diagnostic only; web_fetch routing and the SSRF
DNS-pinning boundary are unchanged. Mirrors the prior openclaw#74271 pattern
(warn when OPENCLAW_GATEWAY_TOKEN env shadows gateway.auth.token
config) so the diagnostic appears in openclaw doctor, openclaw status,
and openclaw security audit --deep.

Fixes openclaw#95560.
@clawsweeper

clawsweeper Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed July 16, 2026, 6:58 AM ET / 10:58 UTC.

Summary
The PR adds shared diagnostics to doctor, status, and deep security audit when HTTP(S) proxy environment variables are present but web_fetch trusted-environment proxy use is not enabled.

PR surface: Source +122, Tests +556. Total +678 across 7 files.

Reproducibility: yes. for the diagnostic condition: source inspection and built-CLI output establish that HTTP(S) proxy variables are ignored by the per-tool path without the opt-in. The original blocked-egress timeout itself was not demonstrated against a live corporate or regional proxy.

Review metrics: 2 noteworthy metrics.

  • Diagnostic surfaces: 3 added. Doctor, status, and deep security audit must remain semantically aligned because operators may encounter any one of them first.
  • Runtime behavior changes: 0. The patch only emits guidance, but that guidance can still cause an operator to select a security-sensitive routing mode.

Stored data model
Persistent data-model change detected: migration/backfill/repair: src/commands/doctor-security.test.ts, unknown-data-model-change: src/commands/doctor-security.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🦐 gold shrimp
Proof: 🦞 diamond lobster
Patch quality: 🦐 gold shrimp
Result: needs maintainer review before merge.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Rebase onto current main and cover managed proxy.enabled routing in the resolver and all three surface tests.
  • Obtain proxy/security-owner confirmation for the preferred remediation wording and routing hierarchy.

Risk before merge

  • [P1] When managed proxy routing is active, this diagnostic may falsely say that web_fetch is using direct connections and may prompt operators to enable a separate trust mode that delegates DNS pinning to the upstream proxy.

Maintainer options:

  1. Account for managed routing before merge (recommended)
    Rebase onto current main, resolve the canonical managed-proxy state through its existing owner helper, and add suppression or revised remediation tests across all three diagnostic surfaces.
  2. Accept legacy guidance explicitly
    Merge only if the proxy/security owner confirms that encouraging the per-tool trust opt-in remains intentional even when managed proxy routing is active.
  3. Pause the diagnostic
    Close or defer this PR if maintainers want the managed proxy path to replace environment-variable opt-in guidance rather than maintain parallel diagnostics.

Next step before merge

  • A proxy/security owner should first choose the canonical remediation and routing hierarchy; the contributor can then make the bounded resolver and test update on this branch.

Maintainer decision needed

  • Question: When managed proxy.enabled routing is configured, should this diagnostic suppress itself and prefer the managed-proxy remediation rather than directing operators to tools.web.fetch.useTrustedEnvProxy?
  • Rationale: Both paths can provide proxy egress, but they have different ownership and DNS-pinning security contracts; code alone cannot determine which path maintainers want diagnostics to promote.
  • Likely owner: vincentkoc — Recent ownership of the managed proxy surface makes this the best available decision-routing candidate.
  • Options:
    • Prefer managed proxy (recommended): Suppress the legacy warning when managed proxy routing is active and recommend managed proxy configuration first for central egress control.
    • Keep both paths equal: Recognize both routing modes and present both remediations without describing managed-proxy traffic as direct.
    • Retain legacy-only guidance: Keep recommending the per-tool opt-in and explicitly accept the managed-proxy false-positive and security-guidance risk.

Security
Needs attention: The patch does not directly change network routing, but its remediation can unnecessarily encourage a security-sensitive proxy trust mode when managed proxy routing already applies.

Review findings

  • [P2] Account for the managed proxy before recommending the opt-in — src/gateway/web-fetch-proxy-source-conflict.ts:48-52
Review details

Best possible solution:

Use one canonical proxy-routing diagnostic that recognizes the managed proxy first, offers the legacy per-tool opt-in only when appropriate, suppresses false warnings when central routing is active, and covers that behavior in doctor, status, and deep-audit tests.

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

Yes for the diagnostic condition: source inspection and built-CLI output establish that HTTP(S) proxy variables are ignored by the per-tool path without the opt-in. The original blocked-egress timeout itself was not demonstrated against a live corporate or regional proxy.

Is this the best way to solve the issue?

No, not against current main: a shared warning is appropriate, but the resolver must first recognize the newer managed proxy path and avoid recommending a weaker or redundant routing mode.

Full review comments:

  • [P2] Account for the managed proxy before recommending the opt-in — src/gateway/web-fetch-proxy-source-conflict.ts:48-52
    Current main now has a managed proxy.enabled path for central runtime egress, but this resolver only checks useTrustedEnvProxy. With managed routing active and HTTP(S) proxy variables present, all three surfaces can incorrectly claim that web_fetch is connecting directly and steer the operator toward an unnecessary opt-in that changes DNS-pinning ownership. Resolve the canonical managed-proxy state and suppress or rewrite this warning when that path already owns routing.
    Confidence: 0.88

Overall correctness: patch is incorrect
Overall confidence: 0.88

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against b1e814f57a7c.

Label changes

Label changes:

  • add merge-risk: 🚨 security-boundary: The warning can unnecessarily steer managed-proxy users toward an opt-in that delegates DNS resolution and connection establishment beyond OpenClaw's normal pinned-resolution boundary.

Label justifications:

  • P2: This is a bounded diagnostic improvement with strong proof, but its current-main false-positive can misdirect proxy users and should be corrected before merge.
  • merge-risk: 🚨 security-boundary: The warning can unnecessarily steer managed-proxy users toward an opt-in that delegates DNS resolution and connection establishment beyond OpenClaw's normal pinned-resolution boundary.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (terminal): The PR provides after-fix built-CLI output from an isolated Node 24 setup across the three changed commands and four meaningful environment/configuration cases.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR provides after-fix built-CLI output from an isolated Node 24 setup across the three changed commands and four meaningful environment/configuration cases.
Evidence reviewed

PR surface:

Source +122, Tests +556. Total +678 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 4 124 2 +122
Tests 3 556 0 +556
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 680 2 +678

Security concerns:

  • [medium] Avoid unnecessary trusted-proxy remediation — src/gateway/web-fetch-proxy-source-conflict.ts:48
    The resolver does not recognize managed proxy routing before recommending useTrustedEnvProxy, whose documented contract delegates DNS resolution and connection establishment to the upstream proxy.
    Confidence: 0.86

What I checked:

Likely related people:

  • vincentkoc: Recent work and documentation around the managed network proxy make this person the strongest routing candidate for deciding how the new central proxy path should interact with legacy per-tool diagnostics. (role: recent managed-proxy contributor; confidence: medium; files: docs/security/network-proxy.md, src/infra/net/proxy-runtime.ts)
  • cosmicnet: Prior feature history around explicit web_fetch environment-proxy opt-in is directly related to the security and routing contract this warning describes. (role: trusted environment proxy feature contributor; confidence: medium; commits: 1e0e2788ef; files: src/agents/tools/web-fetch.ts, src/infra/net/fetch-guard.ts, docs/tools/web-fetch.md)
  • yelog: Merged work in fix(doctor): warn when OPENCLAW_GATEWAY_TOKEN env overrides gateway.auth.token config #74433 introduced the analogous shared doctor, status, and security-audit conflict resolver that this PR follows. (role: diagnostic-pattern introducer; confidence: high; commits: 7dc6007aeea2; files: src/gateway/auth-token-source-conflict.ts, src/commands/doctor-security.ts, src/security/audit-gateway-config.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.
Review history (2 earlier review cycles)
  • reviewed 2026-07-01T07:33:32.312Z sha 8533be9 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-16T08:23:16.519Z sha 01767c5 :: found issues before merge. :: [P2] Suppress the warning when NO_PROXY bypasses every target

@clawsweeper clawsweeper Bot added 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. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jun 24, 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. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. 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. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jun 24, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Jun 27, 2026
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Jul 1, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Jul 16, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jul 16, 2026
nxmxbbd added 2 commits July 16, 2026 18:28
…y target

matchesNoProxy() treats a bare * NO_PROXY value as bypass-everything, so
enabling tools.web.fetch.useTrustedEnvProxy in that environment would not
route any web_fetch request through the proxy and the remediation was
misleading. Gate the doctor/status/security-audit diagnostic on the same
all-bypass contract (lower-case no_proxy shadows upper-case, * entries
inside lists are still per-entry skipped and keep warning), and cover the
negative and permutation cases across all three surfaces.
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. label Jul 16, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the stale Marked as stale due to inactivity label Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations gateway Gateway runtime 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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

web_fetch: auto-enable useTrustedEnvProxy when HTTP_PROXY is detected

1 participant