[Security] Enforce DNS-pinned browser policy across redirects and subresources#252
Open
fettpl wants to merge 3 commits into
Open
[Security] Enforce DNS-pinned browser policy across redirects and subresources#252fettpl wants to merge 3 commits into
fettpl wants to merge 3 commits into
Conversation
Author
|
@0xSero PR #252 is now mergeable at independently approved exact head |
fettpl
force-pushed
the
p1/issue-235-browser-network-policy
branch
from
July 19, 2026 00:33
2408a6c to
7a105fe
Compare
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enforce one fail-closed network policy across interactive Playwright browsing and reading mode. Every hostname is resolved and every returned IPv4/IPv6 address is classified before a connection is allowed. Public browsing remains public-only; an explicitly selected loopback page may reach loopback or public destinations, but never LAN, link-local, metadata-like, multicast, documentation, or other special-use ranges.
The final implementation is adapted to main's Playwright browser architecture. Chromium is forced through mode-specific local pinning proxies, with no implicit loopback bypass, while Playwright HTTP and WebSocket routes provide an additional preflight guard. The proxy performs the authoritative resolve-and-dial operation, connects only to the selected address, preserves the original Host and TLS SNI, and never disables certificate verification.
Closes #235
Final design
publicandloopbackmodes plus complete IPv4/IPv6 special-use classification, including mapped IPv4 forms and malformed or zoned IPv6 rejection.stop().Validation
19859e01c03fdf961eac82eeaff0ec01da099392.npm --prefix services/agent-runtime run build: passed.npm run test:integration: 30/30 passed. This includes real Playwright zero-connection coverage for redirects and browser request classes, proxy HTTP/CONNECT/WebSocket pinning, reader redirect pinning, context revocation/poisoning, and BrowserHost races.npm --prefix frontend run check:quality: passed, including package integrity, ESLint, frontend and desktop typechecks, cycle/UI/dead-code/duplicate/dependency checks, runtime bundle, and production Next.js build.git diff --check: passed; final worktree is clean.testscript, sonpm --prefix frontend run testis unavailable rather than represented as passing.npm --prefix frontend run desktop:dist: passed and produced the macOS DMG and ZIP./Applications/Local Studio.appbundle identifier:org.local.studio.desktop.{"ok":true}from/api/desktop-healthwith HTTP 200.19859e01c03fdf961eac82eeaff0ec01da099392with no findings after inspecting address classification, fail-closed DNS behavior, proxy pinning and bypass resistance, Playwright guards, reader redirects, revocation poisoning, and shutdown races.UI changes
No intentional visual changes. Existing browser controls select a protected public or explicit-loopback context from the entered URL, and the visible page remains bound to the active protected context generation.
Risks and rollout notes