Restrict allowedTools to prevent approvals and broad API access#100
Restrict allowedTools to prevent approvals and broad API access#100francoisferrand merged 1 commit intomainfrom
Conversation
|
LGTM |
1c8f18f to
cfb16c3
Compare
|
Replace the broad "Bash(gh api *)" allow rule with three narrow patterns that match only the endpoints the review skills actually use: pulls/*/comments (inline comments), issues/*/comments (summary comments), and check-runs (check run create/update). The broad rule allowed Claude to POST to .../pulls/<n>/reviews, which is the approval endpoint. Narrowing it closes that path while still supporting both review styles (inline + check run, inline + summary comment) across consuming repos. Issue: SOR-238
cfb16c3 to
7983f3c
Compare
|
LGTM — good security tightening. |
It is somewhat legit, but not for the right reasons: permissions should actually be restricted, which does not really hinder functionality as the command can be written The problem is really that this could break existing SKILLS accross many repos... |
Replace the broad "Bash(gh api )" allow rule with three narrow
patterns that match only the endpoints the review skills actually use:
pulls//comments (inline comments), issues/*/comments (summary
comments), and check-runs (check run create/update).
The broad rule allowed Claude to POST to .../pulls//reviews, which
is the approval endpoint. Narrowing it closes that path while still
supporting both review styles (inline + check run, inline + summary
comment) across consuming repos.
Issue: SOR-238