Skip to content

Restrict Claude workflows to package manager tools only#90

Merged
guillaume-sainthillier merged 2 commits intomainfrom
claude/fix-ci-permissions-MMar9
Jan 22, 2026
Merged

Restrict Claude workflows to package manager tools only#90
guillaume-sainthillier merged 2 commits intomainfrom
claude/fix-ci-permissions-MMar9

Conversation

@guillaume-sainthillier
Copy link
Member

Summary

Updated GitHub Actions workflows to restrict Claude's tool access to only package manager commands (Composer and Yarn), improving security and preventing unintended tool usage.

Changes

  • claude-code-review.yml: Added allowed_tools configuration to restrict tools to Bash(composer:*) and Bash(yarn:*), and reordered claude_args for consistency
  • claude.yml: Replaced commented example with active allowed_tools configuration using the same package manager restrictions

Details

These changes implement a security best practice by explicitly allowlisting only the necessary tools (Composer and Yarn package managers) that Claude needs for code review and analysis tasks. This prevents the AI from accessing other potentially sensitive Bash commands while still maintaining the ability to manage project dependencies when needed.

The allowed_tools parameter is now consistently applied across both workflows and positioned before claude_args for better readability.

Add allowed_tools configuration to both Claude workflows to permit
execution of composer and yarn commands without explicit approval.
- Change contents, pull-requests, and issues permissions from read to write
- Add Bash(gh:*) to allowed_tools for GitHub CLI operations

This enables Claude to create branches, push commits, and create PRs.
@guillaume-sainthillier guillaume-sainthillier merged commit 996807a into main Jan 22, 2026
5 of 7 checks passed
@guillaume-sainthillier guillaume-sainthillier deleted the claude/fix-ci-permissions-MMar9 branch January 22, 2026 18:19
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.

2 participants