Skip to content

Add project allowlist for read-only gh commands - #13591

Merged
tiagov8 merged 2 commits into
mainfrom
add-gh-readonly-allowlist
Oct 23, 2026
Merged

tiagov8 merged 2 commits into
mainfrom
add-gh-readonly-allowlist

Conversation

@tiagov8

@tiagov8 tiagov8 commented Oct 22, 2026

Copy link
Copy Markdown
Member

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.json with:

{
  "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

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>
@tiagov8
tiagov8 requested a review from joshbermanssw October 22, 2026 18:05
@github-actions github-actions Bot added Age: 🥚 - New About 2 hours old Age: 🐣 - Young About 4 hours old and removed Age: 🥚 - New About 2 hours old labels Oct 22, 2026

@joshbermanssw joshbermanssw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approving. The allowlist is correct, minimal and read-only:

  • Syntax: :* is still documented as equivalent to a trailing *.
  • Merging: the allow lists in settings.json and settings.local.json merge 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.

Comment thread .claude/settings.json Outdated
@github-actions github-actions Bot added Age: 🐥 - Adolescent About 8 hours old Age: 🐤 - Mature About 16 hours old Age: 🐓 - Old About 32 hours old and removed Age: 🐣 - Young About 4 hours old Age: 🐥 - Adolescent About 8 hours old Age: 🐤 - Mature About 16 hours old labels Oct 23, 2026
Co-authored-by: Josh Berman [SSW] <137844305+joshbermanssw@users.noreply.github.com>
@tiagov8
tiagov8 merged commit e587d5a into main Oct 23, 2026
2 of 9 checks passed
@tiagov8
tiagov8 deleted the add-gh-readonly-allowlist branch October 23, 2026 17:55
@github-actions

Copy link
Copy Markdown
Contributor

Hi @,

Please fix the Frontmatter in your Markdown files.

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

Labels

Age: 🐓 - Old About 32 hours old

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants