Skip to content

fix: constrain custom wordlist paths - #3

Merged
dk3yyyy merged 3 commits into
mainfrom
fix/validate-wordlist-paths
Jul 24, 2026
Merged

fix: constrain custom wordlist paths#3
dk3yyyy merged 3 commits into
mainfrom
fix/validate-wordlist-paths

Conversation

@dk3yyyy

@dk3yyyy dk3yyyy commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • restrict custom wordlist names to a bounded ASCII allowlist
  • prevent traversal, per-file symlink escapes, and symlinked wordlist-directory redirects
  • preserve valid one-to-64-character names, including names beginning with _ or -
  • add traversal, symlink, boundary, invalid-name, and round-trip regression coverage

Verification

  • uv run pytest -q — 44 passed
  • uv run python -m py_compile main.py web.py
  • git diff --check
  • independent security review completed; blocking name-contract finding fixed and symlink-directory hardening added

Remaining limitation

A same-user attacker able to race filesystem entries between validation and open could still attempt a TOCTOU swap. Fully descriptor-relative O_NOFOLLOW handling would be platform-specific; the current change closes the direct traversal and stable symlink escape paths without broad filesystem refactoring.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 1 minute

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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6421e720-851f-4de6-9bf6-678a3d4d2686

📥 Commits

Reviewing files that changed from the base of the PR and between 7234dd3 and d29e540.

📒 Files selected for processing (2)
  • main.py
  • tests/test_main.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/validate-wordlist-paths

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.

@dk3yyyy
dk3yyyy merged commit 4601a6e into main Jul 24, 2026
2 checks passed
@dk3yyyy
dk3yyyy deleted the fix/validate-wordlist-paths branch July 30, 2026 10:09
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