relax tool sandboxing overrides for plan mode to match defaults.#24762
relax tool sandboxing overrides for plan mode to match defaults.#24762
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request modifies the sandbox policy configuration to ensure that plan mode functions correctly when tool sandboxing is enabled. By relaxing the override restrictions, the system now permits internal services to perform necessary write operations to the temporary session directory while maintaining the overall security posture of the workspace. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
|
Size Change: -5 B (0%) Total Size: 34 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Code Review
This pull request updates the default sandbox policy to allow overrides and removes an unnecessary blank line in the configuration. A review comment identifies that the hardcoded fallback configuration in sandboxPolicyManager.ts also needs to be updated to maintain consistency with these changes.
Note: Security Review has been skipped due to the limited scope of the PR.
Summary
This PR enables tool sandboxing to function correctly when writing plan files to the temporary session directory. It changes
allowOverridesfromfalsetotrueformodes.planin thesandbox-default.tomlpolicy.Details
Previously, when tool sandboxing was enabled,
modes.planstrictly prohibited any sandbox overrides. This unintentionally blocked the internalSandboxedFileSystemServicefrom requesting the necessary write permissions to create and save.mdplan files to thetmpsession directory, causing operations in Plan Mode to fail with "Sandbox request rejected" errors.By setting
allowOverrides = truefor plan mode, we allow internal tools that are already permitted by the Policy Engine (likewrite_filefor plan files) to request the specific write overrides they need to function. The workspace itself remains read-only as defined by the policy, preserving the security posture.Related Issues
Fixes #24750
How to Validate
GEMINI_SANDBOX=docker)./plan).Pre-Merge Checklist