Skip to content

docs(security): close out TinySecurity host migration - #699

Merged
senamakel merged 167 commits into
epic/8369-security-migrationfrom
sec-659-doc-closeout
Oct 28, 2026
Merged

senamakel merged 167 commits into
epic/8369-security-migrationfrom
sec-659-doc-closeout

Conversation

@senamakel

@senamakel senamakel commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Clarify TinySecurity and TinySecurity Bus ownership in the repo guidance and GitBook pages; update the security, sandbox, and approval adapter docs and the user-facing capability catalog.
  • Add the published-module three-OS native security fixture to CI Full, covering module admission/tampering, policy behavior, keyring denial, and fail-closed approval/sandbox paths. Assert that private approval request data does not appear in the pending RPC view.
  • Retire stale host-side security characterization coverage, keep the moved event accessors and module tests within the Rust layout limits, and preserve storage-bypass history when a legacy writer moves in a large file rewrite.

Closes #659
Part of tinyhumansai#8369

Validation

  • pnpm docs:check — passed
  • cargo fmt --all -- --check — passed
  • cargo check --manifest-path Cargo.toml — passed
  • cargo check --manifest-path crates/openhuman-app/Cargo.toml — passed
  • Focused relocated Rust tests — passed
  • node --test scripts/__tests__/storage-bypass-debt.test.mjs — 25 passed
  • bash scripts/ci/security-native-fixture.sh — passed against the published TinySecurity v0.18.2 archive
  • GITHUB_BASE_REF=epic/8369-security-migration pnpm rust:layout — structural, crate-chain, security-module, and storage-bypass checks pass; the final storage-owner check still reports the pre-existing fs2 dependency in tinytools-std, also present on the epic base. No allowlist exception was added.

Added the tinysecurity submodule and tinysecurity-bus contract to the module and bus tables, and clarified the host/module boundary so security decisions execute in the compiled module while configuration, host callbacks, user interaction, and external-effect execution stay in the host.

Auto-committed-on: cuttlefish
Expanded the loadable modules guide to cover the TinySecurity module and its bus contract, added TinyEventQueues to the registry table, and reworded the host/module boundary and platform asset sections to reflect current behaviour. Also refreshed the approval gate and privacy docs to match.

Auto-committed-on: cuttlefish
Updated the "Always Allow a Tool" capability description to explain that always-allow saves a human-approved grant which still passes policy checks and hard blocks, and to note that optional Jev scoring is disabled in OpenHuman's TinySecurity configuration and cannot create lasting grants when enabled.

Auto-committed-on: cuttlefish
…undaries

Reworked the sandbox, security and approval READMEs to describe OpenHuman as a host adapter over TinySecurity and TinyBox rather than restating policy internals. The docs now point to the owning modules for policy and native execution behaviour and keep only the host-side mapping, routing and RPC contracts.

Auto-committed-on: cuttlefish
The native fixture test now covers redaction, path policy, action classification, privacy egress, and keyring denial against the pinned TinySecurity release, and the CI script invokes the renamed test. This broadens coverage beyond the initial policy-info check so the released module's contracts are verified end to end.

Auto-committed-on: cuttlefish
The security native fixture workflow is now callable from other workflows, and the fixture script corrupts a copy of the pinned module after checksum validation to exercise the rejection path. A new ignored test asserts that a tampered module fails closed during admission.

Auto-committed-on: cuttlefish
Wire the reusable security-native workflow into ci-full as a three-OS job and include its result in the aggregate gate so native security fixture failures block the pipeline.

Auto-committed-on: cuttlefish
The native fixture now requests the string-allowed path check kind instead of the protected kind, so the test exercises the path validation contract it is meant to cover.

Auto-committed-on: cuttlefish
The fixture no longer sets a user on the caller context, matching the current shape of the keyring request so the pinned release contract test compiles and exercises the intended path.

Auto-committed-on: cuttlefish
Adds the vendored tinysecurity-bus crate as a dependency of the CLI crate so its bus types are available alongside the existing tinycomputer-bus contract.

Auto-committed-on: cuttlefish
Regenerates Cargo.lock to include the tinysecurity-bus dependency now required by the workspace.

Auto-committed-on: cuttlefish
The example support harness called the async credential resolver without awaiting it, so the token lookup never ran. It now blocks in place on the current runtime handle to resolve the credential before building the request.

Auto-committed-on: cuttlefish
Update the native fixture test to check the egress decision through the Verdict enum rather than the removed Decision type, keeping the assertion aligned with the current bus API.

Auto-committed-on: cuttlefish
Add an ignored native fixture test that drives a real module keyring call through the host consent event and asserts a denial fails closed before any platform keyring backend is touched, and wire it into the CI fixture script.

Auto-committed-on: cuttlefish
The request body construction in the native security fixture was missing a closing parenthesis, so the test helper now compiles again.

Auto-committed-on: cuttlefish
The fixture now builds the RPC request body before the oneshot call and subscribes through the event bus accessor, which returns an error until the router initializes the bus, so the test unwraps it explicitly.

Auto-committed-on: cuttlefish
Wrap the oneshot sender in an Arc so the event bus callback can clone it into the async block, keeping the keyring denial fixture compiling under the subscription's move semantics.

Auto-committed-on: cuttlefish
Adds an ignored integration test that loads the released module and runs a harmless shell command through the public host adapter, so the sandbox plan and consume path is exercised on every CI OS.

Auto-committed-on: cuttlefish
Extend the security native fixture script to also run the CLI test that verifies execution goes through the module sandbox plan, so the sandbox path is covered alongside the existing keyring denial check.

Auto-committed-on: cuttlefish
Adds an ignored integration test that parks a real approval request through the gate, approves it via the host RPC controller, and asserts the caller resumes with an allow outcome.

Auto-committed-on: cuttlefish
Add the ignored native fixture test for approving a parked request round trip to the security native fixture script so it runs alongside the existing sandbox plan test.

Auto-committed-on: cuttlefish
The native fixture test now writes its config to the scratch directory and points the workspace, config, and action paths there before loading the module. This ensures the sandbox plan is built from the fixture's own persisted configuration rather than defaults.

Auto-committed-on: cuttlefish
The fixture now registers a command policy and classifies a curl command through the command API instead of the generic host action classifier, so it asserts the network class the pinned release actually reports.

Auto-committed-on: cuttlefish
The ignored native fixture test now creates a temporary workspace and points the config, action directory, and keyring backend at it, saving the config before initializing secret storage. This keeps the test from touching the developer's real workspace and keyring state.

Auto-committed-on: cuttlefish
The security fixture script now sets the fixture cache directory to mode 700 after creating it, so the isolated test fixtures are only accessible to the owning user.

Auto-committed-on: cuttlefish
Replace the removed batch path check with the single-path validation
calls and validate against the scratch directory instead of the process
working directory, so the fixture keeps exercising the pinned release
contracts.

Auto-committed-on: cuttlefish
The native fixture no longer registers a path policy or validates allowed and denied paths, leaving only the command policy coverage in that test.

Auto-committed-on: cuttlefish
…e workspace

Extend the native fixture to run a sandboxed command with a working directory outside the workspace and assert that the path policy refuses it. Also drop unused path-policy imports and a leftover workspace binding.

Auto-committed-on: cuttlefish
The fixture no longer exercises the privacy_check2 egress policy, so the
corresponding request and its deny-verdict assertion were removed along with
the now-unused imports.

Auto-committed-on: cuttlefish
Add assertions to the native fixture that exercise the production URL guard against loopback and the cloud metadata address, verifying non-global IPv4 detection without requiring network access.

Auto-committed-on: cuttlefish
…k lines

Reformat the docker_overrides assertion onto a single line and remove
stray trailing blank lines from the two security test files. No test
behaviour changes.

Auto-committed-on: cuttlefish
The keyring end-to-end test now awaits the secret storage and credential store operations, which became async, and the crypto characterization test is replaced by a keyring fixture test in the CLI test manifest.

Auto-committed-on: cuttlefish
…tests

The secret storage API is now synchronous, so the awaits in the storage
secrets test are removed. The headless keyring test no longer exercises
config ciphertext persistence, leaving it to cover only secret slot
persistence across restarts.

Auto-committed-on: cuttlefish
Updated the end-to-end tests to await the now-async session profile and HTTP credential calls, and removed an unused scratch config helper from the sandbox characterization test while fixing a malformed assertion.

Auto-committed-on: cuttlefish
Several test helpers called async functions without awaiting them and one test referenced SandboxConfig without importing it, so the affected e2e tests now await those calls and pull in the missing import to compile and run correctly.

Auto-committed-on: cuttlefish
Several auth end-to-end tests were synchronous despite exercising async auth and profile store paths, so they are now marked with tokio::test and declared async to run on the async runtime.

Auto-committed-on: cuttlefish
The test helpers that build configs and store session tokens now await the async APIs they call, and their call sites were updated to match. This keeps the end-to-end tests compiling against the async auth and registration paths.

Auto-committed-on: cuttlefish
Adds the aes-gcm crate to the CLI crate so it can perform AES-GCM encryption, with the lockfile updated to match.

Auto-committed-on: cuttlefish
The auth profile store and service methods became async, so the in-process end-to-end tests now await those calls to keep the suite compiling and exercising the same behaviour.

Auto-committed-on: cuttlefish
The auth end-to-end tests now await the profile store and Composio key helper calls that became async, keeping the assertions exercising the same behaviour against the updated API.

Auto-committed-on: cuttlefish
The test helpers now construct ProgressiveTransportRequest values directly instead of boxing them, matching the updated request type.

Auto-committed-on: cuttlefish
The composio e2e tests now await cached_active_integrations and resolve_composio_route, and the client factory modes test was converted to a tokio test so it can call those async helpers.

Auto-committed-on: cuttlefish
… store

Adds a test asserting that a default persisted auth profiles snapshot reports the Unix epoch as its updated_at timestamp, pinning the stable version used when no profile store exists yet.

Auto-committed-on: cuttlefish
The default persisted auth profile store now uses a constant epoch timestamp instead of the current time, so an empty store serializes deterministically and avoids spurious updated_at changes.

Auto-committed-on: cuttlefish
The end-to-end tests now expect auth profiles to live in the encrypted
auth-profiles/secrets.enc store rather than the legacy auth-profiles.json
file, matching the new storage layout. The HTTP credential compatibility
file is still asserted to remain untouched by the configured backend path.

Auto-committed-on: cuttlefish
The test now expects two auth profiles to remain after clearing the configured backend, since profiles use their own encrypted local store rather than the legacy file, and the comment was updated to explain that split.

Auto-committed-on: cuttlefish
Add the new devices.import_legacy method to the security registry contract and shift the entry indices accordingly, and point the spawn plan credential check at the renamed auth-profiles/secrets.enc path.

Auto-committed-on: cuttlefish
Collapse two multi-line `secret_storage::set` calls onto single lines to match formatting conventions. No behaviour changes.

Auto-committed-on: cuttlefish
Six auth end-to-end tests now use a multi-threaded Tokio runtime with two worker threads instead of the default single-threaded one, so they exercise the same concurrency behaviour as production.

Auto-committed-on: cuttlefish
Switch the credentials end-to-end tests from the blocking env lock to the async variant so the lock is awaited rather than held across await points, keeping the multi-threaded runtime from stalling.

Auto-committed-on: cuttlefish
Extracted the `agent_hint` and `workspace_dir` helpers from the `DomainEvent` impl in events.rs into a dedicated context module, and moved the corresponding tests into their own files. This keeps the event definitions file focused and gives the workspace-scoping logic a single, discoverable home.

Auto-committed-on: cuttlefish
Moved the failure redaction test module declaration into ops_tests so the test tree stays consistent with the layout check. Also lowered the pinned legacy size for core/events.rs to reflect its current length.

Auto-committed-on: cuttlefish
Removed an empty trailing line at the end of the ops module file.

Auto-committed-on: cuttlefish
The native approval fixture now passes a private sentinel argument through the shell request and asserts it never appears in the pending row output, guarding against request data being reflected through the unscoped callback path.

Auto-committed-on: cuttlefish
Add a test for the case where a unique extension writer is moved during a
substantial rewrite that Git records as a delete and add rather than a rename,
confirming the move is still recognised and that a genuine copy is still
rejected as extension growth.

Auto-committed-on: cuttlefish
Extension growth checks now recognize when a baseline extension entry was relocated to a different file in the same change, so moving an existing bypass no longer trips the growth guard. The match requires the same rule, text, and occurrence with exactly one prior and one current site on changed paths.

Auto-committed-on: cuttlefish
@senamakel
senamakel merged commit cc45f80 into epic/8369-security-migration Oct 28, 2026
14 of 18 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