Skip to content

Update Claude Code permissions - #38

Merged
erawat merged 1 commit into
masterfrom
update-claude-settings
Nov 10, 2026
Merged

erawat merged 1 commit into
masterfrom
update-claude-settings

Conversation

@erawat

@erawat erawat commented Nov 10, 2026

Copy link
Copy Markdown
Member

Automated update of .claude/settings.json from dev-ai-playbooks.

This is a full overwrite of the permissions file (allow + deny lists) to keep
this repo's Claude Code permissions in sync with the canonical template. If
this repo has custom allow entries not present in dev-ai-playbooks (e.g.
phpunit, npm, or other project-specific commands), check the diff before
merging
-- they will be removed by this PR and need to be re-added by hand.

Source checksum: 8cd91c129334


This PR was created automatically. It only affects what Bash commands Claude
Code can run in this repo -- no application code is changed.

Synced from dev-ai-playbooks.
Source checksum: 8cd91c129334
@erawat
erawat merged commit 971a2c7 into master Nov 10, 2026
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, 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 updates the Claude Code configuration to align with the repository's standard security policies. It ensures that the automated permission settings are consistent with the central playbook, specifically refining the allowed and denied bash commands to prevent potentially destructive operations.

Highlights

  • Permission Synchronization: Synchronized the .claude/settings.json configuration with the canonical dev-ai-playbooks template to ensure consistent security policies.
  • Security Hardening: Expanded the deny list to include a comprehensive set of destructive commands, including various force-push and recursive removal patterns.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the 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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. 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

  1. Review the Generative AI Prohibited Use Policy, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request modifies the Claude settings to allow git push commands while attempting to restrict force pushes and recursive deletions through specific pattern matching. However, the review feedback points out that these deny patterns are fragile and easily bypassed by altering flag combinations. To address these security concerns, it is recommended to use more robust wildcard patterns for blocking recursive deletions and to rely on remote branch protection rules as the primary defense against force pushes.

Comment thread .claude/settings.json
Comment on lines +22 to +30
"Bash(rm -rf*)",
"Bash(rm -fr*)",
"Bash(rm -Rf*)",
"Bash(rm -fR*)",
"Bash(rm -r -f*)",
"Bash(rm -f -r*)",
"Bash(rm -R -f*)",
"Bash(rm -f -R*)",
"Bash(rm --recursive*)"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-high high

WARNING: The current list of rm deny patterns is fragile and can be easily bypassed by inserting other flags in between (e.g., rm -rvf, rm -vrf, or rm -irf). Since Claude Code permissions use simple glob matching, we can robustly block all recursive deletions using wildcard patterns that target any hyphenated option containing r or R after a space, plus --recursive.

      "Bash(rm * -*r*)",
      "Bash(rm * -*R*)",
      "Bash(rm *--recursive*)"
References
  1. Section 2: Security (BLOCKER if violated) - Ensure robust security controls and prevent bypasses of safety restrictions. (link)

Comment thread .claude/settings.json
Comment on lines +13 to +20
"Bash(git push* --force*)",
"Bash(git push* +*)",
"Bash(git push* -f*)",
"Bash(git push* -uf*)",
"Bash(git push* -vf*)",
"Bash(git push* -qf*)",
"Bash(git push* -nf*)",
"Bash(git push* -df*)",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-medium medium

WARNING: Similar to the rm patterns, the git push force-deny list is easily bypassed by combining flags in different orders (e.g., git push -af or git push -vuf). Because glob patterns cannot easily match arbitrary combined flags without causing false positives on branch names containing the letter f, these patterns should not be solely relied upon. Please ensure that branch protection rules (e.g., blocking force pushes to main/master) are enabled on the remote repository as the primary line of defense.

References
  1. Section 2: Security (BLOCKER if violated) - Ensure robust security controls and prevent bypasses of safety restrictions. (link)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant