Skip to content

Commit 6a1de70

Browse files
committed
Merge branch 'feature/add-gitleaks-pre-commit' into 'main'
ops: add gitleaks pre-commit hook Closes infra#43 See merge request postgres-ai/postgresai!230
2 parents cfedf74 + 4e24c7e commit 6a1de70

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
repos:
2+
- repo: https://github.com/gitleaks/gitleaks
3+
rev: v8.30.0
4+
hooks:
5+
- id: gitleaks

CONTRIBUTING.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@ If you cloned the repo with submodules, make sure the `.cursor` submodule is ini
1717
git submodule update --init --recursive
1818
```
1919

20+
### Pre-commit hooks
21+
22+
This repo uses [pre-commit](https://pre-commit.com/) with [gitleaks](https://github.com/gitleaks/gitleaks) to catch secrets before they are committed.
23+
24+
```bash
25+
# Install pre-commit
26+
pip install pre-commit
27+
# or: brew install pre-commit
28+
29+
# Install the hooks (one-time, after cloning)
30+
pre-commit install
31+
```
32+
2033
## Local development workflow (no-commit, debugger-friendly)
2134

2235
This workflow lets you:

0 commit comments

Comments
 (0)