Skip to content

馃泜 Restrict Claude Code permissions (allow-list only) - #3

Merged
oshiteku merged 2 commits into
mainfrom
restrict-dev-permissions
Jan 18, 2026
Merged

oshiteku merged 2 commits into
mainfrom
restrict-dev-permissions

Conversation

@oshiteku

Copy link
Copy Markdown
Owner

Summary

  • Replace broad wildcards (git:*, gh:*, cargo:*) with explicit allow-list
  • Remove explicit deny section (implicit deny via permission prompt)

Allowed Commands

Category Commands
git status, diff, log, show, branch, checkout, switch, fetch, pull, add, commit, stash, merge, rebase, reset, restore
gh issue view/list, pr view/list, repo view, release view/list
cargo build, test, check, clippy, fmt, run, doc, tarpaulin

Rationale

Principle of least privilege: only allow safe, read-heavy operations by default.

馃 Generated with Claude Code

oshiteku and others added 2 commits January 18, 2026 21:40
- git: allow local ops only (status, diff, log, branch, etc.), deny push
- gh: allow view/list only, deny create/close/merge/comment
- cargo: allow local ops (build, test, check, etc.), deny publish/login/yank/owner

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Allow-list only approach: unlisted commands require permission prompt
@oshiteku
oshiteku merged commit 48fd08a into main Jan 18, 2026
2 checks passed
@oshiteku
oshiteku deleted the restrict-dev-permissions branch January 18, 2026 12:48
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