Repository navigation
Add project allowlist for read-only gh commands - #13591
Conversation
Allow gh pr list / gh pr view / gh issue list without prompting, in project .claude/settings.json. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
joshbermanssw
left a comment
There was a problem hiding this comment.
Approving. The allowlist is correct, minimal and read-only:
- Syntax:
:*is still documented as equivalent to a trailing*. - Merging: the allow lists in
settings.jsonandsettings.local.jsonmerge rather than override. - Chained commands:
gh pr view 1 && …still prompts for the second command. - Flags: none of the three commands has a flag that writes state.
A couple of comments, neither blocking:
The PR body calls settings.local.json "gitignored", but it's committed. .gitignore:6 lists it, but it's tracked on main (git ls-files .claude), so every clone already gets its rules. Worth rewording, because team permissions already lived in a committed file before this PR.
Follow-up: consolidate the shared rules. After this PR, shared agent permissions live in two committed files that Claude Code merges. It's unclear where a new team rule should go, and the local file keeps one-off entries (a pinned validator path, a LinkedIn WebFetch) in the shared set. It also auto-allows Bash(node -e:*) and Bash(npm install:*), which means running arbitrary code with no prompt. That's far riskier than anything added here. Suggest a follow-up PR that moves any shared entries worth keeping into settings.json and runs git rm --cached .claude/settings.local.json. A CODEOWNERS entry for .claude/ would also force a staff review on future permission changes.
Co-authored-by: Josh Berman [SSW] <137844305+joshbermanssw@users.noreply.github.com>
|
Hi @, Please fix the Frontmatter in your Markdown files. |
Adds a project-level Claude Code allowlist so common read-only GitHub CLI commands stop prompting for everyone working in this repo.
Change
New
.claude/settings.jsonwith:{ "permissions": { "allow": [ "Bash(gh pr list:*)", "Bash(gh pr view:*)", "Bash(gh issue list:*)" ] } }All three are read-only (no state changes). This is the team-wide project settings file, not the gitignored
.claude/settings.local.json.🤖 Changes made by Claude Opus 4.8 via Claude Code