Restrict Claude workflows to package manager tools only#90
Merged
guillaume-sainthillier merged 2 commits intomainfrom Jan 22, 2026
Merged
Restrict Claude workflows to package manager tools only#90guillaume-sainthillier merged 2 commits intomainfrom
guillaume-sainthillier merged 2 commits intomainfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
allowed_toolsconfiguration to restrict tools toBash(composer:*)andBash(yarn:*), and reorderedclaude_argsfor consistencyallowed_toolsconfiguration using the same package manager restrictionsDetails
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_toolsparameter is now consistently applied across both workflows and positioned beforeclaude_argsfor better readability.