Skip to content

Commit 2993417

Browse files
committed
Fixed Git 2.35+ security check.
1 parent 30d69a6 commit 2993417

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/unit/SCM/System/Git/CommandLineTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ public function setUp(): void
2424
if (empty(shell_exec('which git 2> /dev/null'))) {
2525
$this->markTestSkipped('Git is not available.');
2626
}
27+
28+
// Git 2.35+ introduced ownership checks to prevent attacks when running git commands in directories owned by a different user
29+
shell_exec('git config --global --add safe.directory "*"');
2730
}
2831

2932
public function testIsValidatingRepository(): void

0 commit comments

Comments
 (0)