Repository navigation
feat(sandbox): tole doctor lists sandbox grants and startup logs the sandbox decision - #818
Merged
Merged
Conversation
…sandbox decision What `tole doctor` prints the effective mode, workspace access, network, extra read/write grants and decision of each sandboxed stdio MCP server and each model-command consumer, flagging grants that touch $HOME or credential directories. Each stdio server logs one start-up line with its decision. Why The owner could not see from doctor which sensitive paths a sandbox grant exposes, nor, at startup, whether a server ran sandboxed, fell back to unsandboxed (optional, no bwrap) or was refused. Changes - sandbox::report: decide(), sensitive_kind(), doctor_grant_lines(), startup_line() and log_startup_once() (stderr, once per server and process). - mcp.rs logs the launch decision through log_startup_once. - doctor.rs prints the grant lines; docs/sandbox-design.md describes them. - No new config keys. Testing Unit tests with a fake bwrap in a TestDir cover the three decisions, the start-up lines against plan(), and the sensitive-grant listing. Closes #809
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
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.
What
tole doctorprints the effective mode, workspace access, network, extra read/write grants and decision of each sandboxed stdio MCP server and each model-command consumer, flagging grants that touch$HOMEor credential directories. Each stdio server logs one start-up line with its decision.Why
The owner could not see from doctor which sensitive paths a sandbox grant exposes, nor, at startup, whether a server ran sandboxed, fell back to unsandboxed (optional, no bwrap) or was refused.
Changes
sandbox::report:decide(),sensitive_kind(),doctor_grant_lines(),startup_line()andlog_startup_once()(stderr, once per server and process).mcp.rslogs the launch decision throughlog_startup_once(the optional-fallback warning now prints once per server instead of on every start).doctor.rsprints the grant lines;docs/sandbox-design.mddescribes them.Testing
Unit tests with a fake bwrap in a
TestDircover the three decisions, the start-up lines againstplan(), and the sensitive-grant listing. fmt, clippy (--workspace --all-targets --all-features -D warnings), tole-core and tole-cli tests, and the--no-default-featureslib tests pass. The tole-cli lib tests only compile with the fix from #815.Closes #809