Skip to content

Commit b2178cd

Browse files
authored
Add gitleaks secret scanning via pre-commit hook (#252)
1 parent e4ef06c commit b2178cd

3 files changed

Lines changed: 26 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.1
4+
hooks:
5+
- id: gitleaks

CLAUDE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
lstk is LocalStack's new CLI (v2) - a Go-based command-line interface for starting and managing LocalStack instances via Docker (and more runtimes in the future).
44

5+
# Developer Setup
6+
7+
After cloning, install the pre-commit hooks:
8+
9+
```bash
10+
pre-commit install
11+
```
12+
13+
This installs a [gitleaks](https://github.com/gitleaks/gitleaks) hook that scans staged files for secrets before each commit. Requires [pre-commit](https://pre-commit.com/#install).
14+
515
# Build and Test Commands
616

717
```bash

CONTRIBUTING.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@ Thanks for contributing to lstk! This document covers contribution guidelines fo
99
- Go 1.21+ (or latest stable)
1010
- Docker (for integration tests)
1111
- Make
12+
- [pre-commit](https://pre-commit.com/#install) (for secret scanning hooks)
13+
14+
### First-time setup
15+
16+
After cloning, install the pre-commit hooks:
17+
18+
```bash
19+
pre-commit install
20+
```
21+
22+
This sets up a local git hook that runs [gitleaks](https://github.com/gitleaks/gitleaks) before each commit to prevent accidentally committing secrets or credentials.
1223

1324
### Building
1425

0 commit comments

Comments
 (0)