
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
git-hooks-toolkit
Advanced tools
Git Hooks Toolkit is a lightweight library to simplify the use of git hooks in a collaborative workflow. Git Hooks Toolkit can be used on any git repository and comes with a few added features like branch name, file name and commit message linting.
Git Hooks Toolkit is a lightweight library to simplify the use of git hooks in a collaborative workflow.
Git Hooks Toolkit can be used on any git repository and comes with a few added features like branch name, file name and commit message linting.
Git Hooks Toolkit can be automatically installed with npx.
npx git-hooks-toolkit --init=maven
Git Hooks Toolkit needs to be wired on each collaborator local repository. Otherwise the hooks won't be automatically executed.
npx git-hooks-toolkit --wire
.git-hooks-toolkit folder in your project.install.sh.To configure different scripts to be run you need to place a git-hooks.yml in the .git-hooks-toolkit folder or at the root of your project. You can find configuration templates in the templates folder.
To bypass the hooks for a specific commit add --no-verify to your git command.
Example: git commit -m 'yolo' --no-verify
More information on which git command support the --no-verify argument on Git
pre_commit: npm run lint && npm run test
The pre-commit hook is run first, before you even type in a commit message. It’s used to inspect the snapshot that’s about to be committed, to see if you’ve forgotten something, to make sure tests run, or to examine whatever you need to inspect in the code. Git
pre_push: npm run lint && npm run test
The pre-push hook runs during git push, after the remote refs have been updated but before any objects have been transferred. You can use it to validate a set of ref updates before a push occurs. Git
no_commit_to:
branches:
- master
- develop
message: 'Committing to the following branches is not allowed : master, develop'
branchname_lint:
regex: '^(develop|main|master|((feature|hotfix)/[a-zA-Z0-9\_]+))$'
message: 'Commit aborted: branch name does not follow naming convention.'
filename_lint:
regex: '^[a-zA-Z\_\.\-]+$'
message: 'Non-alphanumeric file names are not allowed.'
commit_lint:
regex: '^(add|fix|remove): .*'
message: 'Commit message must contain a verb (ex: \"add: awesome feature\").'
To completely remove git-hooks-toolkit run:
npx git-hooks-toolkit --uninstall
To disable your custom git hooks in the current git repository but keep the git-hooks-toolkit config run:
npx git-hooks-toolkit --unwire
To completely remove git-hooks-toolkit run the script uninstall.sh.
To disable your custom git hooks in the current git repository but keep the git-hooks-toolkit config run the command git config --unset core.hooksPath.
Husky: https://github.com/typicode/husky
Pre-commit: https://github.com/pre-commit/pre-commit
FAQs
Git Hooks Toolkit is a lightweight library to simplify the use of git hooks in a collaborative workflow. Git Hooks Toolkit can be used on any git repository and comes with a few added features like branch name, file name and commit message linting.
We found that git-hooks-toolkit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.