Skip to content

feat(security): let a kernel-sandboxed agent shell rely on its jail - #8776

Merged
senamakel merged 20 commits into
tinyhumansai:mainfrom
senamakel:loosen-core
Nov 23, 2026
Merged

senamakel merged 20 commits into
tinyhumansai:mainfrom
senamakel:loosen-core

Conversation

@senamakel

@senamakel senamakel commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Summary

An autonomous cron agent defined with scheduled_actions = true, sandbox_mode = "sandboxed" and sandbox_filesystem_only = true runs its shell inside the kernel jail (Landlock / bubblewrap through TinyBox), which grants only its own folder. In production its runs died within minutes because of three host-side behaviours that add nothing once the jail is in place. This PR loosens those three. The secrets directory and the core's own keyring and config stay closed. The jail's grants, its credential deny list and the file-tool reservations keep them closed. The lexical floor never did that job.

1. Two refused shell commands ended the run

Symptom: the second [policy-blocked] shell result in a run, whatever the two commands were, ended it with "I stopped this turn early because a step this needs is blocked by your security settings."

Cause: blocked_by_policy had a budget of 1, and the ledger scopes every shell failure as just shell.

Change (agent/tinyagents/middleware/failure_policy.rs, repeated_failure.rs):

  • A refused shell command now gets SHELL_REFUSAL_BUDGET = 8 refusals of different commands, and any command that runs resets the count.
  • The same command refused a second time, compared by a fingerprint of its trimmed text, still ends the run at once (SAME_REFUSED_COMMAND_LIMIT = 2, tracked per run and cleared in finish_run).
  • The read-only tier's refusal keeps a budget of 1. In read-only mode every acting command is refused, so trying a different command cannot help.
  • Other tools keep a budget of 1.
  • The shell gets its own corrective nudge. The harness copy says "another refusal ends the turn", which is no longer true for a different shell command.

Why the scope was not changed: I first scoped the shell failure ledger by command. That also split the deliberate shared budgets for shell timeouts (uncertain_side_effect) and missing programs (missing_app). Their tests use different commands on purpose: a corrected command is still a retry of the same step. The ledger scope is computed before the result is classified, so it cannot vary by failure class. The budget and the per-command repeat check get the same effect for policy refusals only.

2. A lexical "protected path" floor refused ordinary commands inside the jail

Symptom: cd .., sed 's/../X/' and cat /etc/os-release were refused with "Command references a protected path". TinySecurity's floor refuses any command whose text contains a .. segment, /etc, /proc or a credential-store name, at both the security gate (Authorize) and inside the shell tool (Execute). No tier or flag skipped it.

Change:

  • SecurityPolicy::check_jailed_command (new, security/policy/jailed_commands.rs) waives only Refusal::Protected, and only for the harness flow.
  • The module answers the floor before the rest of its admission, so a floor refusal says nothing about the tier gate, hidden execution or the budget. Treating it as plain "allowed" would have skipped those checks. Instead the host asks the module again, with path-like words replaced by x (quotes, $, backticks and parentheses are kept) and the original class declared (CommandDenial::Protected still carries the class, read through a Classify call). So:
    • the read-only refusal, the hidden-execution defence, approval prompts and the hourly budget all still apply;
    • the class can only go up;
    • a command whose protected words cannot be neutralized stays refused.
  • The security gate gets with_sandboxed_shell(..), set the same way as with_scheduled_actions (bundle.rs, turn_exec/drive.rs) from the run's sandbox_mode == Sandboxed.
  • ShellTool uses the same check at Execute when sandbox_mode_for_tool(context) is Sandboxed.

Fail closed: a Sandboxed run always plans (should_plan_command), but the plan can still resolve to the host executor, for example when the operator turned the sandbox off. In that case run_in_policy refuses the command with the floor's original message (unjailed_floor_refusal), right after the backend is resolved. The native (non-plan) path also refuses a waived command. Commands outside the jail, scheduled shell jobs and every other tool keep the floor unchanged.

3. [runtime.local_jail] grants never reached the sandboxed shell

Symptom: extra_read_write, extra_read_only, toolchain_homes and allow_proc reached the jail only with security off, or for the MCP sandbox. An operator could not give the sandboxed agent shell a readable code checkout or a writable scratch folder.

Change: ShellTool::run_sandboxed now applies local_grants::with_resolved_grants to a native-jail (Local) policy before planning (shell_run::with_jail_grants). Containers and boxes keep their own mounts. If the grants cannot be resolved, the policy is left as it was.

What still decides: TinyBox drops grants on TinySecurity's floor while resolving them. The spawn plan then admits each remaining grant through PathScope::validate_grant (refused if it overlaps workspace_dir, internal state, a reservation or a protected subtree) and checks it against the grant ceiling. credential_denials keeps the core's secrets file, auth profiles, flow HTTP credentials and config.toml (credentials::credential_files), plus the native credential roots, on the jail's deny list, and refuses a plan whose workspace or writable grant sits inside one.

What stays closed and why

  • Secrets, keyring and config: on the jail's deny list (spawn_plan::host_credential_denials). A grant that overlaps workspace_dir is refused by the plan.
  • File tools: file_read, file_write and the other file tools are untouched. They keep TinySecurity's path policy and the internal-state reservations.
  • Unjailed shell commands: the protected-path floor applies exactly as before.

Tests

The new tests sit beside each module's existing tests:

  • middleware_failure_policy_class_tests.rs:
    • refused_shell_commands_are_budgeted_per_command
    • the_same_refused_shell_command_retried_still_stops_the_turn
    • refused_shell_commands_with_nothing_running_still_stop_the_turn
    • a_second_policy_block_on_another_tool_still_stops_the_turn
    • the budget assertion in a_policy_block_allows_one_alternative_but_a_user_denial_does_not is updated
  • security/policy/jailed_commands_tests.rs:
    • the waiver itself
    • the floor still refuses when not jailed
    • read-only and hidden-execution refusals kept
    • class and stage carried
    • an unknown class keeps the refusal
    • the scheduled flow keeps the floor
    • the neutralizer
  • host/security_gate_jailed_shell_tests.rs: the gate allows when sandboxed, refuses when not, and keeps the read-only refusal.
  • shell_tests_runtime_and_sandbox_tests.rs: the Execute-stage check (jailed vs not, read-only kept) and the whole tool still refusing with no sandbox mode.
  • shell_run_tests.rs:
    • configured_local_jail_grants_reach_a_jailed_shell: extra grants arrive, a floor grant is dropped, a container keeps its own mounts
    • only_a_host_run_of_a_waived_command_is_refused

The item-1 tests failed against the unchanged code (4 failed, the negative control passed) and pass after the fix. The item-2 and item-3 tests target new APIs, so against the old code they fail to compile rather than fail an assertion.

Commands run:

  • cargo test -p openhuman --lib -- agent::tinyagents security::policy tools::implementations::system::shell sandbox::local_grants: 652 passed, 12 failed.
  • All the new tests pass, and so do the existing shell timeout, missing-program and read-only stop-cause tests.

The 12 failures are environmental on the box I ran this on, and none involves the logic changed here:

  • 10 compare text the security scrubber returned as [REDACTED] (first_error_line_is_scrubbed…, tool_output…, terminal_inference…, loop_guard…, a_refused_integration…, a_refusal_later_in_the_batch…, and a_blocked_shell_command_lets_the_model_try_a_narrower_one, which fails only on its contains("Unbounded system scan") check of the redacted error line);
  • modules::security::policy::tests::concurrent_tenants_each_unlock_their_config_secrets fails because the security module is unavailable;
  • shell_run::tests::a_sandboxed_command_yields_and_is_followed_to_its_end timed out after 1s.

I did not confirm these failures against base.

Other checks:

  • cargo clippy -p openhuman -- -D warnings: clean.
  • cargo clippy --all-targets reports pre-existing errors in other test files only.
  • cargo fmt and node scripts/ci/check-openhuman-rust-layout.mjs both pass.

Not done

  • There is no integration test of the host-fallback refusal. On the test box the unsandboxed test policy was planned into the native jail (the command ran jailed), so the test could not exercise the host path. The guard is covered by a unit test of unjailed_floor_refusal, applied in run_in_policy right after the backend is resolved.
  • shell_process and the exec adapters (tools/impl/system/exec_adapters.rs) still apply the floor unconditionally.
  • No change under vendor/. Waiving a single refusal inside the module, or returning the class with a floor refusal, would be cleaner as a TinySecurity contract change.
  • On macOS the native jail runs with JailEnforcement::Declared (partial, best effort). The waiver treats it as jailed, like Linux.

Summary by CodeRabbit

  • New Features

    • Sandboxed shell commands can now work with protected paths when permitted by the sandbox’s security controls. Commands run outside the sandbox remain subject to protected-path restrictions.
    • Local jail permissions are applied to sandboxed shell execution.
    • After a shell command is refused, the agent can try other commands; repeating the same refused command twice stops further attempts.
  • Documentation

    • Updated security and sandbox documentation to explain these behaviors.

senamakel and others added 20 commits November 23, 2026 20:23
Refused shell commands are now budgeted per command rather than per run, so tests assert that distinct commands keep the turn alive while a repeated command or a second block on another tool still halts it. A new scope test also checks that shell failure scopes fingerprint the command without persisting its text.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add a `protected_class` hook to `CommandGateway` and a
`protected_command_class` helper on `SecurityPolicy` that reports the
command class when the only refusal came from the protected-path floor.
This lets callers distinguish floor-only refusals from other denials
without changing existing refusal behaviour.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Introduce a jailed_commands module under the security policy with test support exposing a floor policy and gateway, and wire it into the policy module so tests can exercise command jailing behaviour.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Adds unit tests covering the jailed command policy so its allow and deny behaviour is verified.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The security gate now knows whether a run's shell is jailed and, when it is, authorizes commands through check_jailed_command so only the lexical protected-path floor is waived while every other refusal still applies. The shell re-checks at execution and refuses if the command would land on the host.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add tests asserting that a shell running in the kernel jail is allowed to
name protected paths such as `..` or `/etc/os-release`, while an unsandboxed
shell still hits the protected-path floor and a read-only autonomy level still
refuses writes. This pins the behaviour that motivated the fix.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
A command admitted only because it would run in the jail now gets refused when it resolves to the host backend, since the protected-path floor is the only boundary left there. Added a helper for the check and tests covering the refusal and the backends it does not apply to.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…ants

Execution-stage admission now distinguishes jailed commands from host ones, so a command admitted for the sandbox no longer answers to the lexical protected-path floor and is refused outright if it would fall through to the host. The sandbox path also resolves the operator's `[runtime.local_jail]` grants before planning, falling back to the workspace-only jail if they are unavailable.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The shell tool now resolves local jail grants only when the sandbox backend is the native local jail, leaving container and box policies untouched. This avoids applying local-only grant resolution to backends that manage their own boundaries, with tests covering the protected-path floor at execution.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Moved the `[runtime.local_jail]` grant resolution out of the shell tool into a `with_jail_grants` helper in `shell_run`, so the logic sits with the rest of the spawn-plan handling and can be tested directly. Added a test covering extra read-only and read-write grants reaching a jailed shell and floor grants being dropped.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…rants

The security policy README now explains how shell commands running inside the kernel sandbox are checked with the protected-path floor waived while every other refusal is kept, and the sandbox and cron READMEs describe how local jail grants are resolved and admitted. The approval-gate page was corrected to match.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Removed the unused `FloorGateway` re-export from the policy module's test-only imports, leaving only `floor_policy`. This trims a stale import that no longer has any consumers.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Shell failures now use a fingerprint of the command as their failure scope, so a refusal of one command no longer shares a budget with an unrelated one. Blocked shell commands also get a few retries before the turn stops, since previously any two refused commands in a run ended it.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Shell policy refusals now share a wider class budget that a successful command resets, so unrelated refused commands no longer end the run together. The same command refused unchanged three times still stops the turn, tracked per run by command fingerprint.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The assess implementation now takes the run context instead of ignoring it, so the refused command budget can be computed from the instance id. This removes the unused parameter and lets the policy apply per-instance budget logic.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Read-only refusals now get a single retry instead of the wider shell budget, since every acting command is refused alike in that mode. The same refused command now stops the turn on its second refusal, and a dedicated nudge tells the model to try a different permitted command rather than resending the same one.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Reworded the shell refusal nudge to tell the model to try a different, narrower, permitted command, making the guidance clearer when a command is blocked by policy.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Include the command output in the assertion message so a failing jail check shows what the command actually returned, making the failure easier to diagnose.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Reformatted several security policy test files to satisfy rustfmt line-length rules and reordered the re-exports in the policy module so the jailed-commands items sit together. No behaviour changed.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The protected-path floor tests for jailed shells were extracted from the main security gate test file into a dedicated module, keeping the growing test suite organised without changing what the tests cover.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Copilot AI balanced review requested due to automatic review settings November 23, 2026 21:37
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T21:44:43.475694Z 434f80f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

Walkthrough

Sandboxed shell commands can use jailed-command checks that waive the protected-path floor refusal for eligible harness commands. The shell execution path carries that result through backend routing and local-jail grant resolution. Agent security gates and shell refusal handling also account for sandbox mode and repeated refusals.

Changes: Sandboxed Shell Security

Layer / File(s) Summary
Jailed-command policy
crates/openhuman-core/src/security/policy/jailed_commands.rs, crates/openhuman-core/src/security/policy/native_commands.rs, crates/openhuman-core/src/security/policy/mod.rs, crates/openhuman-core/src/security/policy/jailed_commands/*, crates/openhuman-core/src/security/policy/jailed_commands_tests.rs, crates/openhuman-core/src/security/policy/README.md, crates/openhuman-core/src/cron/README.md, docs/gitbooks/en/features/approval-gate.md
The policy adds protected-command classification and path neutralization for eligible harness commands. Tests cover preserved refusals and classifications. The documentation describes the sandboxed-shell boundary and retained checks.
Shell execution and jail grants
crates/openhuman-core/src/tools/impl/system/shell.rs, crates/openhuman-core/src/tools/impl/system/shell_run.rs, crates/openhuman-core/src/tools/impl/system/shell_run_tests.rs, crates/openhuman-core/src/tools/impl/system/shell_tests_runtime_and_sandbox_tests.rs, crates/openhuman-core/src/sandbox/README.md
The shell execution path carries the floor-waived state through backend routing. It refuses host execution when the floor was waived and applies resolved local-jail grants to local policies. Tests cover backend routing and grant handling.
Agent security-gate wiring
crates/openhuman-core/src/agent/tinyagents/host/bundle.rs, crates/openhuman-core/src/agent/tinyagents/host/security_gate.rs, crates/openhuman-core/src/agent/tinyagents/host/security_gate/authorize.rs, crates/openhuman-core/src/agent/tinyagents/host/security_gate_tests.rs, crates/openhuman-core/src/agent/tinyagents/host/security_gate_jailed_shell_tests.rs, crates/openhuman-core/src/agent/tinyagents/turn_exec/drive.rs
The host and native subagent security gates receive sandbox-mode state. Sandboxed shell authorization uses jailed-command checks; tests cover sandboxed, unsandboxed, and read-only cases.
Shell refusal handling
crates/openhuman-core/src/agent/tinyagents/middleware/failure_policy.rs, crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure.rs, crates/openhuman-core/src/agent/tinyagents/middleware_failure_policy_class_tests.rs
Shell policy refusals receive a retry budget of eight, except read-only refusals. Repeating the same trimmed command twice exhausts its budget, and tests cover distinct and repeated refusals.

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant ShellTool
  participant SecurityPolicy
  participant SandboxBackend
  ShellTool->>SecurityPolicy: Check sandboxed command
  SecurityPolicy-->>ShellTool: Return verdict and floor_waived
  ShellTool->>SandboxBackend: Route command with floor_waived
Loading

Possibly related PRs

  • tinyhumansai/openhuman#8678: Both changes affect sandboxed agent shell jail planning; this PR also adds protected-path floor handling and local-jail grants.

Suggested labels: rust-core

Suggested reviewers: sanil-23, m3ga-mind, tinysweeper

Merge Risk: Low · up to 434f8

The refusal-handling change has a small regression-test gap: repeating the first command after another refusal is not actually tested. Correcting that fixture is straightforward; no production defect was established, so merging carries low risk with this follow-up.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the paths with care,
Then hops where jail grants make it fair.
A refused command gets one clear sign,
Try another path or tool in time.
The shell runs safely, hop by hop.

@coderabbitai coderabbitai Bot added the rust-core Core Rust runtime in src/: CLI, core_server, shared infrastructure. label Nov 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The adapter authorizes rewritten shell text rather than the command that will execute, violating the security contract, while real-module waiver behavior and host-fallback enforcement lack integration coverage.

3 open issues
What changed in this PR

This PR adjusts OpenHuman’s sandboxed agent shell to rely on jail isolation for protected paths, while retaining other security checks and guards against unjailed execution.

Changes:

  • Expands the retry budget for different refused shell commands while stopping repeated identical refusals.
  • Adds sandbox-aware command admission at authorization and execution, with a host-fallback refusal.
  • Forwards configured local-jail grants and adds focused tests and documentation.
File Description
docs/​gitbooks/​en/​features/​approval-gate.md Documents the sandboxed-shell floor exception.
crates/​openhuman-core/​src/​tools/​impl/​system/​shell.rs Adds jailed execution checks and grant forwarding.
crates/​openhuman-core/​src/​tools/​impl/​system/​shell_tests_runtime_and_sandbox_tests.rs Tests execution-stage admission and refusals.
crates/​openhuman-core/​src/​tools/​impl/​system/​shell_run.rs Adds host-fallback refusal and local-jail grants.
crates/​openhuman-core/​src/​tools/​impl/​system/​shell_run_tests.rs Tests fallback helper and grant propagation.
crates/​openhuman-core/​src/​security/​policy/​README.md Explains jailed command admission.
crates/​openhuman-core/​src/​security/​policy/​native_commands.rs Retrieves classes for protected-path refusals.
crates/​openhuman-core/​src/​security/​policy/​mod.rs Registers jailed-command support.
crates/​openhuman-core/​src/​security/​policy/​jailed_commands/​test_support.rs Adds a scripted command gateway for tests.
crates/​openhuman-core/​src/​security/​policy/​jailed_commands.rs Implements the floor waiver and text neutralization.
crates/​openhuman-core/​src/​security/​policy/​jailed_commands_tests.rs Tests waiver behavior and retained restrictions.
crates/​openhuman-core/​src/​sandbox/​README.md Documents local-jail grant propagation.
crates/​openhuman-core/​src/​cron/​README.md Clarifies sandboxed cron shell behavior.
crates/​openhuman-core/​src/​agent/​tinyagents/​turn_exec/​drive.rs Passes sandbox mode into the security gate.
crates/​openhuman-core/​src/​agent/​tinyagents/​middleware/​repeated_failure.rs Tracks repeated refusals by command.
crates/​openhuman-core/​src/​agent/​tinyagents/​middleware/​failure_policy.rs Expands shell refusal budgets and guidance.
crates/​openhuman-core/​src/​agent/​tinyagents/​middleware_failure_policy_class_tests.rs Tests distinct and repeated command refusals.
crates/​openhuman-core/​src/​agent/​tinyagents/​host/​security_gate/​authorize.rs Uses jailed admission for sandboxed shells.
crates/​openhuman-core/​src/​agent/​tinyagents/​host/​security_gate.rs Adds sandboxed-shell gate configuration.
crates/​openhuman-core/​src/​agent/​tinyagents/​host/​security_gate_tests.rs Registers jailed-shell tests.
crates/​openhuman-core/​src/​agent/​tinyagents/​host/​security_gate_jailed_shell_tests.rs Tests sandbox-aware authorization.
crates/​openhuman-core/​src/​agent/​tinyagents/​host/​bundle.rs Configures the gate from the turn’s sandbox mode.

Review effort: Balanced

Comment on lines +69 to +73
let verdict = self
.check_command(CommandQuery {
command: &neutral,
declared,
..query

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partly addressed in 52fcd0c: the neutralized text no longer drops the command word or env-assignment names (e.g. GIT_PAGER=../pager git log -> GIT_PAGER=x git log), so command-sensitive checks still see them. Not done here: forwarding the exact original command with a trusted sandbox context requires a new jailed-admission operation in the TinySecurity contract and a new module release/gitlink. That is an upstream change outside this PR; leaving the thread open as the tracked follow-up.

Comment on lines +456 to +457
(decision.denial == Some(tinysecurity_bus::CommandDenial::Protected))
.then(|| from_bus_class(decision.class))

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid gap: the jailed-command tests use FloorGateway, so they do not exercise the pinned module's Classify response. Not added in this change; a smoke test through the pinned module is a follow-up. Leaving open.

Comment on lines +234 to +235
if let Some(refusal) = unjailed_floor_refusal(floor_waived, resolved.backend()) {
return (false, refusal);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid gap: host fallback is covered at the helper level (unjailed_floor_refusal, now also the macOS Seatbelt case) and by the guard in run_in_policy, but not by an end-to-end host-plan test asserting no process launched. Not added in this change; leaving open.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 434f80f4dc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +70 to +74
.check_command(CommandQuery {
command: &neutral,
declared,
..query
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Put the floor waiver behind TinySecurity's bus contract

check_jailed_command now interprets a TinySecurity Protected decision, rewrites the command, and decides whether a second verdict should supersede the first, which is a command/path-policy algorithm rather than host configuration or execution orchestration. The repository explicitly requires missing loadable-module behavior to be added to the owning contract and implementation instead of introducing a host-side workaround; add a jailed-command operation or sandbox context to tinysecurity-bus/TinySecurity and keep this crate as the adapter that passes context and executes the returned decision.

AGENTS.md reference: AGENTS.md:L571-L574

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed on the design. This PR keeps the waiver as a thin host adapter that fails closed (any refusal other than the floor stays, an un-neutralizable command stays refused, host and macOS Seatbelt runs refuse). Moving the algorithm into tinysecurity-bus needs an upstream contract and release first; left open as the follow-up rather than done in this PR.

@senamakel
senamakel merged commit 10219ff into tinyhumansai:main Nov 23, 2026
15 of 23 checks passed
senamakel added a commit that referenced this pull request Nov 24, 2026
fix(shell): follow-ups to #8776 that missed the merge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rust-core Core Rust runtime in src/: CLI, core_server, shared infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants