Repository navigation
Restrict default Seatbelt PTY access to workload terminals - #1530
Open
Elliot (theelliotm) wants to merge 1 commit into
Open
Elliot (theelliotm) wants to merge 1 commit into
Elliot (theelliotm) wants to merge 1 commit into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The kernel-enforced security boundary warrants human review across supported macOS versions, with reported runtime validation limited to macOS 27.0.1.
No open issues 🎉
What changed in this PR
Tightens Seatbelt terminal access to workload-assigned, inherited, and sandbox-authorized PTYs rather than unrelated host terminals.
Changes:
- Replaces blanket terminal grants with scoped authorization, including GUI mode.
- Adds terminal-isolation regressions and integrates them into the Seatbelt suite.
- Documents terminal access behavior and explicit overrides.
| File | Description |
|---|---|
| tests/scripts/run_seatbelt_tty_test.sh | Adds disposable same-user PTY isolation checks. |
| tests/scripts/run_seatbelt_all_tests.sh | Runs the terminal-isolation suite. |
| src/mxc-sdk/src/core/mxc_pty/mod.rs | Records the assigned macOS terminal path. |
| src/mxc-sdk/src/backends/seatbelt/common/seatbelt_runner.rs | Binds terminal paths into profiles and adds regression tests. |
| src/mxc-sdk/src/backends/seatbelt/common/profile_builder.rs | Restricts PTY grants to authorized terminals. |
| docs/backends/seatbelt/seatbelt-backend.md | Explains scoped access and override behavior. |
Review effort: Balanced
Elliot (theelliotm)
marked this pull request as ready for review
October 19, 2026 21:52
This branch has not been deployed
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.
📖 Description
Explicit filesystem grants and
profileOverridecan still widen access. Coverage verifies device opens and terminal controls, not host command execution or cross-terminal byte transfer.🔗 References
🔍 Validation
Local macOS 27.0.1 validation. Commands below run from
src/:cargo fmt --all -- --checkcargo clippy --locked -p mxc-sdk --lib --tests -- -D warningscargo test --locked -p mxc-sdk --lib backend_modules::seatbelt::common --quietcargo test --locked -p mxc-sdk --lib mxc_pty --quietcargo test --locked -p mxc-sdk --test streaming --quietcargo build --locked -p mxc_darwin --quietFrom the repository root:
MXC_EXEC_MAC="$PWD/src/target/debug/mxc-exec-mac" bash tests/scripts/run_seatbelt_tty_test.sh— all 8 cases passed.bash -n tests/scripts/run_seatbelt_tty_test.sh tests/scripts/run_seatbelt_all_tests.sh— passed.✅ Checklist
Cargo.lock, thedependency-feed-checkcheck passes (see pull request builds)📋 Issue Type
Microsoft Reviewers: Open in CodeFlow