Add Claude settings configuration file#46
Conversation
Allow WebFetch and WebSearch tools, enable sandbox with autoAllowBashIfSandboxed. https://claude.ai/code/session_012Zf75Rf7DY5bKkLk6xCGFL
Allow all bash commands sandboxed to the working directory and all network requests (WebFetch, WebSearch). This is a good balance between security and velocity — override in .claude/settings.local.json if needed. https://claude.ai/code/session_012Zf75Rf7DY5bKkLk6xCGFL
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 establishes a foundational configuration for Claude's operational behavior by introducing a new settings file. It ensures Claude can perform necessary web-based tasks while operating within a secure sandboxed environment, with clear documentation provided for these new settings. Highlights
Changelog
Activity
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. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a configuration file for Claude, enabling web search and fetch capabilities, and automatically allowing bash commands within a sandboxed environment. While the changes are clearly described, the default setting to automatically allow bash commands presents a significant security concern. I've recommended a more secure default to prioritize safety, following the principle of least privilege, especially for a template repository that will be used for new projects.
| "autoAllowBashIfSandboxed": true, | ||
| "enabled": true |
There was a problem hiding this comment.
Enabling autoAllowBashIfSandboxed by default poses a significant security risk. While the execution is sandboxed, automatically allowing bash commands, especially in combination with enabled network access (WebFetch, WebSearch), increases the attack surface. A malicious or compromised model could potentially exploit this to perform unintended actions. It is recommended to follow the principle of least privilege and set this to false by default, requiring explicit user consent for command execution. This provides a safer default for projects based on this template.
If you apply this change, please also update the README.md to reflect the new default behavior.
| "autoAllowBashIfSandboxed": true, | |
| "enabled": true | |
| "autoAllowBashIfSandboxed": false, | |
| "enabled": true |
Summary
This PR introduces a new
.claude/settings.jsonconfiguration file to define permissions and sandbox settings for Claude operations.Key Changes
.claude/settings.jsonwith the following configurations:WebFetchandWebSearchcapabilitiesImplementation Details
The settings file establishes a baseline configuration that allows Claude to perform web-based operations (fetching and searching) while maintaining a sandboxed execution environment with automatic bash command authorization when the sandbox is active.
https://claude.ai/code/session_012Zf75Rf7DY5bKkLk6xCGFL