fix(runtime-host): restrict Windows Local IPC ACL - #3182
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan includes up to 3 reviews per rolling hour; 0 remain after this review. 📝 WalkthroughProblem solvedThis PR restricts Windows Local IPC access to the current user and The test harness also removes temporary Windows accounts when fixture startup or cleanup fails. Source of truthThe PR extends the existing runtime-host endpoint setup and Windows IPC trust probe. It does not create a separate production path. The PowerShell script provides the Windows-specific ACL operation required by the existing endpoint lifecycle. Solution size and complexityThe solution is coherent and focused:
The added PowerShell invocation and cleanup nesting are necessary for ACL enforcement and reliable failure handling. No deletion or simplification is apparent without weakening security coverage or fixture cleanup guarantees. Validation and risksValidation includes:
Required-check status remains unverified without direct CI evidence. Review-relevant risks
WalkthroughWindows runtime-host endpoints now apply explicit named-pipe ACLs through PowerShell. The IPC trust probe tests foreign-user access for ChangesWindows named-pipe security
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The Windows Local IPC ACL and test-account cleanup changes are localized, and no actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant RuntimeHostEndpoint
participant PowerShell
participant WindowsNamedPipe
RuntimeHostEndpoint->>PowerShell: Execute ACL script with pipe path
PowerShell->>WindowsNamedPipe: Restrict access to current user and SYSTEM
PowerShell-->>RuntimeHostEndpoint: Return execution result
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
PR Summary by QodoRestrict Windows Local IPC named pipe ACLs
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1.
|
623faff to
4283042
Compare
Apply a protected current-user DACL before Local IPC admission so foreign connections cannot enter the listener. Extend the Windows probe across every pipe direction and make temporary-account cleanup independent from process startup and teardown failures. Generated-by: Codex
4283042 to
86727ac
Compare
|
I have manually reviewed this PR and confirmed that its impact scope is relatively small. I take full responsibility for this, so I am going to merge it. |
Summary
English
Windows Local IPC now applies a protected DACL for the current user and SYSTEM before granting Local Owner authority. After forcing replacement pipe instances, the Windows trust check covers read-only, write-only, and duplex access from a separate standard user.
The test harness keeps temporary-account deletion independent from fixture startup and cleanup failures, and reports a deletion failure instead of silently leaving the account behind.
简体中文
Windows Local IPC 现在会在授予 Local Owner authority 前,为当前用户和 SYSTEM 设置受保护的 DACL。Windows 信任检查会先迫使 listener 创建 replacement pipe instances,再使用独立标准用户验证只读、只写和双向访问。
测试工具会独立执行临时账户删除,不受 fixture 启动或清理失败影响;账户删除失败也会被明确报告,不再静默遗留账户。
Follow-up to #3179
Verification
English
npm run build:testnpm --workspace @maka/runtime-host run typechecknpm --workspace @maka/runtime-host run test:dist— 962 passedgit diff --check简体中文
npm run build:testnpm --workspace @maka/runtime-host run typechecknpm --workspace @maka/runtime-host run test:dist— 962 passedgit diff --checkAI use
Tool(s) and scope: OpenAI Codex implemented the Windows endpoint ACL and expanded trust harness under maintainer direction.
Checklist
Does this PR entail a change in behavior?