File size: 1,172 Bytes
4343907
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Pre-commit hooks for SAAP - Security & Code Quality
# Installation: sudo pacman -S pre-commit && pre-commit install
# Manual run: pre-commit run --all-files

repos:
  - repo: https://github.com/gitleaks/gitleaks
    rev: v8.27.2
    hooks:
      - id: gitleaks
        name: Gitleaks - Secret Detection
        description: Scan for hardcoded secrets (API keys, passwords, tokens)
        entry: gitleaks protect --staged --redact --verbose
        language: system
        pass_filenames: false
        
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.5.0
    hooks:
      - id: trailing-whitespace
        name: Trim Trailing Whitespace
      - id: end-of-file-fixer
        name: Fix End of Files
      - id: check-yaml
        name: Check YAML Syntax
      - id: check-json
        name: Check JSON Syntax
      - id: check-merge-conflict
        name: Check for Merge Conflicts
      - id: detect-private-key
        name: Detect Private Keys
        
  - repo: https://github.com/psf/black
    rev: 23.12.1
    hooks:
      - id: black
        name: Black - Python Formatter
        language_version: python3
        args: [--line-length=100]