Skip to content

fix(security): revalidate directory identity after listing - #418

Merged
seonghobae merged 3 commits into
masterfrom
fix/revalidate-directory-after-listing-current
Aug 11, 2026
Merged

fix(security): revalidate directory identity after listing#418
seonghobae merged 3 commits into
masterfrom
fix/revalidate-directory-after-listing-current

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

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_directories verified a queued directory identity before listFiles, 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

  • RED: test-only head 293be2db36a5426dda80569d16c303b741909a2b; CI run 31464809206, job 93695403070; 71 tests completed with only testDirectoryReplacementAfterListingIsRejected failing.
  • A second test covers a directory whose post-listing identity becomes unreadable.
  • Exact-head GREEN: production head 331197bc72a8aae4a4534a47d2f187e677a2585a; CI 31465121453, SAST 31465121447, and Security Scan 31465121477 all completed successfully. CI includes JaCoCo coverage verification.
  • CodeRabbit combined status is successful; there are zero review threads and zero formal reviews.

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.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6c05fb36-0376-4718-97ec-c4554e9063e3

📥 Commits

Reviewing files that changed from the base of the PR and between c7357b7 and 331197b.

📒 Files selected for processing (2)
  • src/main/kotlin/html4tree/main.kt
  • src/test/kotlin/html4tree/MainTest.kt

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae
seonghobae marked this pull request as ready for review August 11, 2026 06:33
@seonghobae
seonghobae merged commit 59fb0ce into master Aug 11, 2026
28 checks passed
@seonghobae
seonghobae deleted the fix/revalidate-directory-after-listing-current branch August 11, 2026 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant