Skip to content

Commit d35b328

Browse files
committed
ops: add gitleaks pre-commit hook
1 parent 387805c commit d35b328

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
@@ -273,6 +273,19 @@ Components have a separate version, denoted by either:
273273
- a certain type of the git tag (for example, `v0.0.0` for Database Lab Engine, and `ui0.0.0` for Database Lab UI) or
274274
- a combination of the branch name and git commit SHA.
275275

276+
### Pre-commit hooks
277+
278+
This repo uses [pre-commit](https://pre-commit.com/) with [gitleaks](https://github.com/gitleaks/gitleaks) to catch secrets before they are committed.
279+
280+
```bash
281+
# Install pre-commit
282+
pip install pre-commit
283+
# or: brew install pre-commit
284+
285+
# Install the hooks (one-time, after cloning)
286+
pre-commit install
287+
```
288+
276289
### Development setup
277290
- Install Docker. Example for Linux:
278291
```bash

0 commit comments

Comments
 (0)