Repository navigation
refactor(security): move shell scanning to tinybox-core and delete the unused legacy sandbox stack - #6790
Merged
senamakel merged 12 commits intoSep 30, 2026
Conversation
Updated the vendored tinybox dependency to incorporate upstream fixes and improvements. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Introduce a new policy command module that provides structured command classification, name validation, environment guards, and quoting utilities. This change enables more granular and maintainable security policy enforcement by separating command-related logic into dedicated components. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Replace the in-tree Landlock, Firejail, Bubblewrap, and Docker sandbox implementations with the unified tinybox-core crate, which provides a consistent sandboxing interface across platforms. This removes over a thousand lines of duplicated detection logic, per-backend wrappers, and their associated tests, while adding the tinybox-core dependency to Cargo.lock. The change also updates import paths in command_checks.rs and classification.rs to use the new crate's shell scanning utilities. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The sandbox README, security README, and architecture guide no longer reference the removed `Sandbox` trait, `NoopSandbox`, `create_sandbox`, or the Docker/Bubblewrap/Firejail/Landlock backends. The documentation now correctly points to the new sandbox domain and `tinybox-jail` for confinement. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…rate The tinybox module pin exemption is updated to reflect a new pinned commit that includes the tinybox-core `shell::scan` module from tinyhumansai/tinybox#13, in addition to the existing tinybox-jail crate. The reason text is expanded to document both upstream changes while confirming that no module, contract, or bus source changes are introduced, so the registry artifact remains valid. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The expected commit hash for the tinybox submodule pin was truncated by one character, missing the final hex digit. This change restores the full hash to match the actual pinned commit, ensuring the CI exemption check validates against the correct revision. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The expected commit hash for the tinybox submodule was missing the final character, which has now been corrected to match the actual pinned version. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The lock file was updated to include the tinybox-core crate, which is now a required dependency for the openhuman-app project. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Contributor
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (25)
Comment |
Tiny Sweeper review
|
Updated the pinned commit for the vendor/tinybox subproject to incorporate upstream changes. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
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.
Summary
Wave 2: move the generic shell-scanning code to tinybox and delete an old sandbox stack that nothing called. The net change is −1.7k lines (39 added, 1,755 deleted).
Shell-scanning code moved to
tinybox-core::shell::scan(tinybox#13, stacked on #12)&, background-&and unquoted-character checks;command_basenameandnormalized_command_name;has_leading_env_assignmentandskip_env_assignments.tinybox_core::shell::scandirectly.classify_segmentandhas_hidden_execution;is_command_executor;SecurityPolicy,is_always_forbiddenand approvals.policy_*_tests.rsin OpenHuman are untouched and still pass.&&vs&,2>&1/&>, quoted vs unquoted heredoc delimiters, here-strings, unterminated heredocs, and.exeand letter-case normalisation.policy_command/quoting.rs(445 lines) is deleted, andcommand_name.rsandenv_guard.rsare trimmed.Old sandbox stack deleted
security::{traits, detect, bubblewrap, firejail, landlock, docker}had no callers anywhere in core, cli, embed, tinyhumans, app or tests. The only references were thepub uselines, docs and their own tests. The live path issandbox/ops.rsplustinybox-jail(from refactor(core): move tool/harness leaves, cwd jail, flow helpers and hotkey into vendor crates #6786), so runtime sandbox behaviour does not change.std::process::Commandin place. The tinyboxSandboxtrait is an async lifecycle for whole boxes, so it is not a drop-in replacement.security::{Sandbox, NoopSandbox, create_sandbox}go with them.landlockdependency is dropped;sandbox-landlocknow only enablestinybox-jail/landlock;sandbox-bubblewrapis kept as an empty feature so the feature-forwarding chain stays unchanged. It can be removed in a later cleanup.gitbooks/developing/architecture/security.mdand the two READMEs.sandbox/docker.rs, because it is the only live Docker path (docker run --rm, tied toSandboxPolicyandDockerOverrides).tinybox-dockermanages long-lived boxes through aHost, so moving it would be a redesign.Pin
tinybox is a registry module at v0.1.8. OpenHuman pins
oh-w2-tinybox-on-v0.1.8, which is v0.1.8 plus #12 and #13 and describes asv0.1.8-7-ga1b5bf0a. Theexpectin the existing tinybox exemption is updated to match. The module and bus source are unchanged.Verification
cargo check --tests -p openhuman -p openhuman-cli --features "$(bash scripts/ci/product-features.sh)"is clean.openhuman-embed+openhuman-tinyhumans --testsand--no-default-featuresbuilds all compile.tinybox-core: 153 + 6 + 9 tests pass. fmt andclippy -D warningsare clean.pnpm rust:layout,check-agent-runtime-boundary,check-feature-forwarding,check-gated-test-allowlistandcheck-submodule-monotonic.check-module-pinspasses tinybox through its exemption. The tinywallet and tinychannels failures are inherited from test: drop 45 quarantined raw-coverage files, dedupe vendor-covered tests, repoint vendor pins #6781.Merge order
tinybox#12, then tinybox#13, then a tinybox release. After that, re-pin and drop the exemption. This PR lands after #6789.