Fix inherited XDG env for exec subprocesses#85139
Conversation
|
Codex review: needs maintainer review before merge. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. at source level: current main derives PR rating Rank-up moves:
What the crustacean ranks mean
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. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land the policy, generated mirror, baseline, and regression tests once a maintainer explicitly accepts the trusted-parent-env boundary and the override hardening compatibility impact. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main derives Is this the best way to solve the issue? Yes, with maintainer approval: the PR changes the shared policy buckets instead of adding a bypass, keeps request overrides blocked, regenerates the macOS mirror, and adds focused regression coverage. The remaining question is policy ownership of the compatibility/security boundary, not a code-shape defect. Label changes:
Label justifications:
Security concerns:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 7f499643b232. |
|
ClawSweeper PR egg 🔥 Warming up: real-behavior proof passed; findings, security review, or rank-up moves are still in progress. Hatch commandComment Hatchability rules:
What is this egg doing here?
|
* fix exec xdg env inheritance * chore changelog xdg env fix
* fix exec xdg env inheritance * chore changelog xdg env fix
* fix exec xdg env inheritance * chore changelog xdg env fix
* fix exec xdg env inheritance * chore changelog xdg env fix
* fix exec xdg env inheritance * chore changelog xdg env fix
* fix exec xdg env inheritance * chore changelog xdg env fix
* fix exec xdg env inheritance * chore changelog xdg env fix
* fix exec xdg env inheritance * chore changelog xdg env fix
* fix exec xdg env inheritance * chore changelog xdg env fix
* fix exec xdg env inheritance * chore changelog xdg env fix
* fix exec xdg env inheritance * chore changelog xdg env fix
Summary
Fixes #84854.
Verification
node scripts/run-vitest.mjs src/infra/host-env-security.test.ts src/infra/host-env-security.policy-parity.test.ts src/infra/host-env-security.reported-baseline.test.tsnode scripts/generate-host-env-security-policy-swift.mjs --checkAUTOREVIEW_AUTO_TESTS=0 .agents/skills/autoreview/scripts/autoreview --mode autoaws, leasecbx_f1bec67ac152, runrun_c8171b0694bfBehavior addressed: inherited
XDG_CONFIG_HOME,XDG_CONFIG_DIRS, and other XDG base-directory variables were stripped from host exec subprocess environments even when they came from the trusted OpenClaw process environment.Real environment tested: AWS Crabbox Linux direct provider (
cbx_f1bec67ac152) with a liveopenclaw agent --localturn using OpenAI API auth and the real exec tool path.Exact steps or command run after this patch: ran a Crabbox script that set inherited
XDG_CONFIG_HOME,XDG_CONFIG_DIRS, andXDG_DATA_HOME, configured an isolated PI/OpenAI agent, asked the live agent to invoke exec once, and asserted the subprocess output contained the exact inherited values.Evidence after fix:
ASSERTION_PASSED issue-84854 XDG inheritance preserved through live agent execin Crabbox runrun_c8171b0694bf.Observed result after fix: the exec subprocess printed the configured inherited XDG values instead of
<unset>.What was not tested: full repository test suite; Telegram/Discord channel delivery was not needed for this exec environment inheritance bug.