fix(security): atomically replace generated index - #417
Conversation
|
Warning Review limit reached
Next review available in: 23 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Security defect
Protected
master@25d6fc44840ec2c25f3778780b21fef594a01ba4wrote a complete temporary index but replacedindex.htmlwithREPLACE_EXISTINGonly. The final replacement therefore did not request filesystem atomicity.Test-first proof
Exact test-only head
7a87c542917148f642d901df9b90f4bd6f9b48ecdefined the behavioral contract:Hosted RED: CI
31463228406, build job93690798636, failed atcompileTestKotlinbecause protected production exposed only the two-argumentwrite_index_fileand could not accept the move seam.Narrow repair
Exact current head
71aae66fce10c6af067c4b095d8294458351fdf6:Files.moveseam without changing callers;ATOMIC_MOVEalone, truthfully reflecting that Java ignores other options in atomic mode;AtomicMoveNotSupportedExceptionorFileAlreadyExistsException;REPLACE_EXISTINGis non-atomic;index.htmlthrough both provider-specific failure paths;finallycleanup and rethrows unrelated I/O failures.Exact-head evidence
Live base:
master@25d6fc44840ec2c25f3778780b21fef594a01ba4Ancestry: 4 ahead, 0 behind
Review threads: 0
CodeRabbit status: success
All repository-native exact-head gates are terminal success:
314641722773146417232831464172515This current-base line supersedes the atomic-replacement semantics in stale #393 and #403. #409 remains distinct because it also contains separate post-listing directory-identity work. Organization review/policy remains separate from repository-native checks.