security: block Unicode dot homoglyph hidden-file bypasses - #397
Conversation
|
Warning Review limit reached
Next review available in: 13 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. 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)
Comment |
Security defect
The hidden-file gate recognized only ASCII
.. Names beginning with U+3002, U+FF0E, or U+FF61 could therefore reach generated directory indexes even though they are visually confusable dot-prefixed sensitive files.Test-first evidence
The branch began with a production-shaped RED regression:
HiddenFileSecurityTestcreated each confusable-dot filename and requiredprocess_ignore_fileto classify it as hidden. The failure occurred at the product assertion on protected-base production code, not during fixture setup. A follow-up test commit strengthened the classifier contract for ASCII., all three evidenced Unicode dot confusables, ordinary visible names, and the empty-string boundary before the production repair.Repair
String.isHiddenFile()now owns hidden-prefix classification and recognizes., U+3002, U+FF0E, and U+FF61. The same classifier is used consistently by ignore-file generation, recursive traversal, and directory rendering, preserving the existing ASCII-dot behavior while preventing the homoglyph bypass at every entry path.Exact-head proof
Exact head
847c85b8780e5f4e4b996e8f45d6df3e6e8690c0is mergeable against protected basef4038883078262be061a9a525350b71fa0293bbdand has completed hosted validation successfully:CIrun31295839694: success;SAST Semgreprun31295839692: success;Security Scanrun31295839697: success.No inline review threads or formal reviews exist at this exact head yet; draft status is being removed only after the production repair and exact-head gates are green so independent review can run on the maintained candidate.
Duplicate consolidation
This PR consolidates the stronger regression coverage from duplicate security reports #382 and #391 onto current
masterancestry. Those older branches should not be merged independently once this maintained exact-head repair is accepted.Merge contract
Do not merge unless the unchanged exact head satisfies every repository-required CI/security/review gate, has zero valid unresolved findings, and has qualifying independent non-author approval where repository policy requires it. Do not bypass branch protection or weaken tests.