Skip to content

fix(web): carry remote network policy into browser provider - #5265

Merged
thymikee merged 12 commits into
fix/daybreak-daemon-boundariesfrom
fix/daybreak-remote-web-context
Dec 1, 2026
Merged

thymikee merged 12 commits into
fix/daybreak-daemon-boundariesfrom
fix/daybreak-remote-web-context

Conversation

@thymikee

@thymikee thymikee commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Summary

Carry the daemon-owned publicNetworkOnly fact through request provider context to the default managed web provider. While network confinement is not implemented, that provider refuses browser commands except close before host-side browser work. This is defense in depth for the Daybreak remote-web finding. #5243 remains the remote-web admission block; #5258 records the full proxy design. This phase does not add a proxy or alter custom provider behavior.

Before / after

No observable remote-web change: #5243 already refuses remote web commands. At the provider seam, a confined open formerly reached browser status and cleanup before refusal; it now returns UNSUPPORTED_OPERATION with remote_web_browser_unconfined before those effects. Confined close remains available. Help and website explain why browser subrequests remain blocked.

Validation

Head 4a8a43b74d on #5258 bdee98102d. All six own commits are patch-identical after restack (git range-diff). The focused src/platform-runtime-provider-scope.test.ts passed 8/8 at the preceding head 390fd7508a; git diff --check passed. Current-head CI is pending. This change does not enable remote web; proxy lifecycle and host-boundary bypass evidence remain required.

@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 6.73 MB 6.73 MB +691 B
Package (unpacked) 6.73 MB 6.73 MB +691 B
Package (download) 2.06 MB 2.06 MB +217 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 37.8 ms 28.1 ms -9.6 ms
CLI --help 75.8 ms 66.6 ms -9.3 ms

Affected plugins

Plugin Installed (including dependencies) Unpacked Download
@agent-device/revyl 179.6 kB → 179.6 kB (0 B) 179.3 kB → 179.3 kB (0 B) 58.2 kB → 58.2 kB (0 B)
@agent-device/testmu 26.1 kB → 26.1 kB (0 B) 25.7 kB → 25.7 kB (0 B) 9.4 kB → 9.4 kB (-1 B)
@agent-device/tizen 97.5 kB → 97.5 kB (0 B) 97.2 kB → 97.2 kB (0 B) 34.4 kB → 34.4 kB (-1 B)
@agent-device/webos 96.5 kB → 96.5 kB (0 B) 96.1 kB → 96.1 kB (0 B) 34.1 kB → 34.1 kB (+1 B)

@apex-sentinel-staging

This comment has been minimized.

@apex-sentinel-staging apex-sentinel-staging Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Apex Sentinel: 2 new findings on 83840f4. The verdict and the full list are in the summary comment.

@apex-sentinel-staging

This comment has been minimized.

@thymikee

Copy link
Copy Markdown
Member Author

The code at 373de18 is ready.

Not blocking: these can be taken or left: every managed-provider construction for a browser command should carry the request's network policy, but the unscoped fallback omits publicNetworkOnly (it could drive an unconfined, sessionless default browser if a confined request without a request-scoped provider reached a web device past admission, so it could fail closed for web devices, or useDefaultWebProvider could follow the bound device's platform so that the scoped construction is the only one); the second policy check cannot fire today because the only caller already throws at entry, so it, ManagedAgentBrowserRunOptions.publicNetworkOnly and the forwarding spread can go; the hand-off to the default provider could use one test that runs createComposedRequestPlatformProviders with a fake defaultWebProvider, a web device, useDefaultWebProvider: true and publicNetworkOnly: true, and asserts that open on the scoped provider rejects with remote_web_browser_unconfined; the line-limit compression and related unrelated edits could be reverted, moving the run and finalize helpers to another file if the limit binds; and the private connector link in the PR description, which public readers cannot open, could be replaced with #5243, #5258 or a public summary.

Neither earlier thread still applies, so both can be resolved: the confinement check is fixed because it now runs first in runAgentBrowserCommand, before any other browser work, and the reason docs are fixed because both reasons are now documented and scoped to admission or the backstop.

The only check not passing is Body rules, which was cancelled. It validates the PR description, the diff does not touch that job's route, and the cancel is likely unrelated to the code (a body edit or a new push usually causes it).

Not verified here: the tests were not run, so the 20/20 result and the line-limit claim rest on the author and CI. It was not traced whether any production route can bind a web device for a confined request with useDefaultWebProvider false while skipping admitDevice. The HTTP JSON-RPC request builder was also not traced line by line to confirm that it never copies a client internal field.

Nothing in the code needs to change before merge. The PR still has to leave draft, and the cancelled Body rules check has to pass.

@thymikee
thymikee marked this pull request as ready for review November 30, 2026 19:15

@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 11 files

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

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

Comment thread website/docs/docs/commands.md Resolved
Comment thread src/commands/schema/cli-help.ts Resolved
@thymikee
thymikee force-pushed the fix/daybreak-remote-web-context branch from 390fd75 to 4a8a43b Compare November 30, 2026 19:40
@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of 4a8a43b

Since the review of 373de18: 0 new · 0 still open · 0 no longer raised

No open findings.

2 findings below minor hidden (user_settings.min_severity).

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

💬 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

Copy link
Copy Markdown
Member Author

This PR is ready at 4a8a43b. Nothing in its own change needs more work before merge. Since the earlier review of 373de18, the three points below are fixed, and the required evidence is in place.

Three open threads no longer apply and can be resolved: the command docs now state that subrequests cannot be restricted to public destinations, a new test checks that a public-network-only request is rejected with remote_web_browser_unconfined and no executor calls, and the CLI help now describes the case the caller sees.

Every check passes. The cancelled Body rules run was replaced by a passing run, and that check does not exercise runtime code.

Not verified here: the new test was not run locally, its failure without the guarded line in request-providers.ts was inferred from the code path rather than a mutation run, and the content of the 220-line design doc was left to #5258.

Not blocking: the diff now carries the design doc that is still under review in #5258, so you can retarget this PR to design/remote-web-public-confinement or merge #5258 first, or leave it as is.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 30, 2026
@thymikee
thymikee added this pull request to stack #5296 December 1, 2026 06:41
@thymikee
thymikee merged commit 8f93b3d into fix/daybreak-daemon-boundaries Dec 1, 2026
18 of 19 checks passed
@thymikee
thymikee deleted the fix/daybreak-remote-web-context branch December 1, 2026 08:15
thymikee added a commit that referenced this pull request Dec 1, 2026
* docs(security): design remote web network confinement

* docs(security): phase remote web confinement

* docs(security): correct Chromium proxy bypass

* docs(security): require isolated confined browser sessions

* docs(security): bind remote web confinement to session state

* docs(security): cover DNS64 in remote web confinement design

* fix(web): carry remote network policy into browser provider

* fix(web): own confined browser refusal at launch

* fix(web): refuse confined commands before provider cleanup

* refactor(web): keep confinement admission before browser effects

* docs(web): scope remote refusal to tenant ingress

* fix(web): prove confined default provider composition
thymikee added a commit that referenced this pull request Dec 1, 2026
* docs(security): design remote web network confinement

* docs(security): phase remote web confinement

* docs(security): correct Chromium proxy bypass

* docs(security): require isolated confined browser sessions

* docs(security): bind remote web confinement to session state

* docs(security): cover DNS64 in remote web confinement design

* fix(web): carry remote network policy into browser provider

* fix(web): own confined browser refusal at launch

* fix(web): refuse confined commands before provider cleanup

* refactor(web): keep confinement admission before browser effects

* docs(web): scope remote refusal to tenant ingress

* fix(web): prove confined default provider composition
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