Skip to content

security: block Unicode dot homoglyph hidden-file bypasses - #397

Merged
seonghobae merged 3 commits into
masterfrom
fix/unicode-hidden-file-homoglyphs
Aug 9, 2026
Merged

security: block Unicode dot homoglyph hidden-file bypasses#397
seonghobae merged 3 commits into
masterfrom
fix/unicode-hidden-file-homoglyphs

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

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: HiddenFileSecurityTest created each confusable-dot filename and required process_ignore_file to 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 847c85b8780e5f4e4b996e8f45d6df3e6e8690c0 is mergeable against protected base f4038883078262be061a9a525350b71fa0293bbd and has completed hosted validation successfully:

  • CI run 31295839694: success;
  • SAST Semgrep run 31295839692: success;
  • Security Scan run 31295839697: 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 master ancestry. 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.

@coderabbitai

coderabbitai Bot commented Aug 9, 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: 13 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

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: f7c1b4a4-5bdc-42cf-be1e-81400dd27b98

📥 Commits

Reviewing files that changed from the base of the PR and between f403888 and 847c85b.

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

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

@seonghobae
seonghobae marked this pull request as ready for review August 9, 2026 05:04
@seonghobae
seonghobae merged commit 29e1534 into master Aug 9, 2026
29 checks passed
@seonghobae
seonghobae deleted the fix/unicode-hidden-file-homoglyphs branch August 9, 2026 06:21
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