[codex] centralize filesystem boundary guards#8
Conversation
|
Codex review: needs real behavior proof before merge. Summary Reproducibility: yes. from source inspection: force pinned Python mode off, write to a nested missing parent with mkdir enabled, and swap the newly created parent to a symlink after fallback mkdir but before the path-based open. This read-only review did not execute the PR branch. Real behavior proof Next step before merge Security Review findings
Review detailsBest possible solution: Land the guard centralization only after the fallback code guards the actual created parent directory, adds regression coverage for that race, and includes real behavior proof from the contributor's setup. Do we have a high-confidence way to reproduce the issue? Yes, from source inspection: force pinned Python mode off, write to a nested missing parent with mkdir enabled, and swap the newly created parent to a symlink after fallback mkdir but before the path-based open. This read-only review did not execute the PR branch. Is this the best way to solve the issue? No; shared guard primitives are the right direction, but this implementation should recreate/assert a guard for parentPath after mkdir before opening, renaming, or cleaning up fallback paths. Full review comments:
Overall correctness: patch is incorrect Security concerns:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 55327c893031. |
Summary
pnpm lint:fs-boundaryguard so the known raw fallback patterns do not drift back in.Validation
pnpm checkpnpm test test/findings-regression.test.ts