1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
# Pre-commit hook: fmt, clippy, tests, gitleaks
if ! ; then
fi
if ! ; then
fi
if ! test_output=; then
|
fi
# --staged scans exactly what is about to be committed; `detect` only scans
# already-committed history and lets staged secrets through (it did once).
# .gitleaks.local.toml extends the committed config with private patterns
# and is never committed itself (.git/info/exclude).
GITLEAKS_ARGS=()
if [; then
GITLEAKS_ARGS=(--config .gitleaks.local.toml)
fi
if ! ; then
fi