fix(path): harden root reads and store keys - #103
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 2, 2026, 7:45 PM ET / 23:45 UTC. ClawSweeper reviewWhat this changesThe branch hardens root-bounded reads and root-file opens against symlink and swap races, makes read opens nonblocking where supported, and rejects ambiguous FileStore keys and Windows device-name spellings. Merge readiness⛔ Blocked until real behavior proof is added - 5 items remain Keep this PR open. The prior intermediate-symlink finding is addressed in the current head with focused regression coverage, but the PR still lacks after-fix real behavior evidence and the Node 24 Windows check is failing without an inspected failure log. Priority: P2 Review scores
Verification
How this fits togetherRoot is fs-safe’s capability boundary for application paths: callers supply an untrusted relative or in-root absolute path, which is resolved and opened under confinement before data reaches file-reading APIs. FileStore builds on that boundary to map caller keys to files safely across platforms. flowchart LR
A[Caller path or store key] --> B[Root and FileStore validation]
B --> C[Root path component resolution]
C --> D[Symlink and root-boundary policy]
D --> E[Descriptor open and identity comparison]
E --> F[Safe file data or typed error]
B --> G[Portable filename and key checks]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the centralized hardening only after the Windows Node 24 failure is resolved and the contributor supplies redacted after-fix runtime evidence showing default rejection, explicit in-root following, and at least one race/FIFO protection path. Do we have a high-confidence way to reproduce the issue? Yes, at source level: the added stress test creates the intermediate-symlink, parent-swap, and FIFO scenarios directly. This read-only review did not execute the branch or inspect a live proof artifact. Is this the best way to solve the issue? Yes, conditionally: centralizing the policy in Root path resolution and descriptor identity checks is the narrowest maintainable boundary fix, provided Windows behavior and real runtime results confirm the intended contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4696341685a9. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
Summary
Verification
pnpm checkpnpm test:securitygit diff --check