Repository navigation
test(browser-egress): verify redirect hops require authorization - #163
Conversation
…erence Update the pinned submodule commits for the four vendored dependencies to their latest revisions. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add a live Chromium test that serves a 302 pointing at a denied host and asserts the redirect hop is authorized through the host before any socket is dialed, so a denied destination never reaches grant consumption or receives a connection. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Reverts the tinytools git dependency to revision bd60b9b and drops the icu_casemap, rawzip, and unicode-normalization crates that the newer versions pulled in. The lockfile also picks up the corresponding transitive dependency changes. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
This reverts commit 93de7cb. Co-authored-by: Medulla <medulla@tinyhumans.ai>
…erence Update the pinned submodule commits for the four vendored dependencies to their latest revisions. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Tiny Sweeper reviewReviewed head: Verdict: Ready for maintainer review · Priority: none Diagnostics and supporting detailsFull summaryPull request purpose (title): test(browser-egress): verify redirect hops require authorization. Tiny Sweeper completed its review; deterministic results follow. Review snapshot
Completeness: Complete What changedOne file changed, adding 141 lines with no deletions. The redirect fixture helper now reads the request in chunks until the header terminator or EOF under a 10-second deadline, asserts the path is `/redirect`, repoints the host's resolved address to the denied one, and replies with a 302 to the raw denied loopback address. The new opt-in live test binds allowed and denied loopback listeners, wires the fixture EgressHost to the shared resolved address, attaches the linked module with a redirect egress policy, opens a browser session, navigates to the allowed `fixture.test` URL, and asserts the redirect hop reached host authorization for the denied port, that the resolver mapped the denied IP to its listener, that the denied address never reached grant consumption, and that the denied listener received no connection within a short timeout. It panics with navigation and egress observations if the fixture server never receives the initial navigation. Features
TestsNo supported feature-to-test mapping was produced. Test execution is not inferred. FindingsNo active actionable findings. Before mergeNone. Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
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: a649491dfb
ℹ️ 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".
…failure The live redirect test now keeps the navigation response and, when the allowed server fails to complete, panics with the navigation result and the recorded egress observations instead of a bare expect message. This makes failures easier to diagnose without changing what the test asserts. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The redirect fixture listener now waits up to 30 seconds for the authorized Chromium socket instead of 10, since the browser can take longer to connect under load and the shorter deadline caused flaky failures. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The redirect fixture now rewrites the shared resolved address to the denied listener once the redirect request arrives, and the redirect location uses that literal address instead of a hostname. This makes the test assert that the redirect hop is authorized against the actual denied IP and that the fixture resolved it to the listener it serves. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The redirect fixture previously read the Chromium request in a single chunk, which could truncate the request line and make the assertion flaky. It now loops until the header terminator arrives, with a timeout so a stalled client fails the test instead of hanging. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Adds a live loaded-module browser test that redirects Chromium from an allowed fixture host to a private fixture host. It verifies the redirect destination receives its own host authorization request and that Chromium never opens the denied destination socket.
This is behavior-evidence coverage only: the existing proxy already authorizes each hop. It does not complete TinyComputer #111.
Validation:
TINYCOMPUTER_LIVE_BROWSER_EGRESS_TESTS=1 RUST_TEST_THREADS=1 scripts/ci-cancel-aware.sh cargo test --locked -p tinycomputer --features static-link --lib live_chromium_module_authorizes_redirect_hops_before_dialing -- --nocapture(1 passed)live_chromium_(5 passed)cargo check --locked -p tinycomputer --features static-linkcargo clippy --locked -p tinycomputer --all-targets --features static-link -- -D warningscargo fmt --all -- --check,git diff --check, andcargo metadata --locked --format-version 1Remaining #111 acceptance gaps include proving resolved-address pinning on the actual socket across redirects, subresources, workers, and WebSockets; broader controlled public/private/DNS-rebinding and subresource/worker/WebSocket fixtures; fail-closed behavior for stale or missing authority in all relevant paths; and supported Linux/macOS/Windows backend evidence. Windows CPU semantics remain deferred/Unsupported.
Refs #111
Part of tinyhumansai/openhuman#7328