fix(scripts): exclude .env.example from secret scan

This commit is contained in:
saravanakumardb1 2026-03-27 23:08:56 -07:00
parent c710c8172b
commit 662e66fc4b

View File

@ -21,9 +21,9 @@ check() {
local pattern="$2" local pattern="$2"
# -l prints only filenames (no secret material in output) # -l prints only filenames (no secret material in output)
if git grep -l -E "${pattern}" -- . >/dev/null 2>&1; then if git grep -l -E "${pattern}" -- . ':!*.example' ':!*.example.*' >/dev/null 2>&1; then
echo "${name}: potential matches found in:" echo "${name}: potential matches found in:"
git grep -l -E "${pattern}" -- . | sed 's/^/ - /' git grep -l -E "${pattern}" -- . ':!*.example' ':!*.example.*' | sed 's/^/ - /'
echo echo
fail=1 fail=1
fi fi