diff --git a/images/macos/scripts/build/configure-machine.sh b/images/macos/scripts/build/configure-machine.sh index 294935000..402aea10b 100644 --- a/images/macos/scripts/build/configure-machine.sh +++ b/images/macos/scripts/build/configure-machine.sh @@ -103,3 +103,6 @@ if [[ ! -d "/usr/local/bin" ]];then fi chmod +x $HOME/utils/invoke-tests.sh sudo ln -s $HOME/utils/invoke-tests.sh /usr/local/bin/invoke_tests + +# Revert to the old behaviour and avoid the Git LFS problems (https://github.blog/2024-05-14-securing-git-addressing-5-new-vulnerabilities/) +echo "export GIT_CLONE_PROTECTION_ACTIVE=false" >> $HOME/.bashrc diff --git a/images/macos/scripts/tests/Git.Tests.ps1 b/images/macos/scripts/tests/Git.Tests.ps1 index f216baa0b..3efb6d82c 100644 --- a/images/macos/scripts/tests/Git.Tests.ps1 +++ b/images/macos/scripts/tests/Git.Tests.ps1 @@ -9,4 +9,7 @@ Describe "Git" { It "git lfs is installed" -Skip:($os.IsBigSur) { "git lfs version" | Should -ReturnZeroExitCode } + It "GIT_CLONE_PROTECTION_ACTIVE environment variable should be equal false" { + $env:GIT_CLONE_PROTECTION_ACTIVE | Should -BeExactly false + } }