-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
47 lines (42 loc) · 1.26 KB
/
.pre-commit-config.yaml
File metadata and controls
47 lines (42 loc) · 1.26 KB
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
40
41
42
43
44
45
46
47
# Pre-commit hooks for security scanning
repos:
- 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
- id: check-added-large-files
args: ['--maxkb=1000']
- id: detect-private-key
- id: check-merge-conflict
- id: mixed-line-ending
- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.0
hooks:
- id: gitleaks
args: ['--config', '.github/gitleaks.toml']
- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
hooks:
- id: bandit
args: ['-r', 'scripts/', '-ll']
files: \.py$
- repo: https://github.com/psf/black
rev: 23.12.1
hooks:
- id: black
language_version: python3
files: \.py$
- repo: local
hooks:
- id: check-compilation-script
name: Validate compilation script
entry: python3 -m py_compile
language: system
files: scripts/compile_docs.*\.py$
- id: check-docs-size
name: Check documentation size
entry: bash -c 'find static/downloads -name "*.md" -size +50M -exec echo "File {} exceeds 50MB limit" \; -exec false \;'
language: system
pass_filenames: false