-
Notifications
You must be signed in to change notification settings - Fork 0
feat: tag commit message with gitleaks version using commit-msg hook #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Scanned for secrets using gitleaks 8.28.0
🔒 Scanned for secrets using gitleaks 8.28.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new commit-msg hook that automatically appends gitleaks version information to commit messages, enabling detection and enforcement of gitleaks usage for secret scanning. It also fixes argument passing and environment forwarding for hook scripts.
- Added a new commit-msg hook that tags commits with gitleaks version
- Fixed argument passing to ensure hooks receive correct arguments ($1, $2, etc.)
- Added proper stdin, stdout, stderr, and environment variable forwarding to hook scripts
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
commands/hooks/gitleaks/commit-msg.sh | New commit-msg hook script that appends gitleaks version to commit messages |
commands/hook.sh | Added quotes around GitHooksPath template variable for proper escaping |
commands/hook.go | Fixed argument passing and added stdin/stdout/stderr/env forwarding to hook execution |
commands/config.go | Refactored hook creation into separate function and improved error messages |
commands/add.go | Added installation of the new commit-msg hook alongside existing pre-commit hook |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
## The following line was added automatically, please do not remove it 🔒 Scanned for secrets using gitleaks 8.28.0
## The following line was added automatically, please do not remove it 🔒 Scanned for secrets using gitleaks 8.28.0
🔒 Scanned for secrets using gitleaks 8.28.0
🔒 Scanned for secrets using gitleaks 8.28.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 10 out of 11 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Features
A new commit-msg hook is automatically appending gitleaks version.
This will allows us to detect and enforce using gitleaks for secret scanning.
Fixes
Linters