From 9976c51ed471a880bb67e8d4b26f7e1d167899e5 Mon Sep 17 00:00:00 2001 From: jiasli <4003950+jiasli@users.noreply.github.com> Date: Wed, 13 Apr 2022 15:39:10 +0800 Subject: [PATCH] git-cve --- scripts/ci/build.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/ci/build.sh b/scripts/ci/build.sh index 8e1c21340a0..11bf2cbef58 100755 --- a/scripts/ci/build.sh +++ b/scripts/ci/build.sh @@ -8,6 +8,11 @@ set -ev ############################################## # clean up and dir search mkdir -p ./artifacts + +# Current folder (/azure-cli) is mounted from host which has different owner than docker container's +# current user 0(root). +# https://github.blog/2022-04-12-git-security-vulnerability-announced/ +git config --global --add safe.directory $(pwd) echo `git rev-parse --verify HEAD` > ./artifacts/build.sha mkdir -p ./artifacts/build