fix(security): suppress unhandled stdout/stderr stream errors in install policy#100413
fix(security): suppress unhandled stdout/stderr stream errors in install policy#100413cxbAsDev wants to merge 1 commit into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 5, 2026, 2:41 PM ET / 18:41 UTC. Summary PR surface: Source +2, Tests +84. Total +86 across 2 files. Reproducibility: yes. at source level: current main has stdout/stderr Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Handle stdout/stderr stream errors through the same settle-and-reject path as child process errors so Do we have a high-confidence way to reproduce the issue? Yes at source level: current main has stdout/stderr Is this the best way to solve the issue? No. Adding listeners is the right direction, but no-op listeners are not the best fix for a security policy boundary; the stream errors should reject so the existing fail-closed path handles them. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3f380635f59b. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +2, Tests +84. Total +86 across 2 files. View PR surface stats
Security concerns:
What I checked:
Likely related people:
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. How this review workflow works
|
Source: #100413 Co-authored-by: 陈宪彪0668000387 <[email protected]>
* fix(agents): harden LSP process failures Source: #100450 Co-authored-by: morluto <[email protected]> * fix(sandbox): report effective workspace layout Sources: #100435, #100439 Co-authored-by: Aniruddha Adak <[email protected]> Co-authored-by: ZengWen-DT <[email protected]> * fix(security): fail install checks on stream errors Source: #100413 Co-authored-by: 陈宪彪0668000387 <[email protected]> * fix(android): normalize all-day calendar events Source: #100032 Co-authored-by: NianJiuZst <[email protected]> * fix(ios): serialize push-to-talk lifecycle Source: #99942 Co-authored-by: NianJiuZst <[email protected]> * fix(talk): reject inherited provider names Source: #99849 Co-authored-by: zenglingbiao <[email protected]> * fix(android): stop voice capture in background Source: #99840 Co-authored-by: xialonglee <[email protected]> * fix(cron): preserve fallback result classification Source: #99913 Co-authored-by: jincheng-xydt <[email protected]> * fix(google): bound Vertex response decompression Source: #99812 Co-authored-by: 黄剑雄0668001315 <[email protected]> * fix(plugins): report malformed discovery JSON Source: #99892 Co-authored-by: 陈宪彪0668000387 <[email protected]> * test(sandbox): configure non-default workspace fixture * test: fix small-fix batch validation --------- Co-authored-by: morluto <[email protected]> Co-authored-by: ZengWen-DT <[email protected]> Co-authored-by: 陈宪彪0668000387 <[email protected]> Co-authored-by: NianJiuZst <[email protected]> Co-authored-by: zenglingbiao <[email protected]> Co-authored-by: xialonglee <[email protected]> Co-authored-by: jincheng-xydt <[email protected]> Co-authored-by: 黄剑雄0668001315 <[email protected]>
|
Thanks @cxbAsDev — your stream-error finding was incorporated into the fail-closed canonical fix in #100483, landed as aaf5ab9. The landed version covers stdout, stderr, and stdin failures, kills the policy process tree where required, and proves partial allow output cannot escape a later stream failure. Contributor credit is preserved. Closing this superseded PR. |
* fix(agents): harden LSP process failures Source: openclaw#100450 Co-authored-by: morluto <[email protected]> * fix(sandbox): report effective workspace layout Sources: openclaw#100435, openclaw#100439 Co-authored-by: Aniruddha Adak <[email protected]> Co-authored-by: ZengWen-DT <[email protected]> * fix(security): fail install checks on stream errors Source: openclaw#100413 Co-authored-by: 陈宪彪0668000387 <[email protected]> * fix(android): normalize all-day calendar events Source: openclaw#100032 Co-authored-by: NianJiuZst <[email protected]> * fix(ios): serialize push-to-talk lifecycle Source: openclaw#99942 Co-authored-by: NianJiuZst <[email protected]> * fix(talk): reject inherited provider names Source: openclaw#99849 Co-authored-by: zenglingbiao <[email protected]> * fix(android): stop voice capture in background Source: openclaw#99840 Co-authored-by: xialonglee <[email protected]> * fix(cron): preserve fallback result classification Source: openclaw#99913 Co-authored-by: jincheng-xydt <[email protected]> * fix(google): bound Vertex response decompression Source: openclaw#99812 Co-authored-by: 黄剑雄0668001315 <[email protected]> * fix(plugins): report malformed discovery JSON Source: openclaw#99892 Co-authored-by: 陈宪彪0668000387 <[email protected]> * test(sandbox): configure non-default workspace fixture * test: fix small-fix batch validation --------- Co-authored-by: morluto <[email protected]> Co-authored-by: ZengWen-DT <[email protected]> Co-authored-by: 陈宪彪0668000387 <[email protected]> Co-authored-by: NianJiuZst <[email protected]> Co-authored-by: zenglingbiao <[email protected]> Co-authored-by: xialonglee <[email protected]> Co-authored-by: jincheng-xydt <[email protected]> Co-authored-by: 黄剑雄0668001315 <[email protected]>
What Problem This Solves
runPolicyCommandattachesdatalisteners tochild.stdoutandchild.stderr, but does not attacherrorlisteners. If either stream emits anerrorevent, the unhandled error can crash the process or leave the policy command hanging.Why This Change Was Made
Add no-op
errorhandlers to both stdout and stderr streams before the data handlers, mirroring the existing stdin error handling pattern. This prevents unhandled stream errors from propagating as uncaught exceptions.User Impact
More robust install policy execution: transient stream read errors no longer crash the OpenClaw process during skill/plugin installs.
Evidence
src/security/install-policy.test.tsthat mocksspawn, emitserrorevents on both stdout and stderr, and verifiesrunInstallPolicystill resolves successfully.mainwith an unhandledError: stdout read failedand times out, and passes with this fix.oxlintpasses on the changed files.