File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 2020 against=$( git hash-object -t tree /dev/null)
2121fi
2222has_secrets=0
23- for FILE in ` git diff --cached --name-only --diff-filter=AM $against ` ; do
23+ for FILE in " ` git diff --cached --name-only --diff-filter=AM $against ` " ; do
2424 # Check if the file contains secrets
2525 detected=$( azdev scan -f " $FILE " | python -c " import sys, json; print(json.load(sys.stdin)['secrets_detected'])" )
2626 if [ " $detected " = " True" ]; then
Original file line number Diff line number Diff line change @@ -1137,7 +1137,8 @@ jobs:
11371137 . env/bin/activate
11381138 git fetch origin --depth=1 $(System.PullRequest.TargetBranch)
11391139 declare -A secret_files
1140- for FILE in `git diff --name-only --diff-filter=AM origin/$(System.PullRequest.TargetBranch)` ; do
1140+ for FILE in "`git diff --name-only --diff-filter=AM origin/$(System.PullRequest.TargetBranch)`" ; do
1141+ echo $FILE
11411142 detected=$(azdev scan -f "$FILE" | python -c "import sys, json; print(json.load(sys.stdin)['secrets_detected'])")
11421143 if [ $detected == 'True' ]; then
11431144 printf "\033[0;31mDetected secrets from %s, You can run 'azdev mask' to remove secrets.\033[0m\n" "$FILE"
You can’t perform that action at this time.
0 commit comments