Repository navigation
Preserve custom Rust homes in local grants and native shell execution - #84
SayrWolfridge wants to merge 15 commits into
Conversation
Tiny Sweeper review
Last completed reportTiny Sweeper reviewTiny Sweeper reviewed this change across 5 lane(s) and found 0 active actionable finding(s). Detailed lane evidence and any incomplete work are listed below. State: Incomplete Review snapshot
Completeness: Incomplete FeaturesNone identified with supported citations. TestsNo supported feature-to-test mapping was produced. Test execution is not inferred. FindingsNo active actionable findings. Could not review: crates/tinybox-jail/tests/toolchain_homes.rs, crates/tinybox-module/src/tinybus_module/native_jail_tests.rs Before merge
How this fits togetherflowchart LR
n0["LocalGrants<br/>changed"]:::changed
n1["ResolveLocalGrantsRequest<br/>changed"]:::changed
n2["NativeJailConfig<br/>changed"]:::changed
n3["...est_keeps_explicit_enforcement_and_grants<br/>changed"]:::changed
n4["..._vocabulary_is_typed_bounded_and_additive<br/>changed"]:::changed
n5["...ker_facts_are_additive_and_default_safely<br/>changed"]:::changed
n6["...nfiguration_defaults_and_floor_round_trip<br/>changed"]:::changed
n7["Error"]:::impacted
n8["resolve_local_grants"]:::impacted
n9["LocalGrantConfig"]:::impacted
n10["ProtectedPaths"]:::impacted
n1 -->|uses| n9
n1 -->|uses| n10
n3 -->|uses| n2
n3 -->|uses| n7
n4 -->|uses| n7
n5 -->|uses| n7
n6 -->|uses| n1
n6 -->|uses| n7
n6 -->|uses| n9
n6 -->|uses| n10
n8 -->|uses| n0
n8 -->|uses| n1
classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Comment |
There was a problem hiding this comment.
tinysweeper found nothing blocking, but could not review everything, so this is not an approval: crates/tinybox-jail/src/grants/mod.rs, crates/tinybox-jail/src/grants/mod_tests.rs, crates/tinybox-module/tests/rust_homes_manifest_e2e.rs.
$0.0142 · 1,866,000 in / 179,063 out · 193,024 cached (10%) · ladder/vectors-oai3, glm-5.3-flash, , deepseek-v4.1-flash · 770 embedded
critique: $0.0090 · 925,696 in / 114,017 out · 125,184 cached (14%) · glm-5.3-flash,
security: $0.0047 · 737,093 in / 60,825 out · 58,624 cached (8%) · deepseek-v4.1-flash
tests: $0.0001 · 90,194 in / 616 out · 4,352 cached (5%) · deepseek-v4.1-flash
description: $0.0000 · 75,838 in / 463 out · 4,864 cached (6%) · deepseek-v4.1-flash
|
The supply-chain failure also reproduces on untouched base Both report RUSTSEC-2026-0346 through RUSTSEC-2026-0349 for |
There was a problem hiding this comment.
tinysweeper found nothing blocking, but could not review everything, so this is not an approval: crates/tinybox-jail/tests/toolchain_homes.rs, crates/tinybox-module/src/tinybus_module/native_jail_tests.rs.
$0.0047 · 979,477 in / 58,805 out · 141,440 cached (14%) · ladder/vectors-oai3, deepseek-v4.1-flash, glm-5.3-flash, · 777 embedded
critique: $0.0027 · 501,254 in / 31,580 out · 53,376 cached (11%) · deepseek-v4.1-flash, glm-5.3-flash,
security: $0.0016 · 160,494 in / 23,028 out · 42,496 cached (26%) · deepseek-v4.1-flash
tests: $0.0001 · 149,477 in / 1,015 out · 5,376 cached (4%) · deepseek-v4.1-flash
description: $0.0001 · 127,813 in / 955 out · 40,192 cached (31%) · deepseek-v4.1-flash
|
All 13 module-ci checks pass on |
Summary
Native shell execution currently drops configured
RUSTUP_HOMEandCARGO_HOME, while grant discovery only considers default homes. Preserve the selected OS paths through both boundaries, including non-UTF8 Unix paths. Keep Rustup and selected Cargo executable, configuration and cache state read-only under the existing protected-path floor.Related issue
Follow-up to OpenHuman #7037, whose affected execution and grant discovery now live in TinyBox. The original routing contribution was OpenHuman #6978.
API or behavior changes
Updated against upstream v0.1.34 (
bcea8a7), including the rustls 0.23.46 security patch. Upstream contract 1.19 retains its network policy and event vocabulary; the Rust-home transport is additive in contract 1.20.ResolveLocalGrantsRequest.allow_unix_paths(default false) and optionalunix_pathsgroups inLocalGrantsandNativeJailConfig. Empty optional values retain the established serialized payloads; opted-in Unix callers carry non-UTF8 paths as byte vectors.RUSTUP_HOMEandCARGO_HOMEvalues retain their OS encoding in the native child environment; approved request overrides keep precedence. Empty toolchain values behave as unset.toolchain_homesenabled, existing absolute configured homes enter selective discovery. Rustup and Cargobin, configuration,env,registryandgitremain read-only. Fixed requested/canonical aliases are reserved before admission; the credential floor and writable-extra checks apply throughout. Fetching dependencies requires separately approved disposable Cargo state.Validation
Commands passed on the exact Linux candidate:
cargo fmt --all -- --checkcargo clippy --all-targets --all-features -- -D warningscargo build --all-targets --all-featurescargo test --all-featuresbash scripts/check-coverage.sh(90% per-file gate)bash scripts/test-e2e.shThe baseline reproduction runs new regression tests over untouched
7ceaf5c: two public configured-home discovery tests and one actual shell-child environment test fail at runtime. Exact candidate9955f6da15ecpassed Linux validation: the canonical commands, compiled-module Rust-home scenarios, packaged-module E2E, and the 90% per-file coverage gate (85 crate files, lowest file 90.00%). The canonical pinned cargo-deny action also passed on the exact source. The same source passed macOS strict Clippy, public resolver regressions, all seven native-jail checks, byte-exact shell-child execution, compiled-module admission, and the default/all-features workspace test matrix.Tests
Public resolver tests use subprocess-seeded environments and actual UTF8 paths; Unix filesystems accepting non-UTF8 names also exercise actual byte-path grants. macOS asserts EILSEQ for invalid UTF8 fixture names and omission of those unavailable homes. Missing custom homes are checked through the public resolver on every platform. Grant tests cover missing/relative homes, disabled discovery, selective cache access, protected descendants and aliases, whole-Cargo-root refusal and unrelated safe extra grants. Serialization tests cover legacy defaults and byte preservation; jail tests cover malformed paths, combined bounds and enforcement. Native-jail byte-vector decoding and flag preservation use existing Unicode paths on all Unix platforms; macOS also checks rejection of unavailable non-UTF8 paths, and other Unix platforms retain the real non-UTF8 path case.
The compiled-module regression admits the actual dynamic artifact and calls discovery and native shell execution through the public bus. UTF8 and Unix-byte scenarios check byte-exact child environment values, including the rejected filesystem names on macOS. Linux runs the installed Cargo/Rust toolchain with a custom UTF8 Rustup path and Unix-byte Cargo path. A second confined case uses Unix-byte paths for both homes. Both cases read admitted fixtures, write the workspace, and require kernel denial of host-state writes, credential reads and an outside sentinel.
Documentation
Updated local-grants and native-shell specs/plans, grant and native-shell module READMEs, and the TinyBus module's contract history. Constructor examples and existing integration fixtures initialize the additive fields.
Checklist
#[allow(...)],#[ignore], or relaxed lints.envcontents in the diff or the descriptionPrepared with OpenAI Codex and submitted from SayrWolfridge. Lisa approved the contribution and the read-only shared-cache policy.