repos:
  # Secret detection
  - repo: https://github.com/gitleaks/gitleaks
    rev: v8.21.2
    hooks:
      - id: gitleaks
        name: Detect secrets with gitleaks
        description: Detect hardcoded secrets, API keys, and credentials

  # Basic security hygiene
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v5.0.0
    hooks:
      - id: check-added-large-files
        args: ['--maxkb=500']
      - id: detect-private-key
        name: Detect private keys
      - id: check-merge-conflict
      - id: check-yaml
      - id: check-toml
      - id: end-of-file-fixer
      - id: trailing-whitespace
        args: ['--markdown-linebreak-ext=md']
      - id: no-commit-to-branch
        args: ['--branch', 'main']
