Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
805360d
Merge branch 'pr35' into phase8-pairing-renewal
senamakel Oct 18, 2026
fc2dc44
Merge branch 'epic/7328-crypto-contract' of /home/enamakel/work/openh…
senamakel Oct 18, 2026
a93a654
feat(device-pairing): add trusted module pairing lifecycle
senamakel Oct 18, 2026
8a17e08
Merge remote-tracking branch 'origin/main' into phase8-pairing-renewal
senamakel Oct 18, 2026
edf6414
Merge remote-tracking branch 'origin/pr-35-current' into phase8-pairi…
senamakel Oct 19, 2026
ffb24fe
fix(device-pairing): satisfy strict workspace clippy
senamakel Oct 19, 2026
82d1938
Merge remote-tracking branch 'origin/epic/7328-crypto-contract' into …
senamakel Oct 19, 2026
279d751
test: satisfy strict clippy in pairing assertions
senamakel Oct 19, 2026
c5d41e0
test: include pairing callback in native contract audit
senamakel Oct 19, 2026
9a68721
Merge remote-tracking branch 'origin/main' into epic/7328-device-pairing
senamakel Oct 21, 2026
b647782
fix(deps): patch webpki certificate advisories
senamakel Oct 21, 2026
25ee9a4
fix(pairing): retain channel history across renewals
senamakel Oct 21, 2026
d24875e
fix(pairing): reserve tombstone capacity and fence writes
senamakel Oct 21, 2026
d5f25a1
fix(pairing): retain grouped tombstones and retire faulted tunnels
senamakel Oct 21, 2026
e289b7a
test(pairing): move persistence regressions to sibling module
senamakel Oct 21, 2026
9afdd7a
fix(pairing): preserve owner after denied import
senamakel Oct 21, 2026
49c80ab
fix(pairing): preserve owner after denied revoke
senamakel Oct 21, 2026
d600e87
fix(release): secure Unix module package roots
senamakel Oct 21, 2026
96d8cc0
fix(device-pairing): validate channels and expire aliases
senamakel Oct 21, 2026
b3a6f5a
test(device-pairing): cover unlock alias expiry while waiting
senamakel Oct 21, 2026
7eb297a
chore: files changed crates/tinysecurity-bus/src/device_pairing.rs,cr…
senamakel Oct 21, 2026
91e876a
docs(device_pairing): document persistence fence and fault handling
senamakel Oct 21, 2026
0589c9e
chore: add compiled coverage check script bytecode
senamakel Oct 21, 2026
196a822
chore: remove generated coverage bytecode
senamakel Oct 21, 2026
4fd4b76
chore: ignore generated Python bytecode
senamakel Oct 21, 2026
b812655
fix(device-pairing): release persistence fence on validation failure
senamakel Oct 21, 2026
8e867f5
fix(device-pairing): fail revision on persistence error
senamakel Oct 21, 2026
a82e26f
test(device-pairing): cover canceled legacy import callback fault
senamakel Oct 21, 2026
1640f37
style(tinysecurity-module): reformat device pairing test assertions
senamakel Oct 21, 2026
5cfa10e
test(device-pairing): fix field access in post-store validation test
senamakel Oct 21, 2026
c388da4
test(device-pairing): fix fault injection call in post-store validati…
senamakel Oct 21, 2026
16cd946
chore(tinysecurity-module): document base64 dependency purpose
senamakel Oct 21, 2026
7e485b9
fix(device-pairing): validate unlock context and retire sessions on r…
senamakel Oct 21, 2026
e06b7b2
refactor(adapter_device_pairing): simplify session refresh error hand…
senamakel Oct 21, 2026
6d13ee7
fix(device-pairing): retire paired tunnel when session refresh fails
senamakel Oct 21, 2026
53c2731
test(crypto): cover rejection of plaintext pairing state
senamakel Oct 21, 2026
256a059
fix(tinysecurity-crypto): reject ciphertext without enc2 prefix
senamakel Oct 21, 2026
a03407f
fix(device-pairing): enforce unlock context and retire sessions on re…
senamakel Oct 21, 2026
8c671ac
test(device-pairing): reformat assertions to satisfy rustfmt
senamakel Oct 21, 2026
5937825
refactor(adapter_device_pairing): simplify refresh result handling
senamakel Oct 21, 2026
b816e95
test(device-pairing): map refresh error before asserting failure
senamakel Oct 21, 2026
4386e68
test(device-pairing): reformat clock rollback assertion
senamakel Oct 21, 2026
5a0b888
feat(device_pairing): add is_faulted accessor
senamakel Oct 21, 2026
ddfc22e
fix(device-pairing): retire paired scope when owner is faulted
senamakel Oct 21, 2026
dcf06b1
test(device-pairing): pass scope id to refresh calls
senamakel Oct 21, 2026
515d6c2
fix(device-pairing): validate unlock context before scope lookup
senamakel Oct 21, 2026
2a4bd22
refactor(adapter_device_pairing): defer lookup until after validation
senamakel Oct 21, 2026
3e53163
feat(crypto): support decrypting legacy enc: pairing state
senamakel Oct 21, 2026
71c4c13
style(cipher): reformat decrypt_legacy call chains
senamakel Oct 21, 2026
db68a43
test(crypto): build legacy cipher fixture without iterator collect
senamakel Oct 21, 2026
d81339a
test(crypto): simplify legacy hex encoding in cipher test
senamakel Oct 21, 2026
c370029
test(crypto): hoist hex alphabet constant to module scope
senamakel Oct 21, 2026
20826ee
fix(crypto): only retire paired tunnel handles
senamakel Oct 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/scripts/run-native-master-cipher-coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ fi
printf 'Native fixtures: repository working directory\n'
"$verifier" "$module"
"$device_verifier" "$module"
"$verifier" "$module" 18
external_cwd="$(mktemp -d)"
trap 'rmdir "$external_cwd"' EXIT
printf 'Native fixtures: external working directory\n'
(cd -- "$external_cwd" && "$verifier" "$module" && "$device_verifier" "$module")
(cd -- "$external_cwd" && "$verifier" "$module" && "$device_verifier" "$module" && "$verifier" "$module" 18)
12 changes: 12 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ jobs:
package_name="${CRATE_NAME}-${VERSION}-${BUNDLE_ID}"
package_root="dist/${package_name}"
mkdir -p "$package_root"
chmod 755 "$package_root"
install -m 755 "$module" "$package_root/"
install -m 644 LICENSE MODULE.md "$package_root/"

Expand All @@ -364,6 +365,11 @@ jobs:
> "$package_root/modules.toml"

tar -C "$package_root" -czf "dist/${package_name}.tar.gz" .
archive_root_mode="$(tar -tvzf "dist/${package_name}.tar.gz" | awk 'NR == 1 { print substr($0, 1, 10) }')"
if [[ "$archive_root_mode" != "drwxr-xr-x" ]]; then
echo "unsafe module archive root mode: ${archive_root_mode}" >&2
exit 1
fi
echo "archive=dist/${package_name}.tar.gz" >> "$GITHUB_OUTPUT"

- name: Assemble Windows module package
Expand Down Expand Up @@ -513,6 +519,7 @@ jobs:
package_name="${CRATE_NAME}-${VERSION}-${BUNDLE_ID}"
package_root="dist/${package_name}"
mkdir -p "$package_root"
chmod 755 "$package_root"
install -m 755 "$module" "$package_root/"
install -m 644 LICENSE MODULE.md "$package_root/"

Expand All @@ -522,6 +529,11 @@ jobs:
> "$package_root/modules.toml"

tar -C "$package_root" -czf "dist/${package_name}.tar.gz" .
archive_root_mode="$(tar -tvzf "dist/${package_name}.tar.gz" | awk 'NR == 1 { print substr($0, 1, 10) }')"
if [[ "$archive_root_mode" != "drwxr-xr-x" ]]; then
echo "unsafe module archive root mode: ${archive_root_mode}" >&2
exit 1
fi
echo "archive=dist/${package_name}.tar.gz" >> "$GITHUB_OUTPUT"

- name: Upload distribution package
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@ worktrees/*
.idea/
.vscode/
*.swp

# Python tooling bytecode
__pycache__/
*.pyc
*.pyo
9 changes: 5 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions MODULE.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ the [security architecture page](https://github.com/tinyhumansai/openhuman/blob/
## Confidential device handles
Full details: [`Confidential device handles`](docs/module-crypto.md#confidential-device-handles).

## Confidential paired-device lifecycle (contract 1.25)
Full details: [paired-device lifecycle specification](docs/specs/device-pairing-contract-1.25.md).

## Confidential injected master resolution
Full details: [`Confidential injected master resolution`](docs/module-crypto.md#confidential-injected-master-resolution).

Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ compile the transport-free `tinysecurity-bus` contract and load the isolated
Contract 1.23 adds confidential per-frame `DeviceFrame2` calls over the live
opaque tunnel capability issued by approved `ExecuteDevice2` work; see the
[device contract](MODULE.md#confidential-device-handles).
Contract 1.25 adds `DevicePairing2`, which owns the paired-device static
identity, ciphertext-only persistence, host-attested enrollment/reconnect,
session refresh and revocation while preserving the existing v2/v3/v4 wire;
see the [pairing lifecycle specification](docs/specs/device-pairing-contract-1.25.md).
Contract 1.1 also supplies immutable native [filesystem scopes](docs/specs/immutable-path-scopes.md)
through `RegisterPathPolicy`, `ValidatePath`, `ValidateParent` and `CheckPath`.
Contract 1.3 adds native `Redact`, `ScanPrompt` and `ScanToolDefinition`, with a
Expand Down Expand Up @@ -36,7 +40,7 @@ diagnostics work with disabled autonomy, which is the default.

This is bootstrap infrastructure for [OpenHuman #7328](https://github.com/tinyhumansai/openhuman/issues/7328)
and [TinySecurity #1](https://github.com/tinyhumansai/tinysecurity/issues/1).
It does **not** complete the migration. Concrete sandbox spawning, connection pinning, Linux Secret Service and pairing challenge delivery (`Begin`/`Verify`) remain unavailable; contract 1.14 password, keyring and pairing-status members are implemented. The optional [native device handle surface](MODULE.md#confidential-device-handles) uses authenticated confidential calls and exact human/audit receipts. Reserved wire types do not advertise callable handlers.
It does **not** complete the migration. Concrete sandbox spawning, connection pinning, Linux Secret Service and production host configuration/adapter migration remain unavailable. Contract 1.25 supplies the module-owned pairing and tunnel lifecycle; the host must provide the server-trusted controller/socket/reconnect callbacks and encrypted persistence plumbing described in its specification. The optional [native device handle surface](MODULE.md#confidential-device-handles) uses authenticated confidential calls; initial master unlock remains HumanOnly. Reserved wire types do not advertise callable handlers.
There is no production host migration until an upstream release and checksum
manifest exist.

Expand Down
8 changes: 8 additions & 0 deletions crates/tinysecurity-bus/src/callbacks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@ impl ApprovalCasRequest2 {
}
/// Fixed new callback identities; incompatible semantics never reuse legacy interfaces.
pub mod callback_names2 {
/// Fixed trusted-host pairing context and encrypted-state callback.
pub const DEVICE_PAIRING_HOST: &str = "ai.tinyhumans.tinysecurity.DevicePairingHost2";
/// Resolve one server-owned pairing/socket event against authenticated host state.
pub const RESOLVE_PAIRING_EVENT: &str = "ResolvePairingEvent";
/// Load or compare-and-swap ciphertext for the fixed module-owned identity record.
pub const PERSIST_DEVICE_PAIRING: &str = "PersistDevicePairing";
/// Consume a one-shot import handle and load bounded legacy device ciphertext.
pub const LOAD_LEGACY_DEVICE_IDENTITIES: &str = "LoadLegacyDeviceIdentities";
/// Fixed init-bound response-controlled confidential native output slots.
pub const SECRET_CIPHER_CONSUMER: &str = "ai.tinyhumans.tinysecurity.SecretCipherConsumer2";
/// Stage exact bound output privately until successful owner response.
Expand Down
2 changes: 1 addition & 1 deletion crates/tinysecurity-bus/src/device_frame_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ fn frame_operations_redact_both_payloads_without_changing_open_wire_shape()
#[test]
fn frame_member_name_is_stable_and_contract_version_is_bumped() {
assert_eq!(crate::names::methods::DEVICE_FRAME2, "DeviceFrame2");
assert_eq!(crate::CONTRACT_VERSION, (1, 24));
assert_eq!(crate::CONTRACT_VERSION, (1, 25));
}
Loading
Loading