Repository navigation
fix: harden desktop boundaries and bound native operations - #303
Conversation
[High impact] The changes since the previous review appear safe to merge. SummaryThis PR tightens process and file identity checks, shares trace recording limits across processes, and bounds native Windows operations. Since the previous review:
Reviews (8) · Last reviewed commit: "refactor: align native security types wi..." · Reviewed by Greptile |
All three findings are addressed in edc30d6, with ledger overhead reduced in bb50b17. Each inline thread has its own verification details and is resolved. Native Linux, macOS, and Windows focused tests and clippy pass; the full host library suite also passes. All 44 checks passed on bb50b17; Greptile reviewed that commit at 5/5 with no new actionable findings. The PR description records the measured trace overhead and the separately blocked Linux audit; these fixes do not claim that audit is complete. |
Desktop operations could accept insufficiently verified process and file identities, retain excessive trace or rendering input, or wait indefinitely in native Windows calls. This change strengthens those boundaries and bounds the affected operations.
The final patch covers process-owned CDP listener checks, bounded trace reads and shared recording budgets, Windows private storage and native-operation limits, macOS clipboard-helper identity, Linux clipboard-owner records and RENDER reply bounds, private test fixtures, and metadata-only Jev evidence. It incorporates the Linux cleanup from #302 and preserves its removed inspector and remote-box tooling. Relocated trace subprocess tests now select the intended tests and assert that one child test actually ran.
Validation on the cleanup integration commit:
Security audit limits: the original completed scan covered main. The separate Linux scan was blocked by provider access and did not complete. Targeted repairs address private temporary fixtures and group-write permission assumptions, without claiming two-account or NSS/domain validation. Label-text privacy remains unresolved. The remote-box setup script was deleted by #302; it was not independently validated as a security repair. A timed-out legacy capture may retain one worker until the OS call returns. Trace recording retains the previously measured admission overhead.
The pre-commit wrapper contains permanent deletion prohibited by repository instructions; equivalent host and native checks were run directly before bypassing it. This PR targets the Linux branch; Linux-to-main remains separate.