fix: guard debug proxy CONNECT under managed proxy#77010
Conversation
|
Codex review: passed. Summary Reproducibility: yes. Source inspection on current main shows direct HTTP forwarding and CONNECT net.connect() can run while managed proxy mode is active, against the documented managed-proxy egress guardrail. Next step before merge Security Review detailsBest possible solution: Land the repaired head after exact-head automerge gates remain green, preserving the guard, docs, tests, and changelog. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection on current main shows direct HTTP forwarding and CONNECT net.connect() can run while managed proxy mode is active, against the documented managed-proxy egress guardrail. Is this the best way to solve the issue? Yes. The repaired PR guards the narrow direct-upstream call sites before socket creation, documents the diagnostics override, and adds regression coverage for helper behavior plus CONNECT and HTTP denial paths. What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against e3cba91ef059. |
b117925 to
f1f7ffc
Compare
|
Opened a tiny stacked PR for the test-fixture finding here: #77061 It moves the managed-proxy debug proxy test fixture from repo-relative .tmp-* paths to a per-test root under os.tmpdir(), so generated root-ca-key.pem/root-ca.pem are not created under the checkout if the test is interrupted. Validation:
|
|
/clawsweeper automerge |
|
🦞✅ Source: What merged:
Automerge notes:
The automerge loop is complete. Automerge progress:
|
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Disables debug proxy CONNECT upstream forwarding while OpenClaw managed proxy mode is active, with an explicit env override for approved diagnostics, and updates docs/tests accordingly.
Changes:
- Add a managed-proxy guard (
assertDebugProxyDirectConnectAllowed) that blocks CONNECT upstream forwarding unless an override env var is set. - Record and return a 502 response when CONNECT is blocked by policy.
- Add managed-proxy regression tests and document the behavior in CLI/security docs and changelog.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/proxy-capture/proxy-server.ts | Introduces managed-proxy CONNECT policy guard + enforcement in the CONNECT handler. |
| src/proxy-capture/proxy-server.managed-proxy.test.ts | Adds regression coverage for allow/deny behavior and server-level CONNECT rejection. |
| docs/security/network-proxy.md | Documents CONNECT forwarding being disabled by default under managed proxy mode. |
| docs/cli/proxy.md | Documents the new default behavior and the diagnostic override env var. |
| CHANGELOG.md | Notes the fix and the override knob for approved diagnostics. |
f1f7ffc to
aaa52a7
Compare
* 'main' of https://github.com/openclaw/openclaw: fix: guard debug proxy CONNECT under managed proxy (#77010)
Summary: - The PR adds a managed-proxy-aware debug proxy direct-upstream guard, a diagnostics override env var, regression tests, docs, and a changelog entry. - Reproducibility: yes. Source inspection on current main shows direct HTTP forwarding and CONNECT net.connect() can run while managed proxy mode is active, against the documented managed-proxy egress guardrail. Automerge notes: - Ran the ClawSweeper repair loop before final review. - Included post-review commit in the final squash: fix(clawsweeper): address review for automerge-openclaw-openclaw-7701… Validation: - ClawSweeper review passed for head aaa52a7. - Required merge gates passed before the squash merge. Prepared head SHA: aaa52a7 Review: openclaw#77010 (comment) Co-authored-by: jesse-merhi <79823012+jesse-merhi@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Summary: - The PR adds a managed-proxy-aware debug proxy direct-upstream guard, a diagnostics override env var, regression tests, docs, and a changelog entry. - Reproducibility: yes. Source inspection on current main shows direct HTTP forwarding and CONNECT net.connect() can run while managed proxy mode is active, against the documented managed-proxy egress guardrail. Automerge notes: - Ran the ClawSweeper repair loop before final review. - Included post-review commit in the final squash: fix(clawsweeper): address review for automerge-openclaw-openclaw-7701… Validation: - ClawSweeper review passed for head aaa52a7. - Required merge gates passed before the squash merge. Prepared head SHA: aaa52a7 Review: openclaw#77010 (comment) Co-authored-by: jesse-merhi <79823012+jesse-merhi@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
* 'main' of https://github.com/openclaw/openclaw: fix: guard debug proxy CONNECT under managed proxy (openclaw#77010)
Summary: - The PR adds a managed-proxy-aware debug proxy direct-upstream guard, a diagnostics override env var, regression tests, docs, and a changelog entry. - Reproducibility: yes. Source inspection on current main shows direct HTTP forwarding and CONNECT net.connect() can run while managed proxy mode is active, against the documented managed-proxy egress guardrail. Automerge notes: - Ran the ClawSweeper repair loop before final review. - Included post-review commit in the final squash: fix(clawsweeper): address review for automerge-openclaw-openclaw-7701… Validation: - ClawSweeper review passed for head aaa52a7f5fcb933a51b1995231d225a1cce1aed6. - Required merge gates passed before the squash merge. Prepared head SHA: aaa52a7f5fcb933a51b1995231d225a1cce1aed6 Review: openclaw/openclaw#77010 (comment) Co-authored-by: jesse-merhi <79823012+jesse-merhi@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Summary: - The PR adds a managed-proxy-aware debug proxy direct-upstream guard, a diagnostics override env var, regression tests, docs, and a changelog entry. - Reproducibility: yes. Source inspection on current main shows direct HTTP forwarding and CONNECT net.connect() can run while managed proxy mode is active, against the documented managed-proxy egress guardrail. Automerge notes: - Ran the ClawSweeper repair loop before final review. - Included post-review commit in the final squash: fix(clawsweeper): address review for automerge-openclaw-openclaw-7701… Validation: - ClawSweeper review passed for head aaa52a7f5fcb933a51b1995231d225a1cce1aed6. - Required merge gates passed before the squash merge. Prepared head SHA: aaa52a7f5fcb933a51b1995231d225a1cce1aed6 Review: openclaw/openclaw#77010 (comment) Co-authored-by: jesse-merhi <79823012+jesse-merhi@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Summary: - The PR adds a managed-proxy-aware debug proxy direct-upstream guard, a diagnostics override env var, regression tests, docs, and a changelog entry. - Reproducibility: yes. Source inspection on current main shows direct HTTP forwarding and CONNECT net.connect() can run while managed proxy mode is active, against the documented managed-proxy egress guardrail. Automerge notes: - Ran the ClawSweeper repair loop before final review. - Included post-review commit in the final squash: fix(clawsweeper): address review for automerge-openclaw-openclaw-7701… Validation: - ClawSweeper review passed for head aaa52a7f5fcb933a51b1995231d225a1cce1aed6. - Required merge gates passed before the squash merge. Prepared head SHA: aaa52a7f5fcb933a51b1995231d225a1cce1aed6 Review: openclaw/openclaw#77010 (comment) Co-authored-by: jesse-merhi <79823012+jesse-merhi@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Summary: - The PR adds a managed-proxy-aware debug proxy direct-upstream guard, a diagnostics override env var, regression tests, docs, and a changelog entry. - Reproducibility: yes. Source inspection on current main shows direct HTTP forwarding and CONNECT net.connect() can run while managed proxy mode is active, against the documented managed-proxy egress guardrail. Automerge notes: - Ran the ClawSweeper repair loop before final review. - Included post-review commit in the final squash: fix(clawsweeper): address review for automerge-openclaw-openclaw-7701… Validation: - ClawSweeper review passed for head aaa52a7. - Required merge gates passed before the squash merge. Prepared head SHA: aaa52a7 Review: openclaw#77010 (comment) Co-authored-by: jesse-merhi <79823012+jesse-merhi@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
* 'main' of https://github.com/openclaw/openclaw: fix: guard debug proxy CONNECT under managed proxy (openclaw#77010)
Summary: - The PR adds a managed-proxy-aware debug proxy direct-upstream guard, a diagnostics override env var, regression tests, docs, and a changelog entry. - Reproducibility: yes. Source inspection on current main shows direct HTTP forwarding and CONNECT net.connect() can run while managed proxy mode is active, against the documented managed-proxy egress guardrail. Automerge notes: - Ran the ClawSweeper repair loop before final review. - Included post-review commit in the final squash: fix(clawsweeper): address review for automerge-openclaw-openclaw-7701… Validation: - ClawSweeper review passed for head aaa52a7. - Required merge gates passed before the squash merge. Prepared head SHA: aaa52a7 Review: openclaw#77010 (comment) Co-authored-by: jesse-merhi <79823012+jesse-merhi@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
* 'main' of https://github.com/openclaw/openclaw: fix: guard debug proxy CONNECT under managed proxy (openclaw#77010)
Summary: - The PR adds a managed-proxy-aware debug proxy direct-upstream guard, a diagnostics override env var, regression tests, docs, and a changelog entry. - Reproducibility: yes. Source inspection on current main shows direct HTTP forwarding and CONNECT net.connect() can run while managed proxy mode is active, against the documented managed-proxy egress guardrail. Automerge notes: - Ran the ClawSweeper repair loop before final review. - Included post-review commit in the final squash: fix(clawsweeper): address review for automerge-openclaw-openclaw-7701… Validation: - ClawSweeper review passed for head aaa52a7. - Required merge gates passed before the squash merge. Prepared head SHA: aaa52a7 Review: openclaw#77010 (comment) Co-authored-by: jesse-merhi <79823012+jesse-merhi@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
* 'main' of https://github.com/openclaw/openclaw: fix: guard debug proxy CONNECT under managed proxy (openclaw#77010)
Summary
OPENCLAW_DEBUG_PROXY_ALLOW_DIRECT_CONNECT_WITH_MANAGED_PROXY=1Test Plan
OPENCLAW_LOCAL_CHECK=0 pnpm test src/proxy-capture/proxy-server.managed-proxy.test.ts src/proxy-capture/proxy-server.test.ts src/proxy-capture/runtime.test.ts src/proxy-capture/env.test.tspnpm format:check src/proxy-capture/proxy-server.ts src/proxy-capture/proxy-server.managed-proxy.test.ts docs/cli/proxy.md docs/security/network-proxy.md CHANGELOG.mdOPENCLAW_LOCAL_CHECK=0 pnpm check:changed