Skip to content

Conversation

@vtiwari-story
Copy link
Contributor

@vtiwari-story vtiwari-story commented Oct 23, 2025

🔒 Add Git-leaks Pre-commit Hook
This PR adds a pre-commit configuration with git-leaks to automatically detect and prevent commits containing secrets, API keys, passwords, and other sensitive information.

What's Changed
Added .pre-commit-config.yaml with git-leaks hook
Configured git-leaks v8.28.0 with verbose and redacted output
Pre-commit hooks are now installed and active
Why This Matters
Security: Prevents accidental commits of sensitive data
Compliance: Ensures repository follows security best practices
Automation: Runs automatically on every commit
Team Safety: Protects all contributors from security mistakes
How It Works
Git-leaks scans all staged files before each commit
If secrets are detected, the commit is blocked
Verbose output shows what was found (redacted for security)
Contributors can fix issues before committing
Testing
✅ The setup has been tested and verified to work correctly
✅ Test commits containing secrets are properly blocked
✅ Normal commits without secrets proceed as expected

Next Steps
After merging this PR:

All team members should run pre-commit install in their local repos
Existing secrets in the repository should be rotated if any are found
Consider running gitleaks detect on the entire repository history
This change enhances our security posture and helps maintain clean, secure code.

@vtiwari-story vtiwari-story merged commit 893ea6b into main Oct 23, 2025
8 of 9 checks passed
@vtiwari-story vtiwari-story deleted the git-leaks branch October 23, 2025 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants