Repository navigation
fix(secrets): fence lowercase exec proxy aliases - #140609
saladinyao-cyber wants to merge 5 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. What this changesThis PR publishes lowercase HTTP proxy aliases alongside the existing uppercase settings for Secret Egress commands. Example: A Gateway-hosted curl request inherits a conflicting https_proxy while Secret Egress is enabled.
Review scores
ProductKind: Bug fix · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain Keep this PR open: current main still lacks lowercase exec proxy aliases, and the patch addresses a demonstrated client failure without an identified correctness defect. Priority: P2 Decision needed
Before merge
FindingsNone. Agent review detailsHow this fits togetherThe Gateway creates a process-scoped proxy grant, merges its network settings into the exec child environment, and substitutes destination-bound credential sentinels before forwarding authorized requests. flowchart LR
A[Gateway exec] --> B[Process grant]
B --> C[Child proxy environment]
C --> D[curl request]
D --> E[Authenticated egress proxy]
E --> F[Destination and sentinel checks]
F --> G[HTTPS destination]
Technical reviewBest possible solution: If the routing owner accepts the upgrade impact, integrate lowercase aliases into main's existing environment owner and preserve its temporary-artifact filtering. Do we have a high-confidence way to reproduce the issue? Current main supplies only uppercase aliases, so a lowercase-preferring client can retain an inherited route; the contributor reports the matching deployed curl failure and recovery, but this review ran no target code. Is this the best way to solve the issue? Publishing both cases at the existing grant owner is a focused repair; integration now belongs in main's extracted environment helper rather than restoring an inline environment map. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8756ab191156. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +3, Tests +409, Docs +2, Other -1. Total +413 across 7 files. Added test files: 1. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (19 earlier review cycles; latest 8 shown)
Reviewed November 9, 2026, 10:28 PM ET / November 10, 2026, 03:28 UTC (Revision 20). |
64c365a to
c1e7700
Compare
Redacted real-client upgrade proof (2026-09-09)The exact patch in this PR was rebuilt on the released OpenClaw 2026.9.3 baseline and deployed to an existing Gateway installation with secret egress already enabled. The deployed commit has the same stable patch-id as this PR head ( Reproduction and observed behavior
Verification
All evidence above is deliberately redacted: no credential value, proxy address, private endpoint, account identifier, or private network address is included. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Requesting CODEOWNER review from @openclaw/openclaw-secops. The remaining decision is whether enabled Secret Egress installations should consistently route lowercase-proxy clients through the existing authenticated, HTTPS-only, destination-allowlisted proxy. This PR preserves Please confirm whether this scoped compatibility impact is acceptable, or identify a supported lowercase-client route that must remain exempt. |
|
@clawsweeper re-review PR body now incorporates the linked redacted live v2026.9.3 Gateway client proof and states the exact remaining |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
🦞👀 Re-review progress:
|
c1e7700 to
41f2c97
Compare
|
Requesting refreshed CODEOWNER review from @openclaw/openclaw-secops on head The compatibility decision is unchanged and now has direct real-client regression coverage: when Secret Egress is explicitly enabled, lowercase-proxy clients use the same authenticated, HTTPS-only, destination-allowlisted loopback route as uppercase-proxy clients. Fresh local evidence on this head: 68/68 focused tests, including real lowercase-only curl, lowercase precedence, both bypass aliases, revocation, traffic denial, and disabled environment mapping; core/core-test typecheck, focused oxlint/format, max-lines, diff check, |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
81b15f4 to
ffcb199
Compare
|
@vincentkoc — could you or the Secret Egress routing owner review the enabled-mode compatibility decision for this current head (3cfefcf)? The refreshed CI jobs pass, and the remaining openclaw/security-sensitive-review and final ci-gate statuses explicitly require a maintainer approval of this revision. The change intentionally makes inherited lowercase proxy variables follow the existing Secret Egress process grant when enabled; requests to excluded destinations or non-loopback plaintext HTTP may then be refused. Disabled mode and the existing authorization/revocation policy are not being expanded. If this documented upgrade tradeoff is acceptable, please record that decision and complete the repository current-SHA security approval flow (including /allow-security-sensitive-change if that is the required maintainer command). If not, please identify the acceptable routing boundary so I can revise narrowly. No contributor CI rerun or approval can substitute for your decision. Thank you. |
|
@vincentkoc — following up on current head 3cfefcf. Could you or the Secret Egress routing owner confirm whether the documented enabled-mode proxy-routing change is acceptable? The test jobs pass; the remaining security and final gates explicitly require maintainer approval of this revision. If acceptable, please complete the current-revision approval flow. If not, please identify the routing boundary you would accept so I can revise narrowly. Thank you. |
|
@vincentkoc — brief follow-up on unchanged head |
|
@steipete — following the merge of #178080, could you confirm the intended exec-side proxy-variable policy for this PR? #178080 addresses forwarding from Secret Egress through the Gateway upstream proxy; #140609 addresses lowercase proxy aliases in the child environment that can route clients around Secret Egress. The inspected #178080 diff does not cover that alias handling. Is the enabled-mode alias fencing proposed here still the desired behavior with the new upstream routing, or should it be revised? If someone else owns this decision, please point me to them. Once the direction is confirmed, I can reconcile this conflicting branch with current main, verify the combined behavior, and seek fresh security approval for the updated head. No code push or CI rerun is being made just to prompt review. Thank you. |
|
@vincentkoc — could you help confirm the intended security boundary for lowercase proxy aliases in protected exec, or point me to the right reviewer? Following #178080, the open question is whether child-process lowercase proxy aliases should be fenced as proposed here so clients cannot route around Secret Egress. The upstream-forwarding change and this child-environment change address different boundaries. I am holding the rebase and further validation until that direction is clear; any updated head would need fresh security approval. Thank you. |
What Problem This Solves
Gateway Secret Egress clients that prefer lowercase proxy variables can choose an inherited route instead of the authenticated, process-scoped Gateway proxy. This change publishes all four HTTP proxy aliases with the same managed URL.
User Impact
For installations that enable Secret Egress, lowercase-preferring clients use the same authenticated and destination-filtered route as uppercase-preferring clients. Requests excluded by traffic policy, or plaintext HTTP outside the existing literal-loopback exception, can newly fail instead of using an inherited route. The operator guide now names both alias cases and explains that upgrade impact. Disabled behavior, NO_PROXY/no_proxy, ALL_PROXY/all_proxy, authorization and revocation are unchanged.
Why This Change Was Made
The process grant is the existing owner of managed exec network settings. The production change remains three lines (two aliases and an ownership comment); it does not add a second routing owner or change the existing plaintext-loopback policy. Tests exercise real local curl and final spawn, bypass, denial and revocation. The integration test uses the existing host-broker-capable test owner.
Evidence
Current head:
3cfefcf012dd8302efcda327c1b26eac2ea640b3; rebased onto5837209ed1bafeee2385c0827d76e9d8af6c19bbon October 5 (the previous base was 2,473 commits behind). The rebase was conflict-free andgit range-diffshows the three original commits unchanged (identical stable patch IDs). Upstream has since madewriteSecretStoreEntryasync, which left a floating promise in the new integration test: oxlint flaggedno-floating-promises, and the test failed 3 of 10 cases withSTATE_DATABASE_READ_ADMISSION_INVALIDATED. A fourth commit,ffcb19990a1, adds oneawaitand makes no production change. A fifth commit,3cfefcf012d, handles the newcheck-test-mock-exportsratchet: editingbash-tools.exec.store-env.test.tsinvalidated its baseline hash, so the existing registry mock now has a// mock-isolation:reason, and the stale baseline entry is pruned (config/test-mock-exports-baseline.txt, -1 line). Scope is seven files, +420/-7, and the production change is still three lines.Current-head focused proof
Linux / Node 24.20.0 / pnpm 12.5.1 / frozen lockfile from the new base:
scripts/test-projects.mtsoverbash-tools.exec.egress.integration.test.ts,bash-tools.exec.store-env.test.tsandproxy-server.test.ts: 2 files / 20 tests passed plus 1 file / 44 tests passed, exit 0. Before theawaitfix, the same command failed 3 tests.oxfmt --checkandrun-oxlint.mjson the six changed files: passed.git diff --check: passed.origin/main, these passed:check-test-mock-exports(10,775 factories), max-lines, line-cap, assertion-safety, database-worker and test-timeout-race ratchets,config:docs:checkandplugins:inventory:check.store-envwas re-run after the comment change: 10/10 passed.tsgocore (tsconfig.core.json): passed. Core-test type shards includingagents-root,agents-tools,agents-other,gateway-*,infra,state-logging,servicesandother: passed. This is not the fullcheck:changedrun.The previous CI run (36722409931, head
81b15f43) failed in three test lanes (Gateway shutdown call count, update-CLI captured cwd, and a 90-second Gateway catalog-startup timeout) and in the aggregate gate. Those lanes are outside this six-file diff. This push re-runs hosted CI against the current base; its result supersedes that run. Current-revision maintainer and security approval is still required.Retained validation before this rebase (not rerun on the current head)
The following evidence was completed before the September 30 evening rebase, for the prior candidate ending at
abf1283166b; the complete checks and build are retained evidence, not new current-head executions:pnpm check:changed: exit 0 (2026-09-30 10:50 HKT), including core types, all 27 core-test type graphs, all five core lint stripes, script lint and architecture guards. Knip 6.32.2 production/full-tree/script scans each passed with zero entries.pnpm build:strict-smoke: exit 0; all 158 public plugin SDK subpaths verified.The initial registry-fetch failure and interrupted checks were not counted as passes. The rebase did not directly overlap the six PR files, but upstream host-exec code changed; the current-head real-spawn and environment tests above exercise the affected boundary. Neither retained validation nor local focused proof substitutes for hosted CI or current-head security approval.
Prior published real-behavior evidence (historical, not a new deployment)
A redacted real Gateway-hosted curl observation on an enabled installation changed from HTTP 401 through the inherited lowercase route to HTTP 200 through Secret Egress after the alias fix: #140609 (comment)
The previously published isolated official 2026.9.5 runtime comparison used synthetic HTTPS endpoints and a copied runtime with only the alias assignments changed:
{"case":"conflicting-lowercase","original":{"httpCode":"000","exitCode":7,"decoyHits":1,"originHits":0},"two-alias-copy":{"httpCode":"200","exitCode":0,"decoyHits":0,"originHits":1,"substituted":[true]}} {"case":"no_proxy-or-NO_PROXY-bypass","original":"401","two-alias-copy":"401","substituted":[false]} {"case":"explicit-revokeRun","original":407,"two-alias-copy":407}These are historical synthetic/release-runtime and redacted live observations, not a claim that this candidate is deployed.
Review Resolutions and Remaining Decisions
docs/gateway/secrets/secret-store-and-egress.md: all four aliases, enabled-mode upgrade refusals, unchanged bypass variables, and the existing literal-loopback exception are explicit.Validation Boundaries
POSIX real-spawn integration is skipped on Windows. The new tests do not independently prove remote Node/Sandbox transport, PTY/background cancellation, full Gateway authority-close delivery, or every HTTP upgrade/TLS absolute-form negative case. Existing HTTP regression coverage and static review are not relabeled as new live deployment proof.