fix(security): revalidate directory identity after listing - #418
Conversation
|
Warning Review limit reached
Next review available in: 10 seconds 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 |
Purpose
Preserve the unique post-listing directory-identity protection from stale mixed PR #409 on current protected
master, independently of the atomic index replacement already integrated through #417.Root cause and bounded fix
crawl_directoriesverified a queued directory identity beforelistFiles, but then trusted that path for ignore processing, index generation, and child enqueueing. A path replaced during enumeration could therefore supply a stale or attacker-selected snapshot. The fix re-reads identity immediately after listing and skips the snapshot when the identity is unreadable or differs.This narrows the Java
File/path-based check-use window; it does not claim descriptor-level race freedom that this API does not provide.Test-first evidence
293be2db36a5426dda80569d16c303b741909a2b; CI run31464809206, job93695403070; 71 tests completed with onlytestDirectoryReplacementAfterListingIsRejectedfailing.331197bc72a8aae4a4534a47d2f187e677a2585a; CI31465121453, SAST31465121447, and Security Scan31465121477all completed successfully. CI includes JaCoCo coverage verification.Maturity
The branch is three commits ahead and zero behind protected
master@c7357b71023663fa5c4a9dca73e74d6e0812e672. Code-owner approval gates are explicitly disabled for the solo-maintainer repository; readiness and merge remain subject to unchanged-head policy revalidation.