Skip to content

Conversation

lvrach
Copy link
Member

@lvrach lvrach commented Oct 2, 2025

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

  • Fixed argument passing: hooks now receive correct arguments ($1, $2, etc.)
  • Added stdin, stdout, stderr, and environment variable forwarding to hook scripts

Linters

  • Add CI

lvrach added 3 commits October 1, 2025 10:55
Scanned by gitleaks 8.28.0
Scanned for secrets using gitleaks 8.28.0
🔒 Scanned for secrets using gitleaks 8.28.0
@lvrach lvrach requested a review from Copilot October 2, 2025 14:47
Copy link

@Copilot Copilot AI left a 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.

lvrach added 4 commits October 2, 2025 16:48
## 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
## The following line was added automatically, please do not remove it
🔒 Scanned for secrets using gitleaks 8.28.0
lvrach added 2 commits October 2, 2025 17:37
🔒 Scanned for secrets using gitleaks 8.28.0
🔒 Scanned for secrets using gitleaks 8.28.0
@lvrach lvrach requested a review from Copilot October 2, 2025 15:45
Copy link

@Copilot Copilot AI left a 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.

@lvrach lvrach merged commit 5ea3ead into main Oct 2, 2025
2 checks passed
@lvrach lvrach deleted the feat.enforce branch October 2, 2025 17:33
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