feat(claude): enhance permissions with context-aware safety patterns #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Comprehensive improvements to Claude Code permissions, balancing security with usability through a three-tier system: allow safe patterns, ask for moderate risk, deny catastrophic operations.
New Features
New Ecosystem Files:
permissions.beans.json- Beans issue tracker commandspermissions.colima.json- Colima container managementNew Skill:
permissions-manager- Local skill for analyzing and managing permissions/permissions-manager analyze- Generate recommendations/permissions-manager apply- Interactively apply changes/permissions-manager review- Quick status overviewKey Improvements
Safe rm -rf Patterns:
node_modules,dist,build,target, etc.dist) and explicit (./dist) variantsGranular sudo Permissions:
systemctl,journalctl,docker(service management)chmod,chown,shutdown, package managers (moderate risk)rm -rf,dd,mkfs,fdisk(destructive operations)Git Force-Push Protection:
--force-with-leaseShell Utilities:
bash,awk,rsync,ssh,ps,pkill,sqlite3,yamllint, etc.Other Changes:
Security Enhancements
Wildcard Safety:
:*wildcards fromrm -rfcommandsrm -rf node_modules /etcfrom matchingExplicit Denies:
/,/*,~,~/*,$HOME.,..,../*curl | bash,wget | shDocumentation
Analysis & Guides:
claude-permissions-analysis.md- Full analysis and recommendationsclaude-permissions-safe-patterns.md- Context-specific safety patternsclaude-permissions-wildcard-safety.md- Wildcard security analysisclaude-permissions-changes-summary.md- Complete change summaryPrivacy Features:
Stats
Cleanup
Removed 37 duplicate permission entries from 16 project files.
Test Plan
Commits
🤖 Generated with Claude Code