diff --git a/.github/workflows/detect-secrets.yml b/.github/workflows/detect-secrets.yml index 63f67c6a..e94335d5 100644 --- a/.github/workflows/detect-secrets.yml +++ b/.github/workflows/detect-secrets.yml @@ -30,4 +30,4 @@ jobs: - name: Scan for Secrets run: | - find . -name '*.tsx' | xargs git secrets --scan || (echo "Secrets detected in your push!"; exit 1) + git diff --cached --name-only | grep -E '\.(tsx|ts|js)$' | xargs git secrets --scan || (echo "Secrets detected in your push!"; exit 1)