Files
orion/.pre-commit-config.yaml
Samir Boulahtit 1eef69f300
Some checks failed
CI / ruff (push) Successful in 10s
CI / validate (push) Has been cancelled
CI / dependency-scanning (push) Has been cancelled
CI / docs (push) Has been cancelled
CI / deploy (push) Has been cancelled
CI / pytest (push) Has started running
ci: add security/performance/audit validators to pre-commit and CI
- Add validate-security, validate-performance, validate-audit hooks
  to .pre-commit-config.yaml (previously only architecture was checked)
- Break single "Run all validators" CI step into 4 explicit steps
  (architecture, security, performance, audit) for clearer pipeline output
- Add noqa: SEC001 suppressions for test fixture hashed_password values

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 22:49:04 +01:00

66 lines
2.0 KiB
YAML

# Pre-commit hooks configuration
# Install: pip install pre-commit
# Setup: pre-commit install
# Run manually: pre-commit run --all-files
repos:
# Code validators (architecture, security, performance, audit)
- repo: local
hooks:
- id: validate-architecture
name: Validate Architecture Patterns
entry: python scripts/validate/validate_architecture.py
language: python
pass_filenames: false
always_run: true
additional_dependencies: [pyyaml]
verbose: true
- id: validate-security
name: Validate Security Patterns
entry: python scripts/validate/validate_all.py --security
language: python
pass_filenames: false
always_run: true
additional_dependencies: [pyyaml]
verbose: true
- id: validate-performance
name: Validate Performance Patterns
entry: python scripts/validate/validate_all.py --performance
language: python
pass_filenames: false
always_run: true
additional_dependencies: [pyyaml]
verbose: true
- id: validate-audit
name: Validate Audit Patterns
entry: python scripts/validate/validate_all.py --audit
language: python
pass_filenames: false
always_run: true
additional_dependencies: [pyyaml]
verbose: true
# Python code quality
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
exclude: mkdocs.yml # Uses Python tags (!!python/name) unsupported by basic YAML checker
- id: check-added-large-files
args: ['--maxkb=1000']
- id: check-json
- id: check-merge-conflict
- id: debug-statements
# Ruff - linting and import sorting (replaces black + isort)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]