Skip to content

test(browser-egress): cover module-level DNS rebinding - #22

Merged
senamakel merged 6 commits into
epic/7328-security-busfrom
epic-7328-tc-dns-rebinding
Oct 23, 2026
Merged

senamakel merged 6 commits into
epic/7328-security-busfrom
epic-7328-tc-dns-rebinding

Conversation

@senamakel

Copy link
Copy Markdown
Owner

Adds loaded-ModuleHost Chromium coverage for a fixture hostname that first resolves to an allowed loopback socket, then rebinds to a different local socket on the same port. The test verifies the host authorizes the initial socket, reauthorizes after the fixture address changes, denies the rebound socket, and neither consumes nor dials it or reconnects to the prior allowed socket. The fixture uses assigned loopback addresses only.

Also snapshots browser-level resolver observations before async waits and fixes live-test Clippy warnings.

Part of tinyhumansai#111. This is TinyComputer-local policy-to-proxy coverage; OpenHuman’s real TinySecurity bus-bridge test remains a separate acceptance step.

senamakel and others added 6 commits October 23, 2026 10:14
Add a live test module exercising DNS rebinding against the browser egress
path, and extend the fixture host with an optional resolved address so
authorization can be checked against the address the browser actually
resolved. The observation log now records the resolution alongside the
authorize call, and the existing authority denial fixtures pass no
resolved address to keep their behaviour unchanged.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Move the authorize observation push ahead of the simulated delay so the
recorded order reflects when the request arrived rather than when the
handler finished.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Replace the unnecessary format! call with a plain string literal converted via to_string, since the html contains no interpolation.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Clone the observations snapshot instead of holding the mutex guard across
the remaining assertions, replace a map_or with is_none_or, and allow the
too_many_arguments lint on the fixture host helper.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…binding

The DNS rebinding test now snapshots the recorded calls before the rebind and
asserts that the initially allowed address was consumed, so a failure to dial
the permitted socket is caught rather than silently passing the later denial
checks.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Silence the clippy too_many_lines lint on the live DNS rebinding test, which
is long by necessity because it sets up both loopback endpoints and the
resolver fixture inline.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
@senamakel
senamakel merged commit cda3c72 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