Skip to content

fix: address review findings from security and architecture audit#32

Merged
GeiserX merged 1 commit intomainfrom
fix/review-findings
Apr 17, 2026
Merged

fix: address review findings from security and architecture audit#32
GeiserX merged 1 commit intomainfrom
fix/review-findings

Conversation

@GeiserX
Copy link
Copy Markdown
Owner

@GeiserX GeiserX commented Apr 17, 2026

Summary

Fixes from a multi-agent review (code, security, architecture, test coverage):

  • Hosts collision detection: now handles tab-separated entries, multi-hostname lines, and inline comments — previously only split on spaces, missing standard /etc/hosts format
  • Quit timeout safety net: 8-second hard deadline ensures termination even if cleanup Task stalls beyond XPC timeouts
  • Proxy server validation: rejects flag injection (e.g. -e /bin/sh) before passing to /usr/bin/nc
  • DNS domain validation: rejects domains starting with - before passing to dig/kdig/curl

Not addressed (separate work)

  • XPC code-signing anchor check (needs Developer ID cert info)
  • Proxy password to Keychain (significant refactor)
  • Log file from /tmp to ~/Library/Application Support

Test plan

  • Verify VPN Bypass skips hosts entries managed by other tools (tab-separated, multi-hostname)
  • Quit the app and verify it exits cleanly within seconds
  • Enter invalid proxy server values and verify they are rejected
  • Verify normal DNS resolution still works for configured domains

- Fix hosts collision detection to handle tab-separated entries and
  multi-hostname lines (was only splitting on spaces)
- Strip inline comments from hosts lines before collision check
- Add 8-second quit timeout safety net to prevent infinite hang
  if cleanup Task stalls for reasons beyond XPC timeouts
- Validate proxy server input before passing to nc (reject flag injection)
- Reject domain names starting with dash before passing to dig/kdig/curl
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 17, 2026

Warning

Rate limit exceeded

@GeiserX has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 17 minutes and 34 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 17 minutes and 34 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b4535d94-59de-448e-b421-2387caeb69fe

📥 Commits

Reviewing files that changed from the base of the PR and between 2b85979 and eefe42c.

📒 Files selected for processing (3)
  • Helper/HelperTool.swift
  • Sources/RouteManager.swift
  • Sources/VPNBypassApp.swift
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/review-findings

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 and usage tips.

@GeiserX GeiserX merged commit 4daa16c into main Apr 17, 2026
7 checks passed
@GeiserX GeiserX deleted the fix/review-findings branch April 17, 2026 08:30
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