Skip to content

Add gitleaks and ESLint pre-commit hooks with prek#13

Merged
Tiryoh merged 2 commits intomainfrom
feature/add-gitleaks-pre-commit
Mar 28, 2026
Merged

Add gitleaks and ESLint pre-commit hooks with prek#13
Tiryoh merged 2 commits intomainfrom
feature/add-gitleaks-pre-commit

Conversation

@Tiryoh
Copy link
Copy Markdown
Owner

@Tiryoh Tiryoh commented Mar 28, 2026

Summary

  • Add .pre-commit-config.yaml with gitleaks and ESLint hooks managed by prek
  • gitleaks: Uses official remote repo (v8.30.1) for pre-commit and pre-push stages. Detects 150+ secret patterns (AWS, GCP, GitHub tokens, Slack, Stripe, etc.)
  • ESLint: Runs npm run lint on pre-commit for ts/tsx files

Setup

prek install --hook-type pre-commit --hook-type pre-push

Requires prek and gitleaks to be installed.

Test plan

  • prek run --all-files passes (gitleaks + ESLint)
  • Verify pre-commit hook triggers on git commit
  • Verify pre-push hook triggers on git push

🤖 Generated with Claude Code

Configure gitleaks hooks for both pre-commit and pre-push stages
using the local system binary to detect 150+ secret patterns.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 28, 2026

- Use official gitleaks repo with tag v8.30.1 instead of local system hook
- Add npm lint (ESLint) as pre-commit hook for ts/tsx files

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@Tiryoh Tiryoh changed the title Add gitleaks secret scanning with prek Add gitleaks and ESLint pre-commit hooks with prek Mar 28, 2026
@Tiryoh Tiryoh merged commit 51b7901 into main Mar 28, 2026
1 check passed
@Tiryoh Tiryoh deleted the feature/add-gitleaks-pre-commit branch March 28, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant