From a519840051f28104f828d0341e481e656a0186e2 Mon Sep 17 00:00:00 2001 From: Ashwin Bhat Date: Tue, 5 Aug 2025 11:32:46 -0700 Subject: [PATCH] fix: remove git config user.name and user.email from allowed tools (#410) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These git config commands are no longer needed as allowed tools since Claude should not be modifying git configuration settings. Updated the corresponding test to reflect this intentional change. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude --- src/create-prompt/index.ts | 2 -- test/create-prompt.test.ts | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/create-prompt/index.ts b/src/create-prompt/index.ts index 135b020..5f6d6c7 100644 --- a/src/create-prompt/index.ts +++ b/src/create-prompt/index.ts @@ -60,8 +60,6 @@ export function buildAllowedToolsString( "Bash(git diff:*)", "Bash(git log:*)", "Bash(git rm:*)", - "Bash(git config user.name:*)", - "Bash(git config user.email:*)", ); } diff --git a/test/create-prompt.test.ts b/test/create-prompt.test.ts index 5e86ab1..c97f159 100644 --- a/test/create-prompt.test.ts +++ b/test/create-prompt.test.ts @@ -1041,8 +1041,6 @@ describe("buildAllowedToolsString", () => { expect(result).toContain("Bash(git diff:*)"); expect(result).toContain("Bash(git log:*)"); expect(result).toContain("Bash(git rm:*)"); - expect(result).toContain("Bash(git config user.name:*)"); - expect(result).toContain("Bash(git config user.email:*)"); // Comment tool from minimal server should be included expect(result).toContain("mcp__github_comment__update_claude_comment");