Centralised git hooks for all CircuitForge repos.
- pre-commit — scans staged changes for secrets and PII via gitleaks
- commit-msg — enforces conventional commit format
- pre-push — scans full branch history as a safety net before push
From any CircuitForge product repo root:
bash /Library/Development/CircuitForge/circuitforge-hooks/install.shOn Heimdall live deploys (/devl/<repo>/), add the same line to the deploy script.
Create .gitleaks.toml at the repo root to extend the base config:
[extend]
path = "/Library/Development/CircuitForge/circuitforge-hooks/gitleaks.toml"
[allowlist]
regexes = [
'\d{10}\.html', # example: Craigslist listing IDs
]bash tests/test_hooks.shgitleaksbinary:sudo apt-get install gitleaks- bash 4+
Edit gitleaks.toml. Follow the pattern of the existing [[rules]] blocks.
Add tests to tests/test_hooks.sh covering both the blocked and allowed cases.