fix(scripts): exclude .env.example from secret scan
This commit is contained in:
parent
c710c8172b
commit
662e66fc4b
@ -21,9 +21,9 @@ check() {
|
||||
local pattern="$2"
|
||||
|
||||
# -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:"
|
||||
git grep -l -E "${pattern}" -- . | sed 's/^/ - /'
|
||||
git grep -l -E "${pattern}" -- . ':!*.example' ':!*.example.*' | sed 's/^/ - /'
|
||||
echo
|
||||
fail=1
|
||||
fi
|
||||
|
||||
Loading…
Reference in New Issue
Block a user