Skip to content

Check Security sandbox capabilities during Setup - #967

Merged
JacobStephens2 merged 4 commits into
mainfrom
issue-608
Oct 21, 2026
Merged

JacobStephens2 merged 4 commits into
mainfrom
issue-608

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

Summary

Setup now warns about missing Security sandbox capabilities before a session needs them.

Setup saves the User config
  security.review or security.fix enabled?
    Linux: start bwrap, try network / home write-open / scratch write
      PASS, or failed check + operator-run installation/AppArmor commands
    macOS: probe unavailable
  both off: no probe

The probe uses a temporary local listener, a throwaway HOME and a three-second sandbox deadline. It executes only trusted built-in checks. A passing result covers these capabilities; sessions still enforce the complete Security audit skill policy. A contract test detects changes to that policy's isolation requirements.

Closes #608

Evidence

  • Before: cargo test --test setup security_sandbox_start_failure_warns_and_still_writes_the_user_config -- --exact failed because Setup printed no sandbox warning.
    After: the same test passes and verifies that the config is completed despite bwrap failure, with installation and AppArmor commands printed.
  • Real bwrap passes with isolation intact; removing network isolation, the read-only home mount, or scratch write access produces the corresponding failure. Missing/failing/hung bwrap and enabled/disabled saved settings are also covered.
  • cargo check, all 30 Setup tests, cargo fmt --check, and cargo clippy --all-targets -- -D warnings pass.
  • The full cargo test suite passes on Linux (exit 0).

Test seams

  • thirdshift setup through its CLI, User config, terminal output and sandbox executable on PATH.
  • The trusted probe process launched inside bwrap, observed through Setup's result.
  • The embedded Security audit skill's published isolation requirements and Setup coverage declaration.

Review coverage

Independent Standards and Spec reviews against main (455558de1e4677c699908c3331e8f99354307657). Both reviewed every changed file: docs/guide.md, src/main.rs, src/setup.rs, src/setup/sandbox.rs, and tests/setup.rs. Unread changed files: none. Generated-output exclusions: none.

Unaddressed findings

  • Standards: None.
  • Spec: None.

Security review outcome

  • Security review incomplete: session failed, ended early or omitted a valid final line; see Session log

Merge Danger

Door: two-way

Revert to remove the warning. Setup never installs packages, loads AppArmor policy, changes sysctls, or requests root.

Blast Radius: Setup

Security-enabled Setup performs a brief local capability probe. A failed probe leaves the saved User config usable. macOS reports unavailability; Linux behavior was exercised locally.

Built with codex · gpt-6.1-sol · high

The Setup sandbox paragraph changed docs/guide.md without updating its checked-in HTML, causing site-test's documentation freshness check to fail.

Validation: cd site && npm test (36 tests passed).
@JacobStephens2
JacobStephens2 merged commit a9a6509 into main Oct 21, 2026
18 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-608 branch October 21, 2026 21:50
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.

thirdshift setup: check that Security sessions can sandbox target code on this machine

1 participant