D081F1
Application
🪝 Canary Git Hook
Git hooks beaconing on unauthorized clone.
What it is
A Git pre-commit or post-checkout hook (.git/hooks/) that beacons when the repository is cloned and hooks are executed on a non-corporate machine. Detects source code theft and unauthorized development environments.
Implementation requirements
- Custom Git hook script in
.githooks/(shared viacore.hooksPathconfiguration) - Hook checks: Is the machine on the corporate network? Is the user in the allowed developer list?
- If checks fail: Silent HTTP beacon to DOAR endpoint with hostname, username, IP, repo name
- OPSEC: Hook must perform its beacon silently without breaking the developer workflow
- Limitation: Git hooks are not automatically copied on
git clone(unless using template directories orcore.hooksPath). Consider using Husky (npm) or pre-commit (Python) frameworks which DO get installed automatically. - Rollback: Remove the hook from repositories and from any hook templates.
- Upkeep: Git does not copy hooks when a repository is cloned, so confirm how your setup distributes them and test on a fresh clone.
Technologies
CI/CD
ATT&CK coverage 2
| Technique | Tactic | Status | Confidence | Tier |
|---|---|---|---|---|
| T1213.003 Code Repositories |
Collection | confirmed | strong | T2 |
| ↳ Detection point: the decoy fires at a later step of the attack | ||||
↳ Evidence (4 sources)
| ||||
| T1552.001 Credentials In Files |
Credential Access | confirmed | strong | T2 |
| ↳ Detection point: the decoy fires at a later step of the attack | ||||
↳ Evidence (5 sources)
| ||||
Evidence
- Canarytokens — Thinkst Applied Research industry
- MITRE ATT&CK Enterprise v20.0 — MITRE 2026 standard
Research basis: Thinkst Canarytokens (Industry Standard). Extension of repository canary concept.