repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.4.0
    hooks:
      - id: trailing-whitespace
      - id: end-of-file-fixer
      - id: check-yaml
      - id: check-added-large-files
      - id: check-merge-conflict

  - repo: https://github.com/Yelp/detect-secrets
    rev: v1.4.0
    hooks:
      - id: detect-secrets
        args: ['--baseline', '.secrets.baseline']
        exclude: '\.secrets\.baseline$'

  - repo: https://github.com/PyCQA/bandit
    rev: 1.7.5
    hooks:
      - id: bandit
        args: ['-f', 'json', '-o', 'bandit-report.json']
        types: [python]

  - repo: local
    hooks:
      - id: security-check
        name: Security Vulnerability Check
        entry: bash -c 'pip-audit --desc || exit 1'
        language: system
        pass_filenames: false
        always_run: true
