Security hardening for browser boundary, SSRF, FS bridge, profile isolation, exports, and tokens#1
Conversation
PR #1 Review — Security HardeningThanks for the thorough security review, @Zurgli. The six hardening areas are well-identified and the fixes are structurally sound. I've done a code-level review of every changed file and have feedback below, organized into blocking items (must fix before merge) and non-blocking suggestions. Blocking1. Scope: daemon persistence/recovery work should be a separate PRThis PR adds ~870 lines to Mixing feature work into a security PR creates two problems:
Ask: Please split the daemon persistence/recovery changes into a separate PR. The security-scoped changes in 2. IPv6-mapped IPv4 bypass in SSRF validation
Fix: After expanding the IPv6 address, check if it's in Please also add a test case for this in 3. Token ACL failure should throw, not warnIn This means on Windows, if ACL hardening fails, the token file remains readable by other users on the machine — silently. For a security-critical auth token, this should be a hard failure. Fix: Re-throw after logging, or at minimum delete the token file and throw so the caller knows the token was not securely written. Update the test in Non-blocking (suggestions for follow-up)4. DNS rebinding window (SSRF)The current flow is: For a future iteration, consider pinning the resolved IP and passing it directly to the navigation layer, or using a custom DNS resolver that caches the validated result for the duration of the request. Not blocking this PR since the improvement is already substantial. 5. Filesystem bridge TOCTOU
Future improvement: open with 6. BrowserPanel remount on partition changeIn This is the correct security behavior (you can't change a webview's partition after creation), but it's a UX regression worth documenting. Consider showing a brief notification to the user when this happens so they understand why their browser state reset. 7.
|
bfe6468 to
ae3217d
Compare
|
Thank you for the thorough review, @openwong2kim! Updated this PR to address the blocking review items. Changes made:
|
|
Merged! Thank you so much for this contribution, @Zurgli — this is genuinely excellent work. The six hardening areas were clearly identified, well-scoped, and the fixes are structurally sound. I especially appreciate:
This is a strong first contribution. Looking forward to seeing more from you — welcome aboard! |
|
Quick heads-up @Zurgli — your commits aren't linking to your GitHub profile on the contributor graph yet. This usually means the email in your local Git config doesn't match any email registered on your GitHub account. You can fix it by adding that email in GitHub → Settings → Emails, or updating your local config: Just wanted to make sure you get proper credit for this work! P.S. I've added a CONTRIBUTING.md based on your feedback about missing contributor guidance. Should make things smoother for future contributions. |
|
@openwong2kim oh no, I had updated that on my local, but the worktree for the requested changes pulled the wrong account! Is there any chance you can help resolve this? I have amended the commits and can update the PR with the new ones if that's possible. |
|
Hey @Zurgli! Since the PR is already merged, the easiest fix is to add the email address used in those commits to your GitHub account under Settings > Emails. GitHub will automatically attribute the commits to your profile once the email is linked. No need to re-push anything! If that's not possible for some reason, just let me know — I can revert the merge so you can re-submit with the correct account. |
|
So sorry for the trouble, that one's for work, and I'm keeping these two accounts separate. Really appreciate you being flexible 🙏
On Wed, Apr 1, 2026 at 8:56 AM, ***@***.***> wrote: openwong2kim left a comment (openwong2kim/wmux#1)
Hey @Zurgli! Since the PR is already merged, the easiest fix is to add the email address used in those commits to your GitHub account under Settings > Emails. GitHub will automatically attribute the commits to your profile once the email is linked. No need to re-push anything!
If that's not possible for some reason, just let me know — I can revert the merge so you can re-submit with the correct account.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
|
Hey @Zurgli! No worries at all, totally understand keeping work and personal accounts separate. I've reverted the merge so you can |
This PR bundles six security hardening changes discovered during a review of wmux.
I did not find a CONTRIBUTING file or other contributor guidance in the repository, so I was not sure whether you prefer one larger security hardening PR or several smaller ones. I grouped the changes here so you can review them together and decide what you want to take.
Original issues identified
What this PR changes
ealpath before policy checks.
Development history in my fork
These changes were developed and reviewed as six separate PRs in my fork before being bundled here:
If you prefer, I can also split this back out into smaller upstream PRs that match those six threads.