feature: feature: allow absolute path for macos seatbelt profiles (sa…#25024
feature: feature: allow absolute path for macos seatbelt profiles (sa…#25024flexponsive wants to merge 2 commits intogoogle-gemini:mainfrom
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 significantly enhances the macOS Seatbelt configuration by allowing the 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
|
There was a problem hiding this comment.
Code Review
This pull request enhances the start_sandbox function to support absolute paths for the SEATBELT_PROFILE environment variable on macOS, including security checks for path traversal. A new test case was added to verify this functionality. The review points out that the current logic for handling SEATBELT_PROFILE does not correctly default to 'permissive-open' when the environment variable is set to an empty or whitespace-only string, which could lead to a FatalSandboxError. A code suggestion is provided to address this edge case by explicitly trimming the input and applying the default if the result is empty, aligning with repository guidelines.
|
closing aas we don't want to impl it this way |
Summary
Enhance macOS Seatbelt configuration flexibility by allowing the
SEATBELT_PROFILEenvironment variable to accept absolute paths. This enables developers to maintain centralized sandbox policies across multiple repositories without duplicating configuration into every project's.geminifolder.Details
Updated the sandbox utility to check if the
SEATBELT_PROFILEvalue is an absolute path..geminifolder).This change is non-breaking and preserves all existing workflows.
Related Issues
Closes #24991
How to Validate
GEMINI_SANDBOX=sandbox-exec SEATBELT_PROFILE=$(pwd)/bundle/sandbox-macos-permissive-open.sb node bundle/gemini.js -sPre-Merge Checklist