Pre-commit hooks are not automatically activated
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3
- Forks
- 4
- Avg merge
- 3h 13m
- Merged PRs (30d)
- 7
Description
I still need to test locally if I get an error when trying to commit a secret. I just did that but got no error. Not sure whether the pre-commit hooks actually run. All I need for Husky is to npm install, right?
Originally posted by @niklashaug in https://github.com/peerigon/template/issues/72#issuecomment-4178593431
I've looked into this a bit and found out that the ignore-scripts probably prohibit the prepare script which sets up gitleaks from ever running.
Probably the only thing that can be done is to document that this needs to be run manually once. I'm wondering if there is any better way to enforce it so you won't forget running this in a new codebase.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by checking how npm install handles the prepare script when ignore-scripts is enabled, and verify whether the gitleaks pre-commit hook is installed. Done means either the hook is reliably activated for a new checkout or the required manual setup is documented clearly, including how to verify it blocks a secret commit.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100