# 1. Scan only the files as they are today (no history) gitleaks detect --no-git --source . --no-banner -v # 2. Scan the full git history gitleaks detect --source . --no-banner --redact -v # 3. detect-secrets on today's files detect-secrets scan --all-files # 4. detect-secrets on an older snapshot (e.g. the second commit) mkdir /tmp/snap && git archive 99f24d9 | tar -x -C /tmp/snap && cd /tmp/snap && detect-secrets scan --all-files