From 2993417d4c00906979f2ae9ee6a28803d2e2e262 Mon Sep 17 00:00:00 2001 From: Klaus Silveira Date: Mon, 18 Aug 2025 09:51:56 -0400 Subject: [PATCH] Fixed Git 2.35+ security check. --- tests/unit/SCM/System/Git/CommandLineTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/unit/SCM/System/Git/CommandLineTest.php b/tests/unit/SCM/System/Git/CommandLineTest.php index 199228c..04acf88 100644 --- a/tests/unit/SCM/System/Git/CommandLineTest.php +++ b/tests/unit/SCM/System/Git/CommandLineTest.php @@ -24,6 +24,9 @@ class CommandLineTest extends TestCase if (empty(shell_exec('which git 2> /dev/null'))) { $this->markTestSkipped('Git is not available.'); } + + // Git 2.35+ introduced ownership checks to prevent attacks when running git commands in directories owned by a different user + shell_exec('git config --global --add safe.directory "*"'); } public function testIsValidatingRepository(): void