Skip to content

Commit 30ec151

Browse files
chore: Remove unrestricted gh api permission (#15989)
Remove gh api:* wildcard permission, which allowed any GitHub API call, including destructive operations. This permission could be exploited to: - Delete repositories: gh api repos/:owner/:repo -X DELETE - Make private repos public: gh api repos/:owner/:repo -X PATCH -f private=false - Remove branch protection: gh api repos/:owner/:repo/branches/:branch/protection -X DELETE - Add unauthorized collaborators: gh api repos/:owner/:repo/collaborators/:user -X PUT - Access secrets: gh api repos/:owner/:repo/actions/secrets - Add webhooks: gh api repos/:owner/:repo/hooks -X POST Specific read-only gh commands remain allowed via existing allowlist entries. This is a follow up on #15978, and came up here getsentry/sentry-cocoa#7163 (comment). Co-authored-by: Claude <noreply@anthropic.com>
1 parent 3c6620e commit 30ec151

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

.claude/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
"Bash(gh run list:*)",
3131
"Bash(gh run logs:*)",
3232
"Bash(gh repo view:*)",
33-
"Bash(gh api:*)",
3433
"Bash(node --version:*)",
3534
"Bash(pnpm list:*)",
3635
"Bash(pnpm info:*)",

0 commit comments

Comments
 (0)