Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
93 lines (82 loc) · 2.45 KB

File metadata and controls

93 lines (82 loc) · 2.45 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Pre-commit hooks for HookProbe
# See https://pre-commit.com for more information
repos:
# General file checks
- 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
args: ['--allow-multiple-documents']
- id: check-json
- id: check-added-large-files
args: ['--maxkb=1000']
- id: check-merge-conflict
- id: check-case-conflict
- id: detect-private-key
- id: mixed-line-ending
# Shell script linting
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.6
hooks:
- id: shellcheck
args: ['--severity=warning']
# Python formatting
- repo: https://github.com/psf/black
rev: 23.12.1
hooks:
- id: black
language_version: python3
# Python import sorting
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args: ['--profile', 'black']
# Python linting
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8
args: ['--max-line-length=100', '--extend-ignore=E203,W503']
# Python security
- repo: https://github.com/PyCQA/bandit
rev: 1.7.6
hooks:
- id: bandit
args: ['-ll', '--recursive', '--exclude', 'tests']
# Custom: Check for unmasked sensitive data logging (CWE-532)
- repo: local
hooks:
- id: sensitive-logging-check
name: Check for unmasked MAC/IP logging
entry: bash -c 'grep -rE "logger\.(info|warning|error)\([^)]*\{(mac|ip)(_address)?\}" --include="*.py" "$@" 2>/dev/null | grep -v "mask_mac\|mask_ip\|_masked" | grep -v "# nosec" && echo "ERROR: Found unmasked MAC/IP logging. Use mask_mac() or mask_ip() from security_utils." && exit 1 || exit 0'
language: system
types: [python]
pass_filenames: true
# Markdown linting
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.38.0
hooks:
- id: markdownlint
args: ['--fix']
# YAML linting
- repo: https://github.com/adrienverge/yamllint
rev: v1.33.0
hooks:
- id: yamllint
args: ['-d', '{extends: default, rules: {line-length: {max: 120}}}']
# Configuration for specific hooks
default_language_version:
python: python3
# Files to exclude from all hooks
exclude: |
(?x)^(
\.git/.*|
\.pytest_cache/.*|
__pycache__/.*|
.*\.egg-info/.*|
venv/.*|
env/.*
)$
Morty Proxy This is a proxified and sanitized view of the page, visit original site.