Skip to content

test(browser): cover live egress authority denial - #17

Merged
senamakel merged 4 commits into
epic/7328-security-busfrom
epic-7328-111-authority-denial
Oct 23, 2026
Merged

senamakel merged 4 commits into
epic/7328-security-busfrom
epic-7328-111-authority-denial

Conversation

@senamakel

Copy link
Copy Markdown
Owner

Adds live Chromium module coverage that proves browser egress denies a loopback connection when the host authority is missing and rejects a stale policy generation before socket consumption. The checks load the TinyComputer module over TinyBus and verify that the destination listener receives no connection.

Local gates:

  • cargo fmt --all -- --check
  • cargo check -p tinycomputer --features static-link
  • TINYCOMPUTER_LIVE_BROWSER_EGRESS_TESTS=1 cargo test -p tinycomputer --features static-link --lib live_chromium_module_ -- --nocapture (3 passed)
  • TINYCOMPUTER_LIVE_BROWSER_EGRESS_TESTS=1 cargo clippy -p tinycomputer --features static-link --all-targets -- -D warnings

Refs tinyhumansai#111
Part of tinyhumansai/openhuman#7328

The canonical issue stays open for the final upstream PR. The senamakel/tinydesktop fork has no matching tinyhumansai#111 issue to close.

senamakel and others added 4 commits October 23, 2026 02:46
Add a live test that navigates to a loopback address while the module is
configured with an egress policy id that has no authority, asserting the
navigation is rejected and the destination never receives a connection.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add a live Chromium test that navigates with a generation the host does not
match, asserting the request is denied before any socket is dialed. The
fixture host now accepts an optional grant generation so it can return a
stale value, letting the test confirm the module asks for authorization but
never reaches socket consumption.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The live Chromium egress test's host handlers now yield to the runtime before
touching shared state, so the broker can interleave calls the way it would in
production. The doc comment was also updated to use code formatting for the
module name, and the long test function is explicitly allowed to exceed the
line-count lint.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Move the abort and await of the allowed server and broker task ahead of
the observation lock so the tasks are torn down before the assertions
read the recorded calls. This avoids holding the mutex across the
awaits and keeps the teardown ordering consistent between the two live
tests.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
@senamakel
senamakel merged commit 7034d72 into epic/7328-security-bus Oct 23, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant