Repository navigation
[sec-bus] adopt: privacy/egress checks and browser egress host over the bus - #681
Merged
Merged
Conversation
Add a test asserting that enforce_egress rejects external Composio content under Sensitive mode, since that mode delegates to TinySecurity which refuses unassessed external content. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Introduce a privacy module for the egress path that inspects outbound requests and blocks those carrying sensitive data. Tests cover the new filtering behaviour. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add a privacy_check2 client call and a privacy_check helper in the security module so egress transfers can ask TinySecurity whether a single host-derived descriptor is allowed. A test-only privacy port seam lets tests stub the decision, and the egress privacy tests now exercise allow, deny, and unavailable outcomes through it. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The egress enforcement module and its tests are deleted, along with the re-exports that surfaced them. The local-only block is no longer applied at egress chokepoints, so external transfers proceed regardless of privacy mode. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Adds a synchronous privacy_check_blocking entry point that resolves the armed config and runs the descriptor-level privacy gate through the sync seam, and factors privacy_check into a config-taking variant so callers with a host-owned config can reuse it. The native egress decision path now routes through this blocking helper instead of driving the async check directly, letting synchronous host callbacks consult the privacy gate. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add a comment explaining that the synchronous network-tool trait has no async admission path, so its bounded bridge must refuse when no module runtime is armed. The now-redundant assertion that the blocking bridge returns none after a privacy port is installed was dropped, since the comment covers the intended behaviour. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The egress privacy decision path is now async, so callers in the composio dispatch and search tools await it rather than calling a blocking variant. A blocking wrapper is kept for the synchronous NetGate trait, and the privacy module's blocking path is bypassed under test to avoid deadlocking on the async runtime. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Reformat the import lists in the security client, privacy tests, and security module so they match rustfmt's ordering and wrapping. No behaviour changes. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The egress policy check in the shared dispatcher now awaits the local_only_search_block call, matching its async signature so non-agent routes still enforce LocalOnly mode. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add client methods to authorize, consume, and validate browser socket dials through TinySecurity. These wrap the confidential bus calls so callers can obtain a one-use grant and confirm it before the selected socket opens. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Register a new browser egress host module behind the modules and security-module features, wiring its callback installation into the module runtime so browser egress traffic can be intercepted when the security module is enabled. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The browser egress host now registers a destination-only policy with TinySecurity and records its id and generation, and authorize refuses any target whose policy scope was not registered. The desktop proxy wires this policy into the browser configuration so dials are validated against a live generation instead of an unverified policy id. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The dial config now reports the policy generation under the key the host expects, and the host refuses any authorization whose generation does not match the generation it requested. This closes a race where a policy could be replaced between the request and the response, letting a stale authorization through. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add a test module covering browser egress host handling so the host-matching behaviour is exercised directly. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add a classify_provider_endpoint2 method that calls the confidential CLASSIFY_PROVIDER_ENDPOINT2 bus method with a host and returns the v2 provider endpoint response, mapping bus failures to SecurityError::Unavailable. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add a helper that classifies a provider host as on-device or external via TinySecurity's U5 endpoint classification. Failures are surfaced as errors so callers can treat an unavailable authority as external. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…eature The computer callback load path and its supporting helpers are now compiled only when the security-module feature is enabled, and the runtime cfg! check in ensure_loaded_within was replaced with cfg attributes so the desktop branch is absent from builds without the feature. This avoids dead code and unresolved references in feature-disabled builds. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
senamakel
merged commit Oct 26, 2026
5b4cc38
into
epic/8369-security-migration
13 of 14 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #651
Summary
TinyComputer’s executable-plus-egress contract fix was merged first in senamakel/tinydesktop#25 at
486e56cc6e5298ac0f4d01f8443d08bfcf31cf15; this PR pins that commit.Verification
cargo checkpassed;cargo check -p openhuman --features storage-sqlite,security-modulepassed.scripts/ci/security-browser-egress-fixture.shpassed: TinySecurity native fixture, browser callbacks, and TinyComputertest-connectorbuild.cargo fmt,git diff --check, and fixture shell syntax passed.Existing repository failures
pnpm rust:layoutreaches the inherited TinyChannels storage-schema naming violations.pnpm debug rust security: 544 passed, 1 stable unrelatedmiddleware_stop_causefailure; the same failure is present on the preceding epic base.cargo check -p openhuman --no-default-featuresreports existing feature-gating errors in channels and secret storage.