# .pre-commit-config.yaml
# Generated by generate_precommit_config.py (tier: ENHANCED)
# Languages: python

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

  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.15.0
    hooks:
      - id: ruff
        args: ["--fix"]
      - id: ruff-format

  - repo: https://github.com/PyCQA/bandit
    rev: 1.9.3
    hooks:
      - id: bandit
        args: ["-ll", "-q"]

  - repo: https://github.com/pre-commit/mirrors-mypy
    rev: v1.19.1
    hooks:
      - id: mypy
        args: ["--strict"]
        additional_dependencies: [
          "httpx>=0.27.0"
        ]

  - repo: https://github.com/semgrep/semgrep
    rev: v1.150.0
    hooks:
      - id: semgrep
        args: ["--error", "--config", "p/ci"]

  - repo: local
    hooks:
      - id: ai-rmf-artifacts
        name: AI RMF / AIMS artifacts present
        entry: python tools/ci/ai_rmf_validate_artifacts.py
        language: system
        pass_filenames: false
      - id: ai-act-lint
        name: EU AI Act technical file sanity
        entry: python tools/ci/ai_act_lint.py
        language: system
        pass_filenames: false
      - id: gitleaks-secrets
        name: gitleaks (secrets scan)
        entry: gitleaks protect --staged --redact
        language: system
        stages: [pre-commit]
