chore(repo): Add Claude Code settings with basic permissions#959
chore(repo): Add Claude Code settings with basic permissions#959szokeasaurusrex merged 7 commits intomasterfrom
Conversation
Adds .claude/settings.json to enable Claude Code with: - Basic bash commands (find, ls, git, grep, mv) - WebFetch access to GitHub and Sentry documentation sites Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
I am not sure how I feel about this change; I think permissions settings are something that developers should configure for themselves. @lcian what do you think? |
|
@szokeasaurusrex, this is a handy default set of permissions for Claude across all SDKs and developers. You can still keep personal permissions locally for every dev. Sharing defaults helps everyone get started faster, but it’s totally optional—use them if you want, or just close the PR if not. |
|
I think as long as the commands cannot introduce any security problems in the developer's environment, this is not a big deal. |
szokeasaurusrex
left a comment
There was a problem hiding this comment.
Ok, you have convinced me that having defaults in the repo makes sense. But, I do have some opinions on some of the permissions.
I myself typically am okay with the agent taking more permissions, but I am not using YOLO mode. I also know that other devs may not want their agents to have that many permissions, so the defaults should be conservative imo.
Co-authored-by: Daniel Szoke <daniel.szoke@sentry.io>
Co-authored-by: Daniel Szoke <daniel.szoke@sentry.io>
Co-authored-by: Daniel Szoke <daniel.szoke@sentry.io>
Co-authored-by: Daniel Szoke <daniel.szoke@sentry.io>
| "Bash(gh repo view:*)", | ||
| "WebFetch(domain:docs.sentry.io)", | ||
| "WebFetch(domain:develop.sentry.dev)", | ||
| "Bash(grep:*)", |
There was a problem hiding this comment.
Bug: The .claude/settings.json file contains a trailing comma after the last array element. This is invalid in strict JSON and will cause a parsing error.
Severity: HIGH
Suggested Fix
Remove the trailing comma from line 26 in .claude/settings.json. The line should be changed from "Bash(grep:*)", to "Bash(grep:*)" to make the JSON file valid.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: .claude/settings.json#L26
Potential issue: The `.claude/settings.json` file contains a trailing comma on line 26
after the last element in an array. The Claude Code tool, which consumes this file, uses
a strict JSON parser that does not permit trailing commas. This will cause a parsing
failure when the tool attempts to load the configuration. Consequently, the settings
defined in the file, such as permissions for bash commands, will not be applied, and the
tool will fall back to default or more restrictive settings. The primary goal of the
pull request—to configure Claude Code—will not be achieved.
Did we get this right? 👍 / 👎 to inform future reviews.
Adds
.claude/settings.jsonto enable Claude Code with:This follows the same pattern used in other Sentry SDK repositories like sentry-javascript, sentry-dart, and sentry-react-native.
Note: This adds .claude/settings.json with -f flag since .claude is in .gitignore for local settings.