peerigon / peerigon/template

Pre-commit hooks are not automatically activated

Open
#75 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.