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