Skip to content

feat: Add gitleaks hook#642

Open
sestrella wants to merge 3 commits intocachix:masterfrom
sestrella:add_gitleaks_hook
Open

feat: Add gitleaks hook#642
sestrella wants to merge 3 commits intocachix:masterfrom
sestrella:add_gitleaks_hook

Conversation

@sestrella
Copy link
Contributor

This PR adds the gileaks hook, a tool used to prevent sensitive data from being leaked. Here is a link to a project in which this branch is being used:

https://github.com/sestrella/home-manager.config/blob/main/devenv.nix#L17

@sandydoo sandydoo added the new-hook A request for a new hook label Nov 11, 2025
@sestrella
Copy link
Contributor Author

The broken check appears to have to do with ansiblelint rather than the changes made in this PR.

image

entry = lib.getExe tools.gitleaks;
args = [ "git" "-v" ];
always_run = true;
stages = [ "post-commit" ];
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a pre-commit hook, as how the upstream example does1, would be preferable.

Footnotes

  1. https://github.com/gitleaks/gitleaks/blob/8d1f98c7967eb1e79cb44ac6241a124e145d2165/.pre-commit-hooks.yaml#L1-L6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-hook A request for a new hook

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants