File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,10 @@ foreach ($file in $files) {
2828 # Check if the file contains secrets
2929 $detected = $ (azdev scan -f $file | ConvertFrom-Json ).secrets_detected
3030 if ($detected -eq " True" ) {
31- Write-Host " Detected secrets from $file . You can run 'azdev mask' to remove secrets before commit." - ForegroundColor Red
31+ Write-Host " Detected secrets from $file . Please run the following command to mask it:" - ForegroundColor Red
32+ Write-Host " +++++++++++++++++++++++++++++++++++++++++++++++++++++++" - ForegroundColor Red
33+ Write-Host " azdev mask -f $file " - ForegroundColor Red
34+ Write-Host " +++++++++++++++++++++++++++++++++++++++++++++++++++++++" - ForegroundColor Red
3235 $hasSecrets = 1
3336 }
3437}
Original file line number Diff line number Diff line change @@ -24,7 +24,10 @@ 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
27- printf " \033[0;31mDetected secrets from %s, You can run 'azdev mask' to remove secrets before commit.\033[0m\n" " $FILE "
27+ printf " \033[0;31mDetected secrets from %s, Please run the following command to mask it:\033[0m\n" " $FILE "
28+ printf " \033[0;31m+++++++++++++++++++++++++++++++++++++++++++++++++++++++\033[0m\n"
29+ printf " \033[0;31mazdev mask -f %s\033[0m\n" " $FILE "
30+ printf " \033[0;31m+++++++++++++++++++++++++++++++++++++++++++++++++++++++\033[0m\n"
2831 has_secrets=1
2932 fi
3033done
You can’t perform that action at this time.
0 commit comments