Security
bash
Intermediate
Git Secrets Scanner
Scan git history for accidental secret commits before pushing to remote.
bash
#!/bin/bash
echo "Scanning git history for secrets..."
git log --all -p | grep -iE \
"(password|api_key|secret|token|private_key)\s*=\s*['\"[:alnum:]]+" \
| grep -v "^--$" | head -20
if [ $? -eq 0 ]; then
echo "WARNING: Potential secrets found in history!"
exit 1
fi
echo "Clean."
Prerequisites
- git
Pro Tips
- → Use trufflehog or gitleaks for production-grade scanning.
Commercial Licensing
Acquire a production access token or template license for enterprise deployment.
Module Info
- Language
- bash
- Level
- Intermediate
- Read time
- 3 min
- Published
- Jan 2026
- License
- Commercial License
Newsletter
New modules every week, directly to your inbox.
Similar Modules
TOTP Two-Factor Auth
Generate and verify time-based one-time passwords (TOTP) compatible with Google Authenticator.
python
·
Advanced
Express CSRF Protection with Double Submit
Implement double-submit CSRF protection in Express without server-side session storage.
javascript
·
Intermediate
ClamAV Malware Scanner Cron
Run ClamAV on upload directory and quarantine infected files automatically.
bash
·
Advanced