Skip to content

docs(security): design remote web network confinement - #5306

Merged
thymikee merged 8 commits into
mainfrom
design/remote-web-public-confinement
Dec 1, 2026
Merged

thymikee merged 8 commits into
mainfrom
design/remote-web-public-confinement

Conversation

@thymikee

@thymikee thymikee commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Summary

Define public-network confinement for remote tenant web sessions. This standalone design targets main. #5243 supplies the routing and launch refusals that confinement depends on, and #5273 supplies the managed browser pin. Keep those refusals in place until the implementation proves a live, matching confinement lease and host-boundary egress. Startup recovery must bypass the recent-activity skip for confined browsers. Enabling remote web also requires effective enforcement between proxy loss and browser recovery. This follows up Daybreak remote-web finding #5.

Before / after

No observable runtime change. #5243 introduces the remote tenant web refusal. The main revision this design targets precedes that change.

Validation

Head 2f69dcc929. Verified by code reading that both guards exist on #5243 and are absent from this PR’s base. git diff --check passed. Hosted checks on this head are pending. Runtime tests do not apply to this design-only change.


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

View guided diff Turn on auto-fix

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 1 file

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

@apex-sentinel-staging

This comment has been minimized.

@apex-sentinel-staging

This comment has been minimized.

@thymikee

thymikee commented Dec 1, 2026

Copy link
Copy Markdown
Member Author

At 464e999, the design doc says remote web is already refused, but that is not true on main. This needs a fix before merge.

The Status section says remote tenant web commands are refused with remote_web_public_network_unenforced, and the phase plan (here and here) builds on an existing assertRemoteWebDeviceAdmitted. Neither exists at this commit or on main. By code reading, an HTTP request with an auth hook or public-network marker that runs open http://127.0.0.1 --platform web passes restrictRemoteHostInputs and reaches the managed browser. The refusal is only in the unmerged stack under #5243, and this PR was retargeted from that stack to main. If this merges first, main documents remote web as fail-closed while a remote tenant can browse non-public destinations, so the refusal could be skipped or the problem treated as closed. Remote web must be fail-closed wherever the docs say it is. Please merge after #5243, or reword Status, the phase preamble and the PR description to say the refusal arrives with #5243, is not on main yet, and is a prerequisite of phase 1.

Not blocking: these can be taken or left: have phase 4 or 6 replace both refusals with the lease check, including the assertManagedAgentBrowserNetworkPolicy launch refusal (remote_web_browser_unconfined) on #5243 and where that guard checks the lease, and mark phase 1 as delivered by #5265; for rule 1, either name what enforces browser termination on proxy loss (a daemon crash frees the port while the detached browser lives on, and the OS-protected socket option does not say how Chromium would use it) or narrow the guarantee and record the accepted window, and require startup recovery to ignore the recent-activity skip in agent-browser-lifecycle.ts for confined browsers; derive adoption refusal from the socket namespace plus an in-memory lease and close every browser in that namespace on restart, since the owned-process record has no per-session fields today; check against the pinned Chromium whether WebSockets, ws:// included, only use CONNECT through an HTTP proxy, and if so drop the absolute-form ws path and upgrade forwarding; and reword "The dependency change is optional" to say the upstream atomic mode is optional and which pinned version the phases require, as the stack moves to 0.42.0 while main pins 0.39.0.

CI is green. The cancelled Body rules run was superseded and Body rules passes, and this docs-only change overlaps no runtime job.

Not verified here: the 0.39.0 and 0.42.0 browser backend behavior, Chromium proxy behavior, the linked Chromium and IANA pages, and a live remote request against main.

Before merge, either #5243 needs to land or the doc needs to stop saying remote web is already refused.

@thymikee

thymikee commented Dec 1, 2026

Copy link
Copy Markdown
Member Author

Addressed in 2f69dcc929. The status, phase plan, and PR description now say that #5243 supplies the two fail-closed guards and must land before the confinement implementation. I verified both guards on #5243 and their absence from this design branch’s base. The design also names the #5273 pin, requires confined recovery to bypass the recent-activity skip, and keeps proxy-loss enforcement as an enablement condition. WebSocket forwarding stays in the design pending pinned-browser evidence for removing it.

@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of 2f69dcc

Since the review of 464e999: 0 new · 0 still open · 0 no longer raised

No open findings.

Not in the reviewers' scope (1 file)
  • docs/experiments/remote-web-public-network-confinement.md: no reviewer was selected for this change

Reviewed with this repository's own Sentinel configuration (dd1110f8d096).

💬 Talking to Sentinel

In a finding's thread, reply with:

Command What it does
@apex-sentinel-staging note <context> Adds context; Sentinel re-checks the cited code
@apex-sentinel-staging pivot <why> Says the finding is wrong; Sentinel re-checks the cited code
@apex-sentinel-staging like Marks the finding as useful
@apex-sentinel-staging dislike <why> Marks it as not useful, so it is not raised again

On this conversation, comment @apex-sentinel-staging review to run a full review once again.

@thymikee

thymikee commented Dec 1, 2026

Copy link
Copy Markdown
Member Author

The earlier review findings are addressed in 2f69dcc, and no new code findings remain. The supplied snapshot shows no conflicts.

CI is pending: Body rules was cancelled, and the packet contains no failure excerpt. This check can inspect PR metadata, so its status cannot be attributed to runtime code. Obtain a passing Body rules check before merge if it remains required.

Not verified here: the two guard implementations and provider context in #5243 were not independently checked because its head source was not included. No live Chromium or host-boundary egress evidence was run; the design requires that evidence before enablement. The packet lists no open reviewer threads and does not establish when the four resolved threads were resolved.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Dec 1, 2026
@thymikee
thymikee merged commit 59a640c into main Dec 1, 2026
9 of 10 checks passed
@thymikee
thymikee deleted the design/remote-web-public-confinement branch December 1, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant