Repository navigation
feat(browser): gate Chromium traffic through authorized proxy - #150
Conversation
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 98b4ca16a8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Tiny Sweeper reviewVerdict: Incomplete · Priority: none Diagnostics and supporting detailsFull summaryPull request purpose (title): feat(browser): gate Chromium traffic through authorized proxy. Tiny Sweeper completed its review; deterministic results follow. Unreviewed paths
Partial review reasons
Review snapshot
Completeness: Incomplete What changedAdds an optional, host-private browser egress path. When the compiled module receives a `browser.egress` scope it selects an enforced launcher, binds a per-session authenticated loopback proxy for each explicit launch, rewrites the launch to use only that proxy with containment flags, refuses attach options, caller arguments, executable overrides, and ambient AGENT_BROWSER_* configuration, and tears the proxy down on close. Each proxied request is parsed and framed strictly, authorized through a new BrowserEgressHost bus interface (Authorize/Consume/Validate), a one-use grant is consumed before any exact approved socket is dialed, later candidate addresses are reauthorized, and active leases are revalidated at least once per second for uploads, CONNECT tunnels, WebSocket upgrades, and responses. The contract version moves from 2.24 to 2.25 so a 2.24 module, which cannot enforce per-destination browser dials, is refused. Documentation is updated to describe the host contract and to state that HTTPS contents stay opaque and that OS-level isolation remains a host requirement. No push delta is available: the review state holds the prior reviewed head and rendered evidence but no trusted base-to-head diff, so the whole-pull-request diff must not be read as a push delta. Features
Tests
FindingsNo active actionable findings. Before merge
Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 525c4e77b8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 25afb0ba60
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8b2d7b4e18
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ngine lock The enforced-launch liveness check ran before the engine lock was taken, so a browser that exited while a call waited on the lock could still be used. The check now runs inside the lock, and the live Chromium tests are gated on a `live_browser_tests` cfg set by the build script instead of a `live-tests` feature. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The live-browser test fixtures and their tokio and atomic imports are now compiled only when the live_browser_tests cfg is enabled, so the default test build no longer pulls in unused networking helpers. Import ordering and one assertion were also reformatted. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The monolithic egress test file was broken up into separate modules for authority parsing, connect, http, lease, lifecycle, retry, websocket, and shared simulator fixtures, with the root file reduced to module declarations. This keeps each protocol path's tests self-contained and easier to navigate as coverage grows. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The single egress module was broken up into forward, request, serve, and mod submodules so the proxy's request parsing, upstream forwarding, and connection serving logic can be maintained separately. No behaviour changes. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The browser configuration example no longer shows the executable and args fields, since those options are not part of the documented configuration. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The retry loop that reauthorizes and dials each approved address was pulled out of the proxy serve path into a standalone connect_approved_addresses function so the retry behavior can be exercised directly in tests without driving a full proxy connection. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add a test asserting that an enforced browser which has already exited can still be closed successfully, clearing the enforced launch flag while leaving the proxy unset. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The egress authorization check now skips the close action when an enforced launch is active and the browser process has already exited, so a close request is no longer rejected in that state. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Relocate the egress test suite from the crate-level egress_tests directory into src/egress/egress_tests so the tests live alongside the code they exercise. No test behaviour changes. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5a7ee95048
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The egress test module now declares its authority, body, connect, http, lease, lifecycle, retry, simulator, and websocket submodules, and the redundant top-level egress_tests module declaration in lib.rs was dropped since the tests are reached through the egress module instead. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The browser egress request and decision types were extracted from mod.rs into a dedicated types module and re-exported, so the module file only holds the interface constants and callback names. The chunked body test now builds a chunk line with an extension and asserts the specific invalid-data error instead of only checking that forwarding fails. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The live Chromium egress tests now record denied destinations in the fixture and wait for the expected denied port to appear before closing the browser, so the assertions no longer race against Chromium's asynchronous network attempts. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Chunked transfer decoding now returns an InvalidData error when a chunk line exceeds 8192 bytes, preventing unbounded buffering from a malicious or malformed peer. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
tinysweeper could not review the latest push, so its earlier approval no longer speaks for this pull request.
The egress_tests.rs aggregator that wired up the per-protocol test modules has been deleted, so the egress test suite is no longer compiled or run. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Upstream request writes previously ran to completion without rechecking the lease, so a revoked lease could still deliver a full request to the origin. The writes now interleave lease validation and abort the request when the lease is no longer valid. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4938977c3a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The lease validation interval was created separately for each write phase, so a request that wrote headers and then a body could go almost two seconds without re-checking the lease. The interval is now threaded through the forward and body write paths so all phases of a single request share one schedule, and a test covers the shared timing. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 499ca179a6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The lease validation clock is now threaded through tunnel and response forwarding instead of being created per call, so the response phase continues the request phase's validation schedule rather than restarting it. A test covers the shared schedule across both phases. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The binding for the validation interval no longer needs to be mutable, so the mut qualifier was removed to keep the code warning-free. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The upstream initialization helper now takes a LeaseValidationClock reference instead of a tokio interval, matching the validation clock type used elsewhere in the egress path. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The select branches waiting on lease validation now bind the future's unit result with `()` instead of `_`, making the expected output type explicit at each call site. No behaviour change. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
This draft restores the browser egress proxy, authenticated TinySecurity browser-dial contract, and regression coverage for navigation, redirects, subresources, and WebSockets. At source head
36668e17993d7a21a59ef6ec56633c4c6468c42c, the TinyComputer crate checks, browser/bus/module tests, strict Clippy, and formatting pass. The four live Chromium proxy cases passed with the official Chrome sandbox enabled; that run preceded a test-only float-lint correction in this head.This change does not prove native process confinement. Chromium still needs a trusted launch/control-pipe port in agent-browser and native enforcement in TinyBox before this can merge. DNS rebinding, worker traffic, direct sockets, and macOS/Windows enforcement remain unproven. TinyComputer issue #111 is not complete until those boundaries and cross-platform tests land.
Summary by CodeRabbit
New Features
Documentation
Chores