Dimanche 18 Octobre 2026 05:58:26 GMT+02:00

Netcrook

AccueilManifeste
Actualités
Techcrook
Geocrook
WikicrookÉquipeAppContact
EnglishItaliano

WIKICROOK

Pre-commit Hook

A check that runs before a commit is finalized, often used to catch secrets early.

A pre-commit hook is an automated check that runs before Git finalizes a commit. It can inspect staged files for patterns such as API keys, private keys, passwords, or other sensitive data, and it can block the commit if a policy fails.

In cyber security, pre-commit hooks matter because they catch mistakes at the earliest practical point, before secrets enter shared repository history. That reduces cleanup effort, limits exposure, and helps prevent attackers from finding credentials in code. Teams use hooks for secret scanning, linting, tests, and policy enforcement. In real defenses, they are often paired with broader controls such as push protection and server-side scanning, because developers can bypass local checks or miss secrets that are generated later in the workflow.

← index WIKICROOK